1

I get the following error when I try to open a playlist with FFmpeg:

ffmpeg version 2023-03-05-git-912ac82a3c-essentials_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12.2.0 (Rev10, 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-bzlib --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --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-libvpl --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
  libavutil      58.  3.100 / 58.  3.100
  libavcodec     60.  6.100 / 60.  6.100
  libavformat    60.  4.100 / 60.  4.100
  libavdevice    60.  2.100 / 60.  2.100
  libavfilter     9.  4.100 /  9.  4.100
  libswscale      7.  2.100 /  7.  2.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
playlist.m3u8: Invalid data found when processing input

Command I use:

ffmpeg [-allowed_extensions ALL] [-protocol_whitelist file,http,https,tcp,tls,crypto] -i playlist.m3u8 -c copy -report playlist.mp4

Playlist file:

#EXTM3U
#EXTINF:-1,0
https://20230515.s3.eu-central-1.amazonaws.com/output0000f.mp4
#EXTINF:-1,1
https://20230515.s3.eu-central-1.amazonaws.com/output0001f.mp4
#EXTINF:-1,2
https://20230515.s3.eu-central-1.amazonaws.com/output0002f.mp4

The playlist plays fine in VLC player

Report:

ffmpeg started on 2023-05-15 at 13:23:08
Report written to "ffmpeg-20230515-132308.log"
Log level: 48
Command line:
"F:\\Applications\\ffmpeg-2023-03-05-git-912ac82a3c-essentials_build\\ffmpeg-2023-03-05-git-912ac82a3c-essentials_build\\bin\\ffmpeg.exe" -allowed_extensions ALL -i playlist.m3u8 -c copy -report playlist.mp4
ffmpeg version 2023-03-05-git-912ac82a3c-essentials_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12.2.0 (Rev10, 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-bzlib --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --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-libvpl --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
  libavutil      58.  3.100 / 58.  3.100
  libavcodec     60.  6.100 / 60.  6.100
  libavformat    60.  4.100 / 60.  4.100
  libavdevice    60.  2.100 / 60.  2.100
  libavfilter     9.  4.100 /  9.  4.100
  libswscale      7.  2.100 /  7.  2.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
Splitting the commandline.
Reading option '-allowed_extensions' ... matched as AVOption 'allowed_extensions' with argument 'ALL'.
Reading option '-protocol_whitelist' ... matched as AVOption 'protocol_whitelist' with argument 'file,http,https,tcp,tls,crypt'.
Reading option '-i' ... matched as input url with argument 'playlist.m3u8'.
Reading option '-c' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Reading option 'playlist.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url playlist.m3u8.
Successfully parsed a group of options.
Opening an input file: playlist.m3u8.
[NULL @ 00000256fef51600] Opening 'playlist.m3u8' for reading
[AVIOContext @ 00000256fef59fc0] Statistics: 249 bytes read, 0 seeks
playlist.m3u8: Invalid data found when processing input
0

1 Answer 1

1

FFmpeg requires one of the following 3 tags to immediately follow #EXTM3U at the beginning.

#EXT-X-STREAM-INF 
#EXT-X-TARGETDURATION
#EXT-X-MEDIA-SEQUENCE

You can work around the probe failure by adding -f hls before -i.

Also, #EXTINF values should be non-negative, which is not the case here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.