Repository: yt-dlp
Issue: AbemaTV end of the video is not playable
Labels: site-bug,triage

### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I remove or skip any mandatory\* field

### Checklist

- [X] I'm reporting a bug unrelated to a specific site
- [X] I've verified that I'm running yt-dlp version **2022.11.11** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/yt-dlp/yt-dlp/wiki/FAQ#video-url-contains-an-ampersand--and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)

### Provide a description that is worded well enough to be understood

This is a 3 episodes video, the last episode is not playable. 
At the very end of the video, a 3s ad is included, it may be the cause of the problem as other video from AbemaTV do not have it.

By using --fixup never, I get a file with 2 video streams and 2 audio streams. Maybe the second v/a streams are the third episode. What should I do?

Thank you.

---------------------------------------------

<details>
<summary>Details</summary>



MediaInfo:

General
Complete name                            : D:\apps\ドラえもん #758～760【無料ビデオ1週間】 [8ZUMh59TjDA3Hq].mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 760 MiB
Duration                                 : 51 min 44 s
Overall bit rate                         : 2 053 kb/s
Writing application                      : Lavf59.16.100

Video
ID                                       : 2
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Main@L3.1
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 23 min 22 s
Source duration                          : 23 min 22 s
Bit rate                                 : 3 771 kb/s
Nominal bit rate                         : 4 000 kb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Frame rate                               : 27.637 FPS
Minimum frame rate                       : 0.131 FPS
Maximum frame rate                       : 29.970 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.066
Stream size                              : 631 MiB (83%)
Source stream size                       : 631 MiB (83%)
Writing library                          : x264 core 148 r265 3b70645
Encoding settings                        : cabac=1 / ref=2 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=9 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=1000 / keyint_min=501 / scenecut=0 / intra_refresh=0 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=4000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00
mdhd_Duration                            : 1402557
Codec configuration box                  : avcC

Audio
ID                                       : 1
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 51 min 44 s
Bit rate mode                            : Constant
Bit rate                                 : 345 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 44.1 kHz
Frame rate                               : 43.066 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 128 MiB (17%)
Default                                  : Yes
Alternate group                          : 1


--------------------------------

by using --fixup never I get:

General
ID                                       : 1 (0x1)
Complete name                            : D:\apps\ドラえもん #758～760【無料ビデオ1週間】 [8ZUMh59TjDA3Hq].mp4
Format                                   : MPEG-TS
File size                                : 1 005 MiB
Overall bit rate mode                    : Variable
FileExtension_Invalid                    : ts m2t m2s m4t m4s tmf ts tp trp ty

Video #1
ID                                       : 256 (0x100)
Menu ID                                  : 1 (0x1)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Main@L3.1
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : 15
Nominal bit rate                         : 4 000 kb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Writing library                          : x264 core 148 r265 3b70645
Encoding settings                        : cabac=1 / ref=2 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=9 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=1000 / keyint_min=501 / scenecut=0 / intra_refresh=0 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=4000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00

Video #2
ID                                       : 257 (0x101)
Menu ID                                  : 1 (0x1)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Main@L3.1
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : 27
Nominal bit rate                         : 4 000 kb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Writing library                          : x264 core 148 r265 3b70645
Encoding settings                        : cabac=1 / ref=2 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=9 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=1000 / keyint_min=501 / scenecut=0 / intra_refresh=0 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=4000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00

Audio #1
ID                                       : 256 (0x100)
Menu ID                                  : 1 (0x1)
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Format version                           : Version 4
Muxing mode                              : ADTS
Codec ID                                 : 15-2
Bit rate mode                            : Variable
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 44.1 kHz
Frame rate                               : 43.066 FPS (1024 SPF)
Compression mode                         : Lossy

Audio #2
ID                                       : 257 (0x101)
Menu ID                                  : 1 (0x1)
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Format version                           : Version 4
Muxing mode                              : ADTS
Codec ID                                 : 27-2
Bit rate mode                            : Variable
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 44.1 kHz
Frame rate                               : 43.066 FPS (1024 SPF)
Compression mode                         : Lossy

Menu
ID                                       : 4096 (0x1000)
Menu ID                                  : 1 (0x1)
Format                                   : AAC / AAC / 
List                                     : 256 (0x100) (AAC) / 257 (0x101) (AAC) / 258 (0x102) ()



