I use ffmpeg to convert file .mp4 into file hls(.m3u8). But i meet problem when i want add key to file. I run command in the directory. Folder include:
File "file.keyinfo":
file.key ./file.key 9e1c83a7e2d04fe930cce5c8ef5c5bd0
File file.key
After that i run command: ffmpeg -i 123_namhh.mp4 -hls_time 10 -hls_key_info_file file.keyinfo out.m3u8
Unrecognized option 'hls_key_info_file'. Error splitting the argument list: Option not found
*My ffmpeg's version:
ffmpeg version 2.6.8 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)
My OS : CentOS 7
Please help me how to solve this problem.Thanks!
Your ffmpeg
is too old. See the FFmpeg Download page for links to already compiled ffmpeg
builds for Linux, macOS, or Windows. Or follow a compile guide.
For Linux, if you downloaded or compiled, and you want the new ffmpeg
binary to be in your PATH
(to make it the default "ffmpeg
"), you can place it in /usr/local/bin
. Alternatively, for Debian/Ubuntu & CentOS, you can place it in ~/bin
, then log out/in or run source ~/.profile
. Now when you run the ffmpeg
command it should use the new version.