Avconv Unknown Encoder 'Libx264' I Try All Solution but Not Working

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.mp4

Can 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:

Then run:

ffmpeg -i input.mp4 -c:v libx264 -filter:v subtitles=1.srt -c:a copy output.mp4

See FFmpeg Wiki: H.264 to see how to control quality (-crf) and encoding speed (-preset).

4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest