[FFmpeg-trac] #10597(ffmpeg:new): No way to recover from a failed download in m3u8 file

FFmpeg trac at avcodec.org
Wed Sep 27 20:56:30 EEST 2023


#10597: No way to recover from a failed download in m3u8 file
---------------------------------+---------------------------------------
             Reporter:  steinrr  |                     Type:  enhancement
               Status:  new      |                 Priority:  normal
            Component:  ffmpeg   |                  Version:  unspecified
             Keywords:           |               Blocked By:
             Blocking:           |  Reproduced by developer:  0
Analyzed by developer:  0        |
---------------------------------+---------------------------------------
 Summary of the bug:

 I am downloading .ts streams from a m3u8 playlist file to combine in one
 mkv video. Sometimes the first .ts file in playlist is not able to
 download properly, and I am forced to abort (using xerror parameter). I
 then need to manually try again and hope for the best.

 I would like a command line parameter to ffmpeg, so it will retry failed
 downloads from within m3u8 files if any of the files fails.

 There are currently no options to ffmpeg that will do this, and you have
 to retry the whole m3u8 playlist.

 This is typically the output in report when this happens:

 ----------------
 Press [q] to stop, [?] for help
 frame=    0 fps=0.0 q=-1.0 size=       0kB time=00:00:00.00 bitrate=
 0.0kbits/s speed=N/A
 [https @ 000001f107be2700] Stream ends prematurely at 2097152, should be
 4743992
 [https @ 000001f107bf3940] Opening
 'https://anood37-httpcache0-47115-cacheod0.dna.ip-
 only.net/47115-cacheod1/1811037/0/hls/ouha42000702/2117993848-1341166632-1800000.ts?version_hash=b206a2f1'
 for reading
 [hls @ 000001f10779d800] Opening
 'https://anood37-httpcache0-47115-cacheod0.dna.ip-
 only.net/47115-cacheod1/1811037/0/hls/ouha42000702/2117993848-1341166632-1800000.ts?version_hash=b206a2f1'
 for reading
 [mpegts @ 000001f107be2440] Packet corrupt (stream = 0, dts = 360000).
 [hls @ 000001f10779d800] Packet corrupt (stream = 0, dts = 358200).
 https://anood37-httpcache0-47115-cacheod0.dna.ip-
 only.net/47115-cacheod1/1811037/0/hls/ouha42000702/2117993848-1341166632-prog_index.m3u8?version_hash=b206a2f1:
 corrupt input packet in stream 0
 https://anood37-httpcache0-47115-cacheod0.dna.ip-
 only.net/47115-cacheod1/1811037/0/hls/ouha42000702/2117993848-1341166632-prog_index.m3u8?version_hash=b206a2f1:
 Invalid data found when processing input
 Conversion failed!
 -------------------

 How to reproduce:

 Run similar command:
 ffmpeg -y -i https://exampleonly.com/myfiles.m3u8 -c copy /tmp/test.mkv

 The m3u8 file typically has such entries:

 #EXTM3U
 #EXT-X-VERSION:3
 #EXT-X-PLAYLIST-TYPE:VOD
 #EXT-X-TARGETDURATION:10
 #EXT-X-MEDIA-SEQUENCE:0
 #EXTINF:10.000000,
 104482862-732449232-0.ts?version_hash=c77e8452
 #EXTINF:10.000000,
 104482862-732449232-900000.ts?version_hash=c77e8452
 #EXTINF:10.000000,
 104482862-732449232-1800000.ts?version_hash=c77e8452
 #EXTINF:10.000000,
 104482862-732449232-2700000.ts?version_hash=c77e8452
 #EXTINF:10.000000,
 104482862-732449232-3600000.ts?version_hash=c77e8452
 #EXTINF:10.000000,
 104482862-732449232-4500000.ts?version_hash=c77e8452
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10597>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list