Have many videos different videos of different format and quality in which i need to add small amount of text.

What command should i use to get same file format/quality for output as it was for input ?

  • What are the different formats you have?
    – Gyan
    Jan 27, 2016 at 5:14
  • .mpg and .mp4. What other data you need ? All are prepared for broadcasting, but some are made long time ago. Visually there is huge difference betwean old and new ones. I do not mind that as long as after i export them, their quality wont be lower then input. Will be broadcasted on cable TV.
    – Azz Kawa
    Jan 27, 2016 at 6:46

1 Answer 1


Since these are for broadcast play-out over local storage, these commands are biased towards quality and away from filesize.

For MP4s:

ffmpeg -i input.mp4 -vf "text filters here" -c:v libx264 -crf 8 -c:a copy -map 0 -movflags +faststart output.mp4

For MPGs:

ffmpeg -i input.mpg -vf "text filters here" -c:v mpeg2video -q:v 2 -c:a copy -map 0 output.mpg
  • I have moved comments to chat as it was getting too verbose. The old chat is also here.
    – AJ Henderson
    Jan 30, 2016 at 6:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.