Ffmpeg error when loading first segment

I have remote index.m3u8 file and I want to download it with ffmpeg. The contents file is:

#8998

new


defect

Reported by: Owned by:
Priority: important Component: avformat
Version: git-master Keywords: hls regression
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

I have remote index.m3u8 file and I want to download it with ffmpeg.
The contents file is:

#EXTM3U
#EXT-X-TARGETDURATION:6
#EXT-X-ALLOW-CACHE:YES
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-KEY:METHOD=AES-128,URI="https://example.com/encryption.key?x=AVCoPj..."
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:1
#EXTINF:6.000,
https://example.com/seg-1-v1-a1.ts?x=AVCoPj...
#EXTINF:6.000,
https://example.com/seg-2-v1-a1.ts?x=AVCoPj...
#EXTINF:6.000,
https://example.com/seg-3-v1-a1.ts?x=AVCoPj...
#EXTINF:6.000,
:
:

I tried this command:

ffmpeg -headers "User-Agent: a" -i "https://example.com/index.m3u8?x=AVCoPj..." -c copy "video.mp4"

In the some of versions of ffmpeg I getting this errors:

[AVIOContext @ 000001cef2816ec0] Statistics: 368 bytes read, 0 seeks
[hls @ 000001cef21be3c0] Error when loading first segment 'https://example.com/seg-1-v1-a1.ts?x=AVCoPj...'
[AVIOContext @ 000001cef21c8f00] Statistics: 24167 bytes read, 0 seeks
https://example.com/index.m3u8?x=AVCoPj...: Invalid data found when processing input

You can see all logs here:

