0

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\~\Desktop\test\ffmpeg.exe" -allowed_extensions ALL \
    -i "C:\Users\~\Desktop\test\chunklist.m3u8" -c:v copy -c:a copy \
    "C:\Users\~\Desktop\test\output.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\~\Desktop\test\chunklist.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!

1 Answer 1

0

Ok, looks like I solved the problem... Basically, I used relative paths in a couple of places where I should have used absolute ones instead.

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.