</details>

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
[debug] Command-line config: ['-vU', 'https://abema.tv/channels/family-anime-1/slots/8ZUMh59TjDA3Hq']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.11.11 [8b64402] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22000-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 5.0.1-full_build-www.gyan.dev (setts), ffprobe 5.0.1-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.09.24, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1723 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.11.11, Current version: 2022.11.11
yt-dlp is up to date (2022.11.11)
[debug] [AbemaTV] Extracting URL: https://abema.tv/channels/family-anime-1/slots/8ZUMh59TjDA3Hq
[AbemaTV] Authorizing
[AbemaTV] 8ZUMh59TjDA3Hq: Downloading webpage
[AbemaTV] 8ZUMh59TjDA3Hq: Checking playability
[AbemaTV] 8ZUMh59TjDA3Hq: Downloading m3u8 information
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 8ZUMh59TjDA3Hq: Downloading 1 format(s): 5300
[debug] Invoking hlsnative downloader on "https://vod-abematv.akamaized.net/slot/8ZUMh59TjDA3Hq/1080/playlist.m3u8?aver=956JJhwRzG77jd"
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 326
[download] Destination: ドラえもん #758～760【無料ビデオ1週間】 [8ZUMh59TjDA3Hq].mp4
[debug] File locking is not supported. Proceeding without locking
[download]   0.3% of ~ 712.43MiB at    6.54MiB/s ETA 01:47 (frag 1/326)[AbemaTV] Fetching media token
[AbemaTV] Requesting playback license
[download] 100% of 1005.37MiB in 00:01:57 at 8.58MiB/s
[debug] ffprobe command line: ffprobe -hide_banner -show_format -show_streams -print_format json "file:ドラえもん #758～760【無料ビデオ1週間】 [8ZUMh59TjDA3Hq].mp4"
[FixupM3u8] Fixing MPEG-TS in MP4 container of "ドラえもん #758～760【無料ビデオ1週間】 [8ZUMh59TjDA3Hq].mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:ドラえもん #758～760【無料ビデオ1週間】 [8ZUMh59TjDA3Hq].mp4" -map 0 -dn -ignore_unknown -c copy -f mp4 "-bsf:a" aac_adtstoasc -movflags "+faststart" "file:ドラえもん #758～760【無料ビデオ1週間】 [8ZUMh59TjDA3Hq].temp.mp4"


--------------------


yt-dlp.exe -vU --fixup never https://abema.tv/channels/family-anime-1/slots/8ZUMh59TjDA3Hq
[debug] Command-line config: ['-vU', '--fixup', 'never', 'https://abema.tv/channels/family-anime-1/slots/8ZUMh59TjDA3Hq']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.11.11 [8b64402] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22000-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 5.0.1-full_build-www.gyan.dev (setts), ffprobe 5.0.1-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.09.24, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1723 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.11.11, Current version: 2022.11.11
yt-dlp is up to date (2022.11.11)
[debug] [AbemaTV] Extracting URL: https://abema.tv/channels/family-anime-1/slots/8ZUMh59TjDA3Hq
[AbemaTV] Authorizing
[AbemaTV] 8ZUMh59TjDA3Hq: Downloading webpage
[AbemaTV] 8ZUMh59TjDA3Hq: Checking playability
[AbemaTV] 8ZUMh59TjDA3Hq: Downloading m3u8 information
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 8ZUMh59TjDA3Hq: Downloading 1 format(s): 5300
[debug] Invoking hlsnative downloader on "https://vod-abematv.akamaized.net/slot/8ZUMh59TjDA3Hq/1080/playlist.m3u8?aver=956JJhwRzG77jd"
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 326
[download] Destination: ドラえもん #758～760【無料ビデオ1週間】 [8ZUMh59TjDA3Hq].mp4
[debug] File locking is not supported. Proceeding without locking
[download]   0.3% of ~ 712.43MiB at   10.09MiB/s ETA 01:08 (frag 1/326)[AbemaTV] Fetching media token
[AbemaTV] Requesting playback license
[download] 100% of 1005.37MiB in 00:01:42 at 9.84MiB/s
```