# ffmpeg -headers "User-Agent: a" -i "https://example.com/index.m3u8?x=AVCoPj..." -c copy "video.mp4" -loglevel debug
ffmpeg version 2020-11-18-git-e3081d6f4f-full_build-www.gyan.dev Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.2.0 (Rev3, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      56. 60.100 / 56. 60.100
  libavcodec     58.112.103 / 58.112.103
  libavformat    58. 64.100 / 58. 64.100
  libavdevice    58. 11.102 / 58. 11.102
  libavfilter     7. 90.100 /  7. 90.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
Splitting the commandline.
Reading option '-headers' ... matched as AVOption 'headers' with argument 'User-Agent: a'.
Reading option '-i' ... matched as input url with argument 'https://example.com/index.m3u8?x=AVCoPj...'.
Reading option '-c' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option 'video.mp4' ... matched as output url.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url https://example.com/index.m3u8?x=AVCoPj....
Successfully parsed a group of options.
Opening an input file: https://example.com/index.m3u8?x=AVCoPj....
[NULL @ 000001cef21be3c0] Opening 'https://example.com/index.m3u8?x=AVCoPj...' for reading
[https @ 000001cef21bed80] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
[https @ 000001cef21bed80] No trailing CRLF found in HTTP header. Adding it.
[tcp @ 000001cef21c1f80] Original list of addresses:
[tcp @ 000001cef21c1f80] Address 1.2.3.4 port 443
    Last message repeated 1 times
[tcp @ 000001cef21c1f80] Interleaved list of addresses:
[tcp @ 000001cef21c1f80] Address 1.2.3.4 port 443
    Last message repeated 1 times
[tcp @ 000001cef21c1f80] Starting connection attempt to 1.2.3.4 port 443
[tcp @ 000001cef21c1f80] Successfully connected to 1.2.3.4 port 443
[https @ 000001cef21bed80] request: GET /index.m3u8?x=AVCoPj... HTTP/1.1
Accept: */*
Range: bytes=0-
Connection: close
Host: example.com
Icy-MetaData: 1
User-Agent: a


[hls @ 000001cef21be3c0] Format hls probed with size=2048 and score=100
[hls @ 000001cef21be3c0] Skip ('#EXT-X-ALLOW-CACHE:YES')
[hls @ 000001cef21be3c0] Skip ('#EXT-X-VERSION:3')
[https @ 000001cef21bed80] Last chunk received, closing conn
[hls @ 000001cef21be3c0] HLS request for url 'https://example.com/seg-1-v1-a1.ts?x=AVCoPj...', offset 0, playlist 0
[hls @ 000001cef21be3c0] Opening 'https://example.com/encryption.key?x=AVCoPj...' for reading
[tcp @ 000001cef2891bc0] Original list of addresses:
[tcp @ 000001cef2891bc0] Address 1.2.3.4 port 443
    Last message repeated 1 times
[tcp @ 000001cef2891bc0] Interleaved list of addresses:
[tcp @ 000001cef2891bc0] Address 1.2.3.4 port 443
    Last message repeated 1 times
[tcp @ 000001cef2891bc0] Starting connection attempt to 1.2.3.4 port 443
[tcp @ 000001cef2891bc0] Successfully connected to 1.2.3.4 port 443
[https @ 000001cef2270900] request: GET /encryption.key?x=AVCoPj... HTTP/1.1
Accept: */*
Range: bytes=0-
Connection: keep-alive
Host: example.com
Icy-MetaData: 1
User-Agent: a


[AVIOContext @ 000001cef2269980] Statistics: 16 bytes read, 0 seeks
[hls @ 000001cef21be3c0] Opening 'crypto+https://example.com/seg-1-v1-a1.ts?x=AVCoPj...' for reading
[tcp @ 000001cef21eb740] Original list of addresses:
[tcp @ 000001cef21eb740] Address 1.2.3.4 port 443
    Last message repeated 1 times
[tcp @ 000001cef21eb740] Interleaved list of addresses:
[tcp @ 000001cef21eb740] Address 1.2.3.4 port 443
    Last message repeated 1 times
[tcp @ 000001cef21eb740] Starting connection attempt to 1.2.3.4 port 443
[tcp @ 000001cef21eb740] Successfully connected to 1.2.3.4 port 443
[https @ 000001cef282acc0] request: GET /seg-1-v1-a1.ts?x=AVCoPj... HTTP/1.1
Accept: */*
Range: bytes=0-
Connection: keep-alive
Host: example.com
Icy-MetaData: 1
User-Agent: a


[AVIOContext @ 000001cef28992c0] Statistics: 368 bytes read, 0 seeks
[hls @ 000001cef21be3c0] HLS request for url 'https://example.com/seg-2-v1-a1.ts?x=AVCoPj...', offset 0, playlist 0
[hls @ 000001cef21be3c0] Opening 'crypto+https://example.com/seg-2-v1-a1.ts?x=AVCoPj...' for reading
[tcp @ 000001cef21e2a80] Original list of addresses:
[tcp @ 000001cef21e2a80] Address 1.2.3.4 port 443
    Last message repeated 1 times
[tcp @ 000001cef21e2a80] Interleaved list of addresses:
[tcp @ 000001cef21e2a80] Address 1.2.3.4 port 443
    Last message repeated 1 times
[tcp @ 000001cef21e2a80] Starting connection attempt to 1.2.3.4 port 443
[tcp @ 000001cef21e2a80] Successfully connected to 1.2.3.4 port 443
[https @ 000001cef282acc0] request: GET /seg-2-v1-a1.ts?x=AVCoPj... HTTP/1.1
Accept: */*
Range: bytes=0-
Connection: keep-alive
Host: example.com
Icy-MetaData: 1
User-Agent: a


[AVIOContext @ 000001cef21c6d40] Statistics: 368 bytes read, 0 seeks
[hls @ 000001cef21be3c0] HLS request for url 'https://example.com/seg-3-v1-a1.ts?x=AVCoPj...', offset 0, playlist 0
[hls @ 000001cef21be3c0] Opening 'crypto+https://example.com/seg-3-v1-a1.ts?x=AVCoPj...' for reading
[tcp @ 000001cef282bd40] Original list of addresses:
[tcp @ 000001cef282bd40] Address 1.2.3.4 port 443
    Last message repeated 1 times
[tcp @ 000001cef282bd40] Interleaved list of addresses:
[tcp @ 000001cef282bd40] Address 1.2.3.4 port 443
    Last message repeated 1 times
[tcp @ 000001cef282bd40] Starting connection attempt to 1.2.3.4 port 443
[tcp @ 000001cef282bd40] Successfully connected to 1.2.3.4 port 443
[https @ 000001cef2270900] request: GET /seg-3-v1-a1.ts?x=AVCoPj... HTTP/1.1
Accept: */*
Range: bytes=0-
Connection: keep-alive
Host: example.com
Icy-MetaData: 1
User-Agent: a


[AVIOContext @ 000001cef226e6c0] Statistics: 368 bytes read, 0 seeks
[hls @ 000001cef21be3c0] HLS request for url 'https://example.com/seg-4-v1-a1.ts?x=AVCoPj...', offset 0, playlist 0
[hls @ 000001cef21be3c0] Opening 'crypto+https://example.com/seg-4-v1-a1.ts?x=AVCoPj...' for reading
[tcp @ 000001cef282bec0] Original list of addresses:
[tcp @ 000001cef282bec0] Address 1.2.3.4 port 443
    Last message repeated 1 times
[tcp @ 000001cef282bec0] Interleaved list of addresses:
[tcp @ 000001cef282bec0] Address 1.2.3.4 port 443
    Last message repeated 1 times
[tcp @ 000001cef282bec0] Starting connection attempt to 1.2.3.4 port 443
[tcp @ 000001cef282bec0] Successfully connected to 1.2.3.4 port 443
[https @ 000001cef282acc0] request: GET /seg-4-v1-a1.ts?x=AVCoPj... HTTP/1.1
Accept: */*
Range: bytes=0-
Connection: keep-alive
Host: example.com
Icy-MetaData: 1
User-Agent: a

:
:
:

[AVIOContext @ 000001cef226b9c0] Statistics: 368 bytes read, 0 seeks
[hls @ 000001cef21be3c0] HLS request for url 'https://example.com/seg-75-v1-a1.ts?x=AVCoPj...', offset 0, playlist 0
[hls @ 000001cef21be3c0] Opening 'crypto+https://example.com/seg-75-v1-a1.ts?x=AVCoPj...' for reading
[tcp @ 000001cef28dd1c0] Original list of addresses:
[tcp @ 000001cef28dd1c0] Address 1.2.3.4 port 443
    Last message repeated 1 times
[tcp @ 000001cef28dd1c0] Interleaved list of addresses:
[tcp @ 000001cef28dd1c0] Address 1.2.3.4 port 443
    Last message repeated 1 times
[tcp @ 000001cef28dd1c0] Starting connection attempt to 1.2.3.4 port 443
[tcp @ 000001cef28dd1c0] Successfully connected to 1.2.3.4 port 443
[https @ 000001cef282ba40] request: GET /seg-75-v1-a1.ts?x=AVCoPj... HTTP/1.1
Accept: */*
Range: bytes=0-
Connection: keep-alive
Host: example.com
Icy-MetaData: 1
User-Agent: a


[AVIOContext @ 000001cef2817800] Statistics: 368 bytes read, 0 seeks
[hls @ 000001cef21be3c0] HLS request for url 'https://example.com/seg-76-v1-a1.ts?x=AVCoPj...', offset 0, playlist 0
[hls @ 000001cef21be3c0] Opening 'crypto+https://example.com/seg-76-v1-a1.ts?x=AVCoPj...' for reading
[tcp @ 000001cef2270700] Original list of addresses:
[tcp @ 000001cef2270700] Address 1.2.3.4 port 443
    Last message repeated 1 times
[tcp @ 000001cef2270700] Interleaved list of addresses:
[tcp @ 000001cef2270700] Address 1.2.3.4 port 443
    Last message repeated 1 times
[tcp @ 000001cef2270700] Starting connection attempt to 1.2.3.4 port 443
[tcp @ 000001cef2270700] Successfully connected to 1.2.3.4 port 443
[https @ 000001cef2271600] request: GET /seg-76-v1-a1.ts?x=AVCoPj... HTTP/1.1
Accept: */*
Range: bytes=0-
Connection: keep-alive
Host: example.com
Icy-MetaData: 1
User-Agent: a


[AVIOContext @ 000001cef2816ec0] Statistics: 368 bytes read, 0 seeks
[hls @ 000001cef21be3c0] Error when loading first segment 'https://example.com/seg-1-v1-a1.ts?x=AVCoPj...'
[AVIOContext @ 000001cef21c8f00] Statistics: 24167 bytes read, 0 seeks
https://example.com/index.m3u8?x=AVCoPj...: Invalid data found when processing input

I tried many versions of ffmpeg and get these results:

ffmpeg-1.0.1-win64-static		Error in the pull function.
ffmpeg-1.2-win64-static			Error in the pull function.
ffmpeg-2.0.1-win64-static		Error in the pull function.
ffmpeg-2.2.3-win64-static		Error in the pull function.
ffmpeg-3.0-win64-static			OK
ffmpeg-3.1.5-win64-static		OK warning...
ffmpeg-3.2.4-win64-static		OK
ffmpeg-3.3.4-win64-static		OK
ffmpeg-3.4.2-win64-static		OK
ffmpeg-4.0.2-win64-static		OK
ffmpeg-4.1.4-win64-static		OK
ffmpeg-4.2.3-win64-static		OK
ffmpeg-4.3-win64-static			Error when loading first segment
ffmpeg-4.3.1-win64-static		Error when loading first segment
ffmpeg-2020-11-18-git-e3081d6f4f	Error when loading first segment

Seem after >=4.3 there is a bug in ffmpeg!

I’m attempting to replicate the «Replay Buffer» feature of OBS, or at least something similar, with FFmpeg. It would seem segmentation and a m3u8 segment list file would be the way of getting something like this to work, but when I try to use the resulting m3u8 file in FFplay or FFmpeg it just throws these errors:

[hls @ 0000013f97f2cc40] Failed to open segment x of playlist x
[hls @ 0000013f97f2cc40] Error when loading first segment 'EL00.ts'
C:UsersgabriVideosFFmpegSegment TestSegmentslist.m3u8: Invalid data found when processing input

Any other issue I can find similar to this online seems to be related to encrypted internet streams, which doesn’t seem to apply in my case… any ideas?

Full log of command that builds the segments and segment list:

PS G:My DriveProgrammingPowershell> ffmpeg -y `
-thread_queue_size 9999 -indexmem 9999 -f dshow -rtbufsize 2147.48M -video_size 1920x1080 -framerate 60 `        
-pixel_format yuv420p -i video="Game Capture HD60 Pro (Video) (#01)":audio="Game Capture HD60 Pro (Audio) (#01)" `
-map 0:0,0:1 -map 0:1 -c:v h264_nvenc -preset: hp -r 60 -rc-lookahead 120 -forced-idr 1 -strict_gop 1 `
-sc_threshold 0 -flags +cgop -force_key_frames "expr:gte(t,n_forced*2)" -pix_fmt yuv420p -b:v 288M -minrate 288M `
-maxrate 288M -bufsize 288M -c:a aac -ar 44100 -b:a 320k -af "aresample=async=250" `
-vsync 1 -max_muxing_queue_size 9999 -f segment -segment_time 10 -segment_wrap 30 `
-segment_list "C:UsersgabriVideosFFmpegSegment TestSegmentslist.m3u8" -segment_list_size 30 `
-reset_timestamps 1 -segment_format_options max_delay=0 "C:UsersgabriVideosFFmpegSegment TestSegmentsEL%02d.ts"
ffmpeg version git-2020-04-03-52523b6 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.1 (GCC) 20200328
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv 
--enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf   
  libavutil      56. 42.102 / 56. 42.102
  libavcodec     58. 77.101 / 58. 77.101
  libavformat    58. 42.100 / 58. 42.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 77.101 /  7. 77.101
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, dshow, from 'video=Game Capture HD60 Pro (Video) (#01):audio=Game Capture HD60 Pro (Audio) (#01)':
  Duration: N/A, start: 428884.260511, bitrate: 1536 kb/s
    Stream #0:0: Video: rawvideo (YV12 / 0x32315659), yuv420p, 1920x1080, 60 fps, 60 tbr, 10000k tbn, 10000k tbc 
    Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 [sync #0:1] (rawvideo (native) -> h264 (h264_nvenc))
  Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
[segment @ 000002267f603200] Opening 'C:UsersgabriVideosFFmpegSegment TestSegmentsEL00.ts' for writing
Output #0, segment, to 'C:UsersgabriVideosFFmpegSegment TestSegmentsEL%02d.ts':
  Metadata:
    encoder         : Lavf58.42.100
    Stream #0:0: Video: h264 (h264_nvenc) (Main), yuv420p, 1920x1080, q=-1--1, 288000 kb/s, 60 fps, 90k tbn, 60 tbc
    Metadata:
      encoder         : Lavc58.77.101 h264_nvenc
    Side data:
      cpb: bitrate max/min/avg: 288000000/0/288000000 buffer size: 288000000 vbv_delay: N/A
    Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp, 320 kb/s
    Metadata:
      encoder         : Lavc58.77.101 aac
[segment @ 000002267f603200] Opening 'C:UsersgabriVideosFFmpegSegment TestSegmentslist.m3u8.tmp' for writing
[segment @ 000002267f603200] Opening 'C:UsersgabriVideosFFmpegSegment TestSegmentsEL01.ts' for writing    
[segment @ 000002267f603200] Opening 'C:UsersgabriVideosFFmpegSegment TestSegmentslist.m3u8.tmp' for writing
[segment @ 000002267f603200] Opening 'C:UsersgabriVideosFFmpegSegment TestSegmentsEL02.ts' for writing
[segment @ 000002267f603200] Opening 'C:UsersgabriVideosFFmpegSegment TestSegmentslist.m3u8.tmp' for writing
[segment @ 000002267f603200] Opening 'C:UsersgabriVideosFFmpegSegment TestSegmentsEL03.ts' for writing    
[segment @ 000002267f603200] Opening 'C:UsersgabriVideosFFmpegSegment TestSegmentslist.m3u8.tmp' for writing
frame= 2336 fps= 60 q=9.0 Lsize=N/A time=00:00:38.91 bitrate=N/A dup=2 drop=0 speed=0.999x    
video:41733kB audio:1522kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[aac @ 000002267f622140] Qavg: 313.398

Full log of command that utilizes the segments and segment list:

PS G:My DriveProgrammingPowershell> ffmpeg -y -i "C:UsersgabriVideosFFmpegSegment TestSegmentslist.m3u8" -c copy `
"C:UsersgabriVideosFFmpegSegment TestReplaysTest.ts"
ffmpeg version git-2020-04-03-52523b6 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.1 (GCC) 20200328
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv 
--enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf   
  libavutil      56. 42.102 / 56. 42.102
  libavcodec     58. 77.101 / 58. 77.101
  libavformat    58. 42.100 / 58. 42.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 77.101 /  7. 77.101
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
[hls @ 0000013f97f2cc40] Skip ('#EXT-X-VERSION:3')
[hls @ 0000013f97f2cc40] Skip ('#EXT-X-ALLOW-CACHE:YES')
[hls @ 0000013f97f2cc40] Opening 'EL00.ts' for reading
[hls @ 0000013f97f2cc40] Failed to open segment 0 of playlist 0
[hls @ 0000013f97f2cc40] Opening 'EL01.ts' for reading
[hls @ 0000013f97f2cc40] Failed to open segment 1 of playlist 0
[hls @ 0000013f97f2cc40] Opening 'EL02.ts' for reading
[hls @ 0000013f97f2cc40] Failed to open segment 2 of playlist 0
[hls @ 0000013f97f2cc40] Opening 'EL03.ts' for reading
[hls @ 0000013f97f2cc40] Failed to open segment 3 of playlist 0
[hls @ 0000013f97f2cc40] Error when loading first segment 'EL00.ts'
C:UsersgabriVideosFFmpegSegment TestSegmentslist.m3u8: Invalid data found when processing input

This is what the m3u8 file looks like:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:11
#EXTINF:10.023222,
EL00.ts
#EXTINF:10.000000,
EL01.ts
#EXTINF:10.000000,
EL02.ts
#EXTINF:8.933333,
EL03.ts
#EXT-X-ENDLIST

@yan12125

sven@linux-etoq:~/ytdl-test> ffmpeg -y -i http://player.ooyala.com/player/ipad/J4NXB4djqiGBj6JAGO_YxRX6KRPdM2Vk_3500.m3u8 -f mp4 -c copy -bsf:a aac_adtstoasc 'London bystanders lift taxi to save woman trapped under wheels-J4NXB4djqiGBj6JAGO_YxRX6KRPdM2Vk.mp4.part'
ffmpeg version 2.7.2 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.8 (SUSE Linux)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables' --optflags='-fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables' --enable-pic --disable-stripping --enable-shared --disable-static --enable-runtime-cpudetect --enable-gpl --disable-openssl --enable-avresample --enable-frei0r --enable-gnutls --enable-libbluray --enable-libcdio --enable-libdc1394 --enable-libfreetype --enable-libgsm --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-pic --enable-pthreads --enable-vaapi --enable-vdpau --disable-encoders --disable-decoders --disable-muxers --disable-demuxers --enable-libschroedinger --enable-encoder=',012v,ansi,apng,bmp,flac,exr,ffv1,ffvhuff,gif,huffyuv,jpegls,libopenjpeg,libtheora,libvpx,pam,pbm,pcx,pgm,png,pgmyuv,ppm,sgi,sunrast,targa,tiff,v210,v308,v408,v410,webp,xbm,xwd,y41p,yuv4,celt,flac,ilbc,opus,pcm_alaw,pcm_bluray,pcm_dvd,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planer,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,speex,libvorbis' --enable-decoder=',012v,ansi,apng,bmp,flac,exr,ffv1,ffvhuff,gif,huffyuv,jpegls,libopenjpeg,libtheora,libvpx,pam,pbm,pcx,pgm,png,pgmyuv,ppm,sgi,sunrast,targa,tiff,v210,v308,v408,v410,webp,xbm,xwd,y41p,yuv4,celt,flac,ilbc,opus,pcm_alaw,pcm_bluray,pcm_dvd,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planer,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,speex,ljpeg,v210x,vorbis,vp3,vp5,vp6,vp6a,vp6f,vp8,vp9,otf,ttf,ass,srt,ssa,text' --enable-muxer='flac,gif,image2,image2pipe,matroska,matroska_audio,null,webm' --enable-demuxer='flac,gif,image2,image2pipe,matroska' --enable-x11grab
  WARNING: library configuration mismatch
  swscale     configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g' --optflags='-fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g' --enable-pic --disable-stripping --enable-shared --disable-static --enable-runtime-cpudetect --enable-gpl --disable-openssl --enable-avresample --enable-frei0r --enable-gnutls --enable-libbluray --enable-libcdio --enable-libdc1394 --enable-libfreetype --enable-libgsm --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-pic --enable-pthreads --enable-vaapi --enable-vdpau --disable-encoders --disable-decoders --disable-muxers --disable-demuxers --enable-libschroedinger --enable-encoder=',012v,ansi,apng,bmp,flac,exr,ffv1,ffvhuff,gif,huffyuv,jpegls,libopenjpeg,libtheora,libvpx,pam,pbm,pcx,pgm,png,pgmyuv,ppm,sgi,sunrast,targa,tiff,v210,v308,v408,v410,webp,xbm,xwd,y41p,yuv4,celt,flac,ilbc,opus,pcm_alaw,pcm_bluray,pcm_dvd,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planer,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,speex,libvorbis' --enable-decoder=',012v,ansi,apng,bmp,flac,exr,ffv1,ffvhuff,gif,huffyuv,jpegls,libopenjpeg,libtheora,libvpx,pam,pbm,pcx,pgm,png,pgmyuv,ppm,sgi,sunrast,targa,tiff,v210,v308,v408,v410,webp,xbm,xwd,y41p,yuv4,celt,flac,ilbc,opus,pcm_alaw,pcm_bluray,pcm_dvd,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planer,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,speex,ljpeg,v210x,vorbis,vp3,vp5,vp6,vp6a,vp6f,vp8,vp9,otf,ttf,ass,srt,ssa,text' --enable-muxer='flac,gif,image2,image2pipe,matroska,matroska_audio,null,webm' --enable-demuxer='flac,gif,image2,image2pipe,matroska' --enable-x11grab
  swresample  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g' --optflags='-fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g' --enable-pic --disable-stripping --enable-shared --disable-static --enable-runtime-cpudetect --enable-gpl --disable-openssl --enable-avresample --enable-frei0r --enable-gnutls --enable-libbluray --enable-libcdio --enable-libdc1394 --enable-libfreetype --enable-libgsm --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-pic --enable-pthreads --enable-vaapi --enable-vdpau --disable-encoders --disable-decoders --disable-muxers --disable-demuxers --enable-libschroedinger --enable-encoder=',012v,ansi,apng,bmp,flac,exr,ffv1,ffvhuff,gif,huffyuv,jpegls,libopenjpeg,libtheora,libvpx,pam,pbm,pcx,pgm,png,pgmyuv,ppm,sgi,sunrast,targa,tiff,v210,v308,v408,v410,webp,xbm,xwd,y41p,yuv4,celt,flac,ilbc,opus,pcm_alaw,pcm_bluray,pcm_dvd,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planer,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,speex,libvorbis' --enable-decoder=',012v,ansi,apng,bmp,flac,exr,ffv1,ffvhuff,gif,huffyuv,jpegls,libopenjpeg,libtheora,libvpx,pam,pbm,pcx,pgm,png,pgmyuv,ppm,sgi,sunrast,targa,tiff,v210,v308,v408,v410,webp,xbm,xwd,y41p,yuv4,celt,flac,ilbc,opus,pcm_alaw,pcm_bluray,pcm_dvd,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planer,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,speex,ljpeg,v210x,vorbis,vp3,vp5,vp6,vp6a,vp6f,vp8,vp9,otf,ttf,ass,srt,ssa,text' --enable-muxer='flac,gif,image2,image2pipe,matroska,matroska_audio,null,webm' --enable-demuxer='flac,gif,image2,image2pipe,matroska' --enable-x11grab
  postproc    configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g' --optflags='-fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g' --enable-pic --disable-stripping --enable-shared --disable-static --enable-runtime-cpudetect --enable-gpl --disable-openssl --enable-avresample --enable-frei0r --enable-gnutls --enable-libbluray --enable-libcdio --enable-libdc1394 --enable-libfreetype --enable-libgsm --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-pic --enable-pthreads --enable-vaapi --enable-vdpau --disable-encoders --disable-decoders --disable-muxers --disable-demuxers --enable-libschroedinger --enable-encoder=',012v,ansi,apng,bmp,flac,exr,ffv1,ffvhuff,gif,huffyuv,jpegls,libopenjpeg,libtheora,libvpx,pam,pbm,pcx,pgm,png,pgmyuv,ppm,sgi,sunrast,targa,tiff,v210,v308,v408,v410,webp,xbm,xwd,y41p,yuv4,celt,flac,ilbc,opus,pcm_alaw,pcm_bluray,pcm_dvd,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planer,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,speex,libvorbis' --enable-decoder=',012v,ansi,apng,bmp,flac,exr,ffv1,ffvhuff,gif,huffyuv,jpegls,libopenjpeg,libtheora,libvpx,pam,pbm,pcx,pgm,png,pgmyuv,ppm,sgi,sunrast,targa,tiff,v210,v308,v408,v410,webp,xbm,xwd,y41p,yuv4,celt,flac,ilbc,opus,pcm_alaw,pcm_bluray,pcm_dvd,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planer,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,speex,ljpeg,v210x,vorbis,vp3,vp5,vp6,vp6a,vp6f,vp8,vp9,otf,ttf,ass,srt,ssa,text' --enable-muxer='flac,gif,image2,image2pipe,matroska,matroska_audio,null,webm' --enable-demuxer='flac,gif,image2,image2pipe,matroska' --enable-x11grab
  libavutil      54. 27.100 / 54. 27.100
  libavcodec     56. 41.100 / 56. 41.100
  libavformat    56. 36.100 / 56. 36.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 16.101 /  5. 16.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.100
  libpostproc    53.  3.100 / 53.  3.100
http://player.ooyala.com/player/ipad/J4NXB4djqiGBj6JAGO_YxRX6KRPdM2Vk_3500.m3u8: Invalid data found when processing input
sven@linux-etoq:~/ytdl-test> ffmpeg -formats
ffmpeg version 2.7.2 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.8 (SUSE Linux)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables' --optflags='-fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables' --enable-pic --disable-stripping --enable-shared --disable-static --enable-runtime-cpudetect --enable-gpl --disable-openssl --enable-avresample --enable-frei0r --enable-gnutls --enable-libbluray --enable-libcdio --enable-libdc1394 --enable-libfreetype --enable-libgsm --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-pic --enable-pthreads --enable-vaapi --enable-vdpau --disable-encoders --disable-decoders --disable-muxers --disable-demuxers --enable-libschroedinger --enable-encoder=',012v,ansi,apng,bmp,flac,exr,ffv1,ffvhuff,gif,huffyuv,jpegls,libopenjpeg,libtheora,libvpx,pam,pbm,pcx,pgm,png,pgmyuv,ppm,sgi,sunrast,targa,tiff,v210,v308,v408,v410,webp,xbm,xwd,y41p,yuv4,celt,flac,ilbc,opus,pcm_alaw,pcm_bluray,pcm_dvd,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planer,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,speex,libvorbis' --enable-decoder=',012v,ansi,apng,bmp,flac,exr,ffv1,ffvhuff,gif,huffyuv,jpegls,libopenjpeg,libtheora,libvpx,pam,pbm,pcx,pgm,png,pgmyuv,ppm,sgi,sunrast,targa,tiff,v210,v308,v408,v410,webp,xbm,xwd,y41p,yuv4,celt,flac,ilbc,opus,pcm_alaw,pcm_bluray,pcm_dvd,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planer,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,speex,ljpeg,v210x,vorbis,vp3,vp5,vp6,vp6a,vp6f,vp8,vp9,otf,ttf,ass,srt,ssa,text' --enable-muxer='flac,gif,image2,image2pipe,matroska,matroska_audio,null,webm' --enable-demuxer='flac,gif,image2,image2pipe,matroska' --enable-x11grab
  WARNING: library configuration mismatch
  swscale     configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g' --optflags='-fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g' --enable-pic --disable-stripping --enable-shared --disable-static --enable-runtime-cpudetect --enable-gpl --disable-openssl --enable-avresample --enable-frei0r --enable-gnutls --enable-libbluray --enable-libcdio --enable-libdc1394 --enable-libfreetype --enable-libgsm --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-pic --enable-pthreads --enable-vaapi --enable-vdpau --disable-encoders --disable-decoders --disable-muxers --disable-demuxers --enable-libschroedinger --enable-encoder=',012v,ansi,apng,bmp,flac,exr,ffv1,ffvhuff,gif,huffyuv,jpegls,libopenjpeg,libtheora,libvpx,pam,pbm,pcx,pgm,png,pgmyuv,ppm,sgi,sunrast,targa,tiff,v210,v308,v408,v410,webp,xbm,xwd,y41p,yuv4,celt,flac,ilbc,opus,pcm_alaw,pcm_bluray,pcm_dvd,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planer,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,speex,libvorbis' --enable-decoder=',012v,ansi,apng,bmp,flac,exr,ffv1,ffvhuff,gif,huffyuv,jpegls,libopenjpeg,libtheora,libvpx,pam,pbm,pcx,pgm,png,pgmyuv,ppm,sgi,sunrast,targa,tiff,v210,v308,v408,v410,webp,xbm,xwd,y41p,yuv4,celt,flac,ilbc,opus,pcm_alaw,pcm_bluray,pcm_dvd,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planer,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,speex,ljpeg,v210x,vorbis,vp3,vp5,vp6,vp6a,vp6f,vp8,vp9,otf,ttf,ass,srt,ssa,text' --enable-muxer='flac,gif,image2,image2pipe,matroska,matroska_audio,null,webm' --enable-demuxer='flac,gif,image2,image2pipe,matroska' --enable-x11grab
  swresample  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g' --optflags='-fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g' --enable-pic --disable-stripping --enable-shared --disable-static --enable-runtime-cpudetect --enable-gpl --disable-openssl --enable-avresample --enable-frei0r --enable-gnutls --enable-libbluray --enable-libcdio --enable-libdc1394 --enable-libfreetype --enable-libgsm --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-pic --enable-pthreads --enable-vaapi --enable-vdpau --disable-encoders --disable-decoders --disable-muxers --disable-demuxers --enable-libschroedinger --enable-encoder=',012v,ansi,apng,bmp,flac,exr,ffv1,ffvhuff,gif,huffyuv,jpegls,libopenjpeg,libtheora,libvpx,pam,pbm,pcx,pgm,png,pgmyuv,ppm,sgi,sunrast,targa,tiff,v210,v308,v408,v410,webp,xbm,xwd,y41p,yuv4,celt,flac,ilbc,opus,pcm_alaw,pcm_bluray,pcm_dvd,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planer,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,speex,libvorbis' --enable-decoder=',012v,ansi,apng,bmp,flac,exr,ffv1,ffvhuff,gif,huffyuv,jpegls,libopenjpeg,libtheora,libvpx,pam,pbm,pcx,pgm,png,pgmyuv,ppm,sgi,sunrast,targa,tiff,v210,v308,v408,v410,webp,xbm,xwd,y41p,yuv4,celt,flac,ilbc,opus,pcm_alaw,pcm_bluray,pcm_dvd,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planer,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,speex,ljpeg,v210x,vorbis,vp3,vp5,vp6,vp6a,vp6f,vp8,vp9,otf,ttf,ass,srt,ssa,text' --enable-muxer='flac,gif,image2,image2pipe,matroska,matroska_audio,null,webm' --enable-demuxer='flac,gif,image2,image2pipe,matroska' --enable-x11grab
  postproc    configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g' --optflags='-fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g' --enable-pic --disable-stripping --enable-shared --disable-static --enable-runtime-cpudetect --enable-gpl --disable-openssl --enable-avresample --enable-frei0r --enable-gnutls --enable-libbluray --enable-libcdio --enable-libdc1394 --enable-libfreetype --enable-libgsm --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-pic --enable-pthreads --enable-vaapi --enable-vdpau --disable-encoders --disable-decoders --disable-muxers --disable-demuxers --enable-libschroedinger --enable-encoder=',012v,ansi,apng,bmp,flac,exr,ffv1,ffvhuff,gif,huffyuv,jpegls,libopenjpeg,libtheora,libvpx,pam,pbm,pcx,pgm,png,pgmyuv,ppm,sgi,sunrast,targa,tiff,v210,v308,v408,v410,webp,xbm,xwd,y41p,yuv4,celt,flac,ilbc,opus,pcm_alaw,pcm_bluray,pcm_dvd,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planer,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,speex,libvorbis' --enable-decoder=',012v,ansi,apng,bmp,flac,exr,ffv1,ffvhuff,gif,huffyuv,jpegls,libopenjpeg,libtheora,libvpx,pam,pbm,pcx,pgm,png,pgmyuv,ppm,sgi,sunrast,targa,tiff,v210,v308,v408,v410,webp,xbm,xwd,y41p,yuv4,celt,flac,ilbc,opus,pcm_alaw,pcm_bluray,pcm_dvd,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_mulaw,pcm_s16be,pcm_s16be_planer,pcm_s16le,pcm_s16le_planar,pcm_s24be,pcm_s24le,pcm_s24le_planar,pcm_s32be,pcm_s32le,pcm_s32le_planar,pcm_s8,pcm_s8_planar,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,speex,ljpeg,v210x,vorbis,vp3,vp5,vp6,vp6a,vp6f,vp8,vp9,otf,ttf,ass,srt,ssa,text' --enable-muxer='flac,gif,image2,image2pipe,matroska,matroska_audio,null,webm' --enable-demuxer='flac,gif,image2,image2pipe,matroska' --enable-x11grab
  libavutil      54. 27.100 / 54. 27.100
  libavcodec     56. 41.100 / 56. 41.100
  libavformat    56. 36.100 / 56. 36.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 16.101 /  5. 16.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.100
  libpostproc    53.  3.100 / 53.  3.100
File formats:
 D. = Demuxing supported
 .E = Muxing supported
 --
 DE alsa            ALSA audio output
 D  asf             ASF (Advanced / Active Streaming Format)
 D  dv              DV (Digital Video)
 D  dv1394          DV1394 A/V grab
 DE fbdev           Linux framebuffer
  E ffm             FFM (FFserver live feed)
 DE flac            raw FLAC
 DE gif             GIF Animation
 DE image2          image2 sequence
 DE image2pipe      piped image2 sequence
 D  jack            JACK Audio Connection Kit
 D  lavfi           Libavfilter virtual input device
 D  libcdio          
 D  libdc1394       dc1394 v.2 A/V grab
  E matroska        Matroska
 D  matroska,webm   Matroska / WebM
 D  mov,mp4,m4a,3gp,3g2,mj2 QuickTime / MOV
 D  mpegts          MPEG-TS (MPEG-2 Transport Stream)
  E null            raw null video
 DE oss             OSS (Open Sound System) playback
 DE pulse           Pulse audio output
 D  rm              RealMedia
 D  rtsp            RTSP input
  E sdl             SDL output device
  E v4l2            Video4Linux2 output device
 D  video4linux2,v4l2 Video4Linux2 device grab
  E webm            WebM
 D  x11grab         X11 screen capture, using XCB

I’m trying to remux a set of encrypted .ts files (as a .m3u8 playlist) into a single .mp4 file with the next command:

"C:Users~Desktoptestffmpeg.exe" -allowed_extensions ALL 
    -i "C:Users~Desktoptestchunklist.m3u8" -c:v copy -c:a copy 
    "C:Users~Desktoptestoutput.mp4"

but getting the

Unable to open key file

error. I tried the URI as “key” with and without quotes as well as the key in hex format but the error is still there… What I’m doing wrong?

Here is the cmd output:

ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
      built with gcc 8.2.1 (GCC) 20181017
      configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
      libavutil      56. 22.100 / 56. 22.100
      libavcodec     58. 35.100 / 58. 35.100
      libavformat    58. 20.100 / 58. 20.100
      libavdevice    58.  5.100 / 58.  5.100
      libavfilter     7. 40.101 /  7. 40.101
      libswscale      5.  3.100 /  5.  3.100
      libswresample   3.  3.100 /  3.  3.100
      libpostproc    55.  3.100 / 55.  3.100
    [hls,applehttp @ 00000215fa3a9f00] Opening 'key' for reading
    Unable to open key file key
    [hls,applehttp @ 00000215fa3a9f00] Opening 'crypto:media_b6000000_0.ts' for reading
    [crypto @ 00000215fa3c6f80] Unable to open resource: media_b6000000_0.ts
    [hls,applehttp @ 00000215fa3a9f00] Failed to open segment 0 of playlist 0
    [hls,applehttp @ 00000215fa3a9f00] Opening 'crypto:media_b6000000_1.ts' for reading
    [crypto @ 00000215fa3c6f80] Unable to open resource: media_b6000000_1.ts
    [hls,applehttp @ 00000215fa3a9f00] Failed to open segment 1 of playlist 0
    [hls,applehttp @ 00000215fa3a9f00] Opening 'crypto:media_b6000000_2.ts' for reading
    [crypto @ 00000215fa3c6f00] Unable to open resource: media_b6000000_2.ts
    [hls,applehttp @ 00000215fa3a9f00] Failed to open segment 2 of playlist 0
    [hls,applehttp @ 00000215fa3a9f00] Error when loading first segment 'media_b6000000_0.ts'
    C:Users~Desktoptestchunklist.m3u8: Invalid data found when processing input

The files I’m working with are in the test.zip archive.

(The original playlist has more .ts files but I’ve included only first three, it shouldn’t matter anyway).

Any help will be appreciated. Thanks!

OpenLiveStream() and m3u8 streams.

Posts: 1,603

Joined: Jul 2012

Reputation:
52

pvr.nextpvr uses  XBMC->OpenFile() to read http streams to ts data and it works fine, however when I pass an m3u8 (which is the NextPVR transcoded interface returning HLS application/x-mpegURL files) the stream immediately fails

2020-01-08 15:05:27.593 T:12628   DEBUG: Thread FileCache start, auto delete: false
2020-01-08 15:05:27.593 T:12628    INFO: CFileCache:Tonguerocess — Source read didn’t return any data! Hit eof(?)
2020-01-08 15:05:27.644 T:9448   DEBUG: ffmpeg[24E8]: [mpegts] Could not detect TS packet size, defaulting to non-FEC/DVHS

I am assuming this is because it doesn’t know how to read m3u8 files.  Are there are parameters that can be passed or appended to the stream to assist. I tried |reconnect=1  etc don’t seem to change the parameters.

I did see that pvr.iptvsimple has some logic to help set stream properties https://github.com/kodi-pvr/pvr.iptvsimp…t.cpp#L241  but it not clear what documentation I need to read to use those properties.

Thanks,

Martin

Posts: 1,603

Joined: Jul 2012

Reputation:
52


2020-01-09, 04:26
(This post was last modified: 2020-01-09, 04:38 by emveepee.)

I believe the issue might be related to the relative links  in the m3u8 file being returned

Code:

#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:3.003000,
../temp/CNN-18544c1ac8d14f5f8ec0359bb2a91a510.ts?sid=8a3195b0a8f749e996ebbe8eeb30abdd
#EXTINF:3.003000,
../temp/CNN-18544c1ac8d14f5f8ec0359bb2a91a511.ts?sid=8a3195b0a8f749e996ebbe8eeb30abdd
#EXTINF:3.003000,
../temp/CNN-18544c1ac8d14f5f8ec0359bb2a91a512.ts?sid=8a3195b0a8f749e996ebbe8eeb30abdd
#EXTINF:3.003000,
../temp/CNN-18544c1ac8d14f5f8ec0359bb2a91a513.ts?sid=8a3195b0a8f749e996ebbe8eeb30abdd

Instead of calling the source base URL as expected (which works via python)

‘http://172.16.3.105:8866/temp/CNN-18544c1ac8d14f5f8ec0359bb2a91a510.ts?sid=8a3195b0a8f749e996ebbe8eeb30abdd’

it is calling

2020-01-08 21:09:46.085 T:4852   ERROR: ffmpeg[12F4]: [hls,applehttp] Error when loading first segment ‘pvr://channels/tv/temp//CNN-18544c1ac8d14f5f8ec0359bb2a91a510.ts?sid=8a3195b0a8f749e996ebbe8eeb30abdd’

Is there a method I can use to have this function open a ts stream from a relative URL? 

It isn’t just the NextPVR m3u8, any m3u8 file that has segments not starting with http seem to have this issue.  If I pass an m3u8 with an absolute reference it works.

Martin

Posts: 1,603

Joined: Jul 2012

Reputation:
52


2020-01-09, 18:01
(This post was last modified: 2020-01-10, 03:14 by emveepee.)

So comparing with detailed logging  if I hardcode an m3u8 that has  absolute links in OpenLiveStream() it works.   I guess there is no way to pass back the base url to get this too work.

Code:

2020-01-09 10:14:19.583 T:17052   DEBUG: ffmpeg[429C]: Probing hls,applehttp score:100 size:2048
2020-01-09 10:14:19.583 T:17052   DEBUG: ffmpeg[429C]: Format hls,applehttp probed with size=2048 and score=100
2020-01-09 10:14:19.583 T:17052   DEBUG: CDVDDemuxFFmpeg::Open - probing detected format [hls,applehttp]
.....
2020-01-09 10:14:20.171 T:17052   DEBUG: ffmpeg[429C]: [hls,applehttp] new_program: id=0x0000
2020-01-09 10:14:20.171 T:17052   DEBUG: ffmpeg[429C]: [hls,applehttp] HLS request for url 'https://videos-hwcdn.wurl.com/39236121/hls/1200-00086.ts', offset 0, playlist 0
2020-01-09 10:14:20.171 T:17052    INFO: ffmpeg[429C]: [hls,applehttp] Opening 'https://videos-hwcdn.wurl.com/39236121/hls/1200-00086.ts' for reading
2020-01-09 10:14:20.171 T:17052   DEBUG: ffmpeg[429C]: [https] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
2020-01-09 10:14:20.496 T:17052   DEBUG: ffmpeg[429C]: [https] request: GET /39236121/hls/1200-00086.ts HTTP/1.1
...
2020-01-09 10:14:22.277 T:17052   DEBUG: CDVDDemuxFFmpeg::Open - av_find_stream_info finished
2020-01-09 10:14:22.277 T:17052    INFO: ffmpeg[429C]: Input #0, hls,applehttp, from 'pvr://channels/tv/All channels/pvr.nextpvr_9549.pvr':

2020-01-09 10:08:07.955 T:12256   DEBUG: ffmpeg[2FE0]: Probing hls,applehttp score:100 size:177
2020-01-09 10:08:07.955 T:12256   DEBUG: ffmpeg[2FE0]: Format hls,applehttp probed with size=2048 and score=100
2020-01-09 10:08:07.955 T:12256   DEBUG: CDVDDemuxFFmpeg::Open - probing detected format [hls,applehttp]
2020-01-09 10:08:07.955 T:12256   DEBUG: ffmpeg[2FE0]: [hls,applehttp] new_program: id=0x0000
2020-01-09 10:08:07.955 T:12256   DEBUG: ffmpeg[2FE0]: [hls,applehttp] HLS request for url 'pvr://channels/tv/temp/CNN-552a61dc8a6c43cc8aed1ca541233a0a0.ts?sid=d066d4025f744da298a36021a09404be', offset 0, playlist 0
2020-01-09 10:08:07.955 T:12256   DEBUG: ffmpeg[2FE0]: [hls,applehttp] Failed to open segment 0 of playlist 0
2020-01-09 10:08:16.303 T:12256   DEBUG: ffmpeg[2FE0]: [hls,applehttp] Opening 'pvr://channels/tv/All channels/pvr.nextpvr_9549.pvr' for reading
2020-01-09 10:08:16.303 T:12256   DEBUG: ffmpeg[2FE0]: [hls,applehttp] Failed to reload playlist 0
2020-01-09 10:08:16.303 T:12256   ERROR: ffmpeg[2FE0]: [hls,applehttp] Error when loading first segment 'pvr://channels/tv/temp/CNN-552a61dc8a6c43cc8aed1ca541233a0a0.ts?sid=d066d4025f744da298a36021a09404be'
2020-01-09 10:08:16.303 T:12256   ERROR: CDVDDemuxFFmpeg::Open - Error, could not open file pvr://channels/tv/All channels/pvr.nextpvr_9549.pvr
2020-01-09 10:08:16.304 T:12256   ERROR: CDVDDemuxFFmpeg::Open - error probing input format, pvr://channels/tv/All channels/pvr.nextpvr_9549.pvr

Martin

Posts: 1,603

Joined: Jul 2012

Reputation:
52

I think the only way I can do this is to send the m3u8 in properties similar to pvr.iptvsimple and provide two logic paths.  It is a pain because there is no Close()  method where I can tell the backend to stop transcoding and it looks like the m3u8 file keeps being streamed as I change channels.

Alternate solutions are welcome.

Martin

@@softworkz

I want to create a new Emby plugin. But before i spend my time into coding something that will not work, i’m evaluating what’s possible in Emby.

The plugin will take a m3u playlist as input file, so for testing purposes i’m utilizing the IPTV plugin to verify playback.

Unfortunately this doesn’t work. I only get errors in Emby’s log. If i use the command line from the log in a command window i get this:

C:UsersAdministrator>D:Embysystemffprobe.exe -i file:"D:Embyprogramdatapluginschannel.m3u" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format -show_data
ffprobe version 4.0.3-emby_2019_04_09-g5abbb1430d+449 Copyright (c) 2007-2018 the FFmpeg developers and softworkz for Emby LLC
  built with gcc 8.3.0 (Rev2, Built by MSYS2 project)
{
[hls,applehttp @ 000001aa656c0400] Opening 'http://localhost:8096/emby/Videos/498/stream?static=true&api_key=b7a75a5091f7414fbcaca593f5659535' for reading
[http @ 000001aa656ca080] Protocol 'http' not on whitelist 'file,crypto'!
[hls,applehttp @ 000001aa656c0400] Failed to open segment 0 of playlist 0
[hls,applehttp @ 000001aa656c0400] Error when loading first segment 'http://localhost:8096/emby/Videos/498/stream?static=true&api_key=123456789'
file:D:Embyprogramdatapluginschannel.m3u: Invalid data found when processing input

}

This error can be solved by putting a whitelist parameter before the input parameter:

D:Embysystemffprobe.exe -protocol_whitelist "file,http,https,tcp,tls" -i file:"D:Embyprogramdatapluginschannel.m3u" -threads 0 -v info -print_format json -show_streams -show_chapters -show_format -show_data

I don’t know, maybe it’s also possible to compile ffprobe with the witelist already included.

The same also happens with ffmpeg, but there’s also another error:

C:UsersAdministrator>D:Embysystemffmpeg.exe -f m3u -i file:"D:Embyprogramdatapluginschannel.m3u" -map_metadata -1 -map_chapters -1 -threads 1 -sn -c:v:0 libx264 -pix_fmt yuv420p  -maxrate 139808000 -bufsize 279616000 -preset veryfast -profile:v:0 high -level:v:0 4.1 -crf 23 -x264opts:0 subme=0:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=none -force_key_frames "expr:gte(t,n_forced*3)" -vsync -1 -codec:a:0 libmp3lame -disposition:a:0 default -ac:a:0 2 -ab:a:0 192000  -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 3  -individual_header_trailer 0 -segment_format mpegts -segment_write_temp 1 -segment_list_entry_prefix "hls/389eb89f812f025dcff2e0c8f0ec3ff0/" -segment_list_type m3u8 -segment_start_number 0 -segment_list "D:Embyprogramdatatranscoding-temp389eb89f812f025dcff2e0c8f0ec3ff0.m3u8" -y "D:Embyprogramdatatranscoding-temp389eb89f812f025dcff2e0c8f0ec3ff0%d.ts"
ffmpeg version 4.0.3-emby_2019_04_09-g5abbb1430d+449 Copyright (c) 2000-2018 the FFmpeg developers and softworkz for Emby LLC
  built with gcc 8.3.0 (Rev2, Built by MSYS2 project)
Local Time: 17:49:21
T=0.000s
T=0.031s
Unknown input format: 'm3u'

So either you omit the -f parameter when the file extension is m3u or m3u8, or you use -f hls.

@@Luke

Can you please make the existing entries in the configuration screen of the IPTV plugin editable?

Right now one has to delete «false» entries and start from scratch.

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Ffmpeg error splitting the input into nal units
  • Fix origin not installed error 14 1
  • Fix minecraft tlauncher an error occurred while uploading files common reasons in windows pc
  • Fix issue that system will show smart command error when using some wd hdd
  • Fix by nesting warp stabilizer как исправить

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии