ffmpeg how to allow a file extension

Juddy picture Juddy · Jun 11, 2017 · Viewed 8.6k times · Source

New ffmpeg version check for file extension due to security issue in ffmpeg.org that use #EXT-X-KEY:METHOD=AES-128

since the key usually doesn't use file extension or use *.key extension so example

ffmpeg -i "C:\streamingtest.m3u8" -c copy "test.ts"

inside the m3u8 I have :

#EXT-X-KEY:METHOD=AES-128,URI="C:/keytest.key"

And ffmpeg will spew an error

[hls,applehttp @ 0000000000dc6460] Filename extension of 'C:/keytest.key' is not a common multimedia extension, blocked for security reasons. If you wish to override this adjust allowed_extensions, you can set it to 'ALL' to allow all Unable to open key file c:/keytest.key

But it doesn't explain how to use the ALL options in allowed_extensions

So how do i allow key extension in ffmpeg or allow all extension

Thanks

Answer

Gyan picture Gyan · Jun 11, 2017

It's a private option of the HLS demuxer, so

ffmpeg -allowed_extensions ALL -i "C:\streamingtest.m3u8" -c copy "test.ts"