avconv Unknown encoder 'libx264' i try all solution but not working
Andrew Henderson
I have this problem with avconv:
Unknown encoder 'libx264'For adding subtitle I use:
avconv -i video.mp4 -map 0:0 -map 0:1 -c:v libx264 -aspect 16:9 -q:v 1 -b:v 512k -strict -2 -c:a aac -ac 2 -filter:v subtitles=1.srt Video_With-Subtitle.mp4Can you give me solution, and what is best solution for burn subtitle fast on Ubuntu 16.04 or 18.04?
1 Answer
Use ffmpeg
avconv is not the same as ffmpeg, and avconv does not have the subtitles filter.
Solutions:
- 16.04 and 18.04 have
ffmpegin the repo. Install withsudo apt install ffmpeg, or - Download an already compiled
ffmpegand put it in/usr/local/binor~/bin, or - Follow FFmpeg Wiki: How to Compile and Install ffmpeg on Ubuntu.
Then run:
ffmpeg -i input.mp4 -c:v libx264 -filter:v subtitles=1.srt -c:a copy output.mp4See FFmpeg Wiki: H.264 to see how to control quality (-crf) and encoding speed (-preset).