Opened 9 years ago
Closed 9 years ago
#5335 closed defect (worksforme)
FFmpeg cannot handle HLS URL with Query string
Reported by: | riocampos | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | unspecified | Keywords: | hls |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
FFmpeg cannot treat m3u file as follows:
#EXTM3U #EXT-X-VERSION:3 #EXT-X-PLAYLIST-TYPE:VOD #EXT-X-TARGETDURATION:10 #EXT-X-KEY:METHOD=NONE #EXTINF:10.0, 1554727_01.mp4-20150813-115220/1.ts?len=33>ime=1457870305&guid=d0f6e3b0cb404033ff98A45D36FCAFA8&da=0&key=807F40B1A68D93654B44BA118A33C96B #EXTINF:10.0, 1554727_01.mp4-20150813-115220/2.ts?len=33>ime=1457870305&guid=d0f6e3b0cb404033ff98A45D36FCAFA8&da=0&key=807F40B1A68D93654B44BA118A33C96B (snip) #EXTINF:10.0, 1554727_01.mp4-20150813-115220/270-END.ts?len=33>ime=1457870305&guid=d0f6e3b0cb404033ff98A45D36FCAFA8&da=0&key=807F40B1A68D93654B44BA118A33C96B #EXT-X-ENDLIST
I check these urls are good ts file but FFmpeg ignore the query string so it recieve 403 error and say "Failed to open segment of playlist 0".
Please cope the query string urls. Thanks.
Attachments (2)
Change History (11)
comment:1 by , 9 years ago
by , 9 years ago
comment:2 by , 9 years ago
I use newly FFmpeg installed by Homebrew (3.0).
And my command example is as follows:
ffmpeg -i 'http://stream00.ouj.ac.jp/helixSCRMP4/?url=demotv/demotv/demo.mp4' -loglevel debug demo.mp4 2> test.log
I add test.log.
comment:4 by , 9 years ago
Component: | ffmpeg → avformat |
---|---|
Keywords: | hls regression added; M3U M3U8 HLS removed |
Priority: | normal → important |
Type: | enhancement → defect |
by , 9 years ago
Attachment: | hls_url_with_query_git_head.log added |
---|
comment:5 by , 9 years ago
I compile FFmpeg git head, and execute a command as follows:
~/usr/bin/ffmpeg -i 'http://stream00.ouj.ac.jp/helixSCRMP4/?url=demotv/demotv/demo.mp4' -loglevel debug demo.mp4 2> hls_url_with_query_git_head.log
And I add the result hls_url_with_query_git_head.log.
follow-up: 7 comment:6 by , 9 years ago
Keywords: | regression removed |
---|---|
Priority: | important → normal |
The url you provided works fine here (it seems I had a network problem here yesterday, so I had thought this is a regression):
$ ffmpeg -i http://stream00.ouj.ac.jp/helixSCRMP4/?url=demotv/demotv/demo.mp4 -qscale 2 -t 5 out.avi ffmpeg version N-79049-gc3c7a87 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 4.7 (SUSE Linux) configuration: --enable-gpl libavutil 55. 19.100 / 55. 19.100 libavcodec 57. 28.103 / 57. 28.103 libavformat 57. 28.101 / 57. 28.101 libavdevice 57. 0.101 / 57. 0.101 libavfilter 6. 39.102 / 6. 39.102 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.101 / 2. 0.101 libpostproc 54. 0.100 / 54. 0.100 [mpegts @ 0x3db5a20] Invalid timestamps stream=1, pts=24000, dts=24030, size=332 [mpegts @ 0x3db5a20] Invalid timestamps stream=1, pts=42000, dts=42030, size=122 [mpegts @ 0x3db5a20] Invalid timestamps stream=1, pts=51000, dts=51030, size=268 [mpegts @ 0x3db5a20] Invalid timestamps stream=1, pts=60000, dts=60030, size=181 [mpegts @ 0x3db5a20] Invalid timestamps stream=1, pts=69000, dts=69030, size=233 [hls,applehttp @ 0x3dad3e0] Invalid timestamps stream=1, pts=24000, dts=24030, size=346 [hls,applehttp @ 0x3dad3e0] Invalid timestamps stream=1, pts=42000, dts=42030, size=136 [hls,applehttp @ 0x3dad3e0] Invalid timestamps stream=1, pts=51000, dts=51030, size=282 [hls,applehttp @ 0x3dad3e0] Invalid timestamps stream=1, pts=60000, dts=60030, size=195 [hls,applehttp @ 0x3dad3e0] Invalid timestamps stream=1, pts=69000, dts=69030, size=247 Input #0, hls,applehttp, from 'http://stream00.ouj.ac.jp/helixSCRMP4/?url=demotv/demotv/demo.mp4': Duration: 00:02:27.00, start: 0.200000, bitrate: 0 kb/s Program 0 Metadata: variant_bitrate : 0 Stream #0:0: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 96 kb/s Stream #0:1: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, smpte170m), 640x480 [SAR 1:1 DAR 4:3], 30 fps, 30 tbr, 90k tbn, 60 tbc Please use -q:a or -q:v, -qscale is ambiguous Output #0, avi, to 'out.avi': Metadata: ISFT : Lavf57.28.101 Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc Metadata: encoder : Lavc57.28.103 mpeg4 Side data: cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1 Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 44100 Hz, stereo, fltp, 192 kb/s Metadata: encoder : Lavc57.28.103 ac3 Stream mapping: Stream #0:1 -> #0:0 (h264 (native) -> mpeg4 (native)) Stream #0:0 -> #0:1 (aac (native) -> ac3 (native)) Press [q] to stop, [?] for help [mpegts @ 0x3db5a20] Invalid timestamps stream=1, pts=87000, dts=87030, size=169 [hls,applehttp @ 0x3dad3e0] Invalid timestamps stream=1, pts=87000, dts=87030, size=183 [mpegts @ 0x3db5a20] Invalid timestamps stream=1, pts=96000, dts=96030, size=239 [hls,applehttp @ 0x3dad3e0] Invalid timestamps stream=1, pts=96000, dts=96030, size=253 [mpegts @ 0x3db5a20] Invalid timestamps stream=1, pts=105000, dts=105030, size=209 [hls,applehttp @ 0x3dad3e0] Invalid timestamps stream=1, pts=105000, dts=105030, size=223 [mpegts @ 0x3db5a20] Invalid timestamps stream=1, pts=123000, dts=123030, size=190 [hls,applehttp @ 0x3dad3e0] Invalid timestamps stream=1, pts=123000, dts=123030, size=204 [mpegts @ 0x3db5a20] Invalid timestamps stream=1, pts=132000, dts=132030, size=255 [hls,applehttp @ 0x3dad3e0] Invalid timestamps stream=1, pts=132000, dts=132030, size=269 ... [mpegts @ 0x3db5a20] Invalid timestamps stream=1, pts=456000, dts=456030, size=337 [hls,applehttp @ 0x3dad3e0] Invalid timestamps stream=1, pts=456000, dts=456030, size=351 [mpegts @ 0x3db5a20] Invalid timestamps stream=1, pts=465000, dts=465030, size=308 [hls,applehttp @ 0x3dad3e0] Invalid timestamps stream=1, pts=465000, dts=465030, size=322 [mpegts @ 0x3db5a20] Invalid timestamps stream=1, pts=474000, dts=474030, size=416 [hls,applehttp @ 0x3dad3e0] Invalid timestamps stream=1, pts=474000, dts=474030, size=430 [mpegts @ 0x3db5a20] Invalid timestamps stream=1, pts=492000, dts=492030, size=271 [hls,applehttp @ 0x3dad3e0] Invalid timestamps stream=1, pts=492000, dts=492030, size=285 frame= 149 fps= 92 q=2.0 Lsize= 743kB time=00:00:05.01 bitrate=1214.0kbits/s speed= 3.1x video:609kB audio:118kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.302325%
follow-up: 8 comment:7 by , 9 years ago
Replying to cehoyos:
The url you provided works fine here (it seems I had a network problem here yesterday, so I had thought this is a regression):
In my mac, your command doesn't work and FFmpeg displayed same errors.
Please show me the log with -loglevel debug
option?
comment:8 by , 9 years ago
Replying to riocampos:
In my mac, your command doesn't work and FFmpeg displayed same errors.
I re-compile FFmpeg git head, so FFmpeg can download mp4 file!
I make a mistake in compiling without make clean
after other compile.
And Homebrew pure FFmpeg 3.0 can execute the url!
I'll check that some compile option make fault. And I'll report result.
Thanks cehoyos!
comment:9 by , 9 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Please test current FFmpeg git head and provide your failing command line together with the complete, uncut console output to make this a valid ticket.