[FFmpeg-trac] #10353(avformat:reopened): HLS Handling Error from Commit 6b1f68ccb04d791f0250e05687c346a99ff47ea1
FFmpeg
trac at avcodec.org
Fri May 12 21:04:32 EEST 2023
#10353: HLS Handling Error from Commit 6b1f68ccb04d791f0250e05687c346a99ff47ea1
------------------------------------+------------------------------------
Reporter: QFox | Owner: (none)
Type: defect | Status: reopened
Priority: normal | Component: avformat
Version: git-master | Resolution:
Keywords: hls | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
------------------------------------+------------------------------------
Description changed by QFox:
Old description:
> Summary of the bug:
>
> After **Commit 6b1f68ccb04d791f0250e05687c346a99ff47ea1 - avformat/hls:
> fail on probing non hls/m3u8 file extensions**, ffmpeg could not handle
> m3u8 correctly like following url
>
> https://edge20-ash.live.mmcdn.com/live-hls/amlst:hugetittiesgerda-sd-
> c8f042efe9196845bd96f2febf8745323c9cf7f733b41b19e20ad9ae5726fa38_trns_h264/chunklist_w1103181056_b1668000_t64RlBTOjIxLjA=.m3u8
>
> just reverted this commit and the problem would be gone.
New description:
Summary of the bug:
After **Commit 6b1f68ccb04d791f0250e05687c346a99ff47ea1 - avformat/hls:
fail on probing non hls/m3u8 file extensions**, ffmpeg could not handle
m3u8 correctly like following url
just reverted this commit and the problem would be gone.
To reproduce, download mpv here:
https://github.com/shinchiro/mpv-winbuild-cmake/releases/tag/20230505
(working)
https://github.com/shinchiro/mpv-winbuild-cmake/releases/tag/20230506 (not
working)
Find a live stream here:
https://www.cbc.ca/player/news/live
using following cmd line to play it
mpv_0505 https://www.cbc.ca/player/play/2205049411630 --msg-level=ffmpeg=v
--script-opts=ytdl_hook-ytdl_path=D:\Tools\yt-dlp\yt-dlp > working.txt
mpv_0506 https://www.cbc.ca/player/play/2205049411630 --msg-level=ffmpeg=v
--script-opts=ytdl_hook-ytdl_path=D:\Tools\yt-dlp\yt-dlp > not-working.txt
Here is the working log
**You can see that ffmpeg re-read .m3u8 file multiple times**
{{{
[ffmpeg] Opening https://www.cbc.ca/player/play/2205049411630
[ffmpeg] Mime-type: 'text/html; charset=utf-8'
[ffmpeg] Opening https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/master_3000.m3u8
[ffmpeg] Mime-type: 'application/x-mpegURL'
[ffmpeg/demuxer] hls: Skip ('#EXT-X-VERSION:3')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:52:24.533Z')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:52:32.533Z')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:52:40.533Z')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:52:48.533Z')
[ffmpeg/demuxer] hls: Opening 'https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/20230512T115030/master_3000/00000/master_3000_00916.ts'
for reading
[ffmpeg/demuxer] hls: Opening 'https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/20230512T115030/master_3000/00000/master_3000_00917.ts'
for reading
(+) Video --vid=1 (h264 1280x720 30.000fps)
(+) Audio --aid=1 (aac 2ch 48000Hz)
AO: [wasapi] 48000Hz stereo 2ch float
VO: [gpu] 1280x720 yuv420p
[ffmpeg] https: Opening 'https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/20230512T115030/master_3000/00000/master_3000_00918.ts'
for reading
[ffmpeg/demuxer] hls: Skip ('#EXT-X-VERSION:3')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:52:32.533Z')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:52:40.533Z')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:52:48.533Z')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:52:56.533Z')
[ffmpeg] https: Opening 'https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/20230512T115030/master_3000/00000/master_3000_00919.ts'
for reading
[ffmpeg] https: Opening 'https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/master_3000.m3u8'
for reading
[ffmpeg/demuxer] hls: Skip ('#EXT-X-VERSION:3')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:52:40.533Z')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:52:48.533Z')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:52:56.533Z')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:53:04.533Z')
[ffmpeg] https: Opening 'https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/20230512T115030/master_3000/00000/master_3000_00920.ts'
for reading
[ffmpeg] https: Opening 'https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/master_3000.m3u8'
for reading
[ffmpeg/demuxer] hls: Skip ('#EXT-X-VERSION:3')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:52:48.533Z')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:52:56.533Z')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:53:04.533Z')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:53:12.533Z')
[ffmpeg] https: Opening 'https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/20230512T115030/master_3000/00000/master_3000_00921.ts'
for reading
[ffmpeg] https: Opening 'https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/master_3000.m3u8'
for reading
[ffmpeg/demuxer] hls: Skip ('#EXT-X-VERSION:3')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:52:56.533Z')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:53:04.533Z')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:53:12.533Z')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:53:20.533Z')
[ffmpeg] https: Opening 'https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/20230512T115030/master_3000/00000/master_3000_00922.ts'
for reading
[ffmpeg] https: Opening 'https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/master_3000.m3u8'
for reading
[ffmpeg/demuxer] hls: Skip ('#EXT-X-VERSION:3')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:53:04.533Z')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:53:12.533Z')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:53:20.533Z')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:53:28.533Z')
[ffmpeg] https: Opening 'https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/20230512T115030/master_3000/00000/master_3000_00923.ts'
for reading
[ffmpeg] https: Opening 'https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/master_3000.m3u8'
for reading
[ffmpeg/demuxer] hls: Skip ('#EXT-X-VERSION:3')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:53:12.533Z')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:53:20.533Z')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:53:28.533Z')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:53:36.533Z')
[ffmpeg] https: Opening 'https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/20230512T115030/master_3000/00000/master_3000_00924.ts'
for reading
[ffmpeg] https: Opening 'https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/master_3000.m3u8'
for reading
[ffmpeg/demuxer] hls: Skip ('#EXT-X-VERSION:3')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:53:20.533Z')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:53:28.533Z')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:53:36.533Z')
[ffmpeg/demuxer] hls: Skip ('#EXT-X-PROGRAM-DATE-
TIME:2023-05-12T17:53:44.533Z')
[ffmpeg] https: Opening 'https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/20230512T115030/master_3000/00000/master_3000_00925.ts'
for reading
Exiting... (Quit)
}}}
Here is the not working log
{{{
[ffmpeg] Opening https://www.cbc.ca/player/play/2205049411630
[ffmpeg] Mime-type: 'text/html; charset=utf-8'
[ffmpeg] Opening https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/master_3000.m3u8
[ffmpeg] Mime-type: 'application/x-mpegURL'
[ffmpeg] Not detecting m3u8/hls with non standard extension
[ffmpeg] Not detecting m3u8/hls with non standard extension
Playing: https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/20230512T115030/master_3000/00000/master_3000_00934.ts
[ffmpeg] Opening https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/20230512T115030/master_3000/00000/master_3000_00934.ts
[ffmpeg] Mime-type: 'video/MP2T'
[ffmpeg/demuxer] mpegts: start time for stream 2 is not set in
estimate_timings_from_pts
[ffmpeg] stream level seek from 474588 to 2991308
[ffmpeg] stream level seek from 3241308 to 0
(+) Video --vid=1 (h264 1280x720 30.000fps)
(+) Audio --aid=1 --alang=eng (aac 2ch 48000Hz)
VO: [gpu] 1280x720 yuv420p
AO: [wasapi] 48000Hz stereo 2ch float
Playing: https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/20230512T115030/master_3000/00000/master_3000_00935.ts
[ffmpeg] Opening https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/20230512T115030/master_3000/00000/master_3000_00935.ts
[ffmpeg] Mime-type: 'video/MP2T'
[ffmpeg] stream level seek from 454812 to 2963484
[ffmpeg] stream level seek from 3213484 to 0
(+) Video --vid=1 (h264 1280x720 30.000fps)
(+) Audio --aid=1 --alang=eng (aac 2ch 48000Hz)
Playing: https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/20230512T115030/master_3000/00000/master_3000_00936.ts
[ffmpeg] Opening https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/20230512T115030/master_3000/00000/master_3000_00936.ts
[ffmpeg] Mime-type: 'video/MP2T'
[ffmpeg/demuxer] mpegts: start time for stream 2 is not set in
estimate_timings_from_pts
[ffmpeg] stream level seek from 493996 to 2996572
[ffmpeg] stream level seek from 3246572 to 0
(+) Video --vid=1 (h264 1280x720 30.000fps)
(+) Audio --aid=1 --alang=eng (aac 2ch 48000Hz)
Playing: https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/20230512T115030/master_3000/00000/master_3000_00937.ts
[ffmpeg] Opening https://cbcrclive-
tor.akamaized.net/hls/live/2040348/geo_allow_global/ES_NEWS_11/20230512T115030/master_3000/00000/master_3000_00937.ts
[ffmpeg] Mime-type: 'video/MP2T'
[ffmpeg/demuxer] mpegts: start time for stream 2 is not set in
estimate_timings_from_pts
[ffmpeg] stream level seek from 474872 to 3003904
[ffmpeg] stream level seek from 3253904 to 0
(+) Video --vid=1 (h264 1280x720 30.000fps)
(+) Audio --aid=1 --alang=eng (aac 2ch 48000Hz)
Exiting... (End of file)
}}}
--
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10353#comment:19>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list