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

<p>For MP4s:</p>

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

<p>For MPGs:</p>

<pre><code>ffmpeg -i input.mpg -vf "text filters here" -c:v mpeg2video -q:v 2 -c:a copy -map 0 output.mpg
</code></pre>

CC BY-SA 3.0
2016-01-30T06:41:17.647Z
I have moved comments [to chat](http://chat.stackexchange.com/rooms/35058/discussion-on-answer-by-mulvya-output-format-and-quality-to-be-same-as-input) as it was getting too verbose.  The old chat is also [here](http://chat.stackexchange.com/rooms/35023/discussion-between-bigbrother2010-and-mulvya).
AJ Henderson
CC BY-SA 3.0
2016-01-27T07:23:30.203Z
2016-01-27T07:23:30.203Z
Gyan
<p>Have many videos different videos of different format and quality in which i need to add small amount of text.</p>

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

CC BY-SA 3.0
2016-01-27T05:14:14.897Z
What are the different formats you have?
Gyan
CC BY-SA 3.0
2016-01-27T06:46:35.700Z
.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
<ffmpeg>
Output format and quality to be same as input
Azz Kawa
# Output format and quality to be same as input

(Asked by: username_0 on 2016-01-26)

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 ?

**Tags:** ffmpeg

> **Comments:**
> **username_1**: What are the different formats you have?  
> **username_0**: .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.  

---

## 1 answers

### Answer by username_1 on 2016-01-27. Score: 1 | Accepted answer

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

> **Comments:**
> **username_2**: I have moved comments [to chat](http://chat.stackexchange.com/rooms/35058/discussion-on-answer-by-mulvya-output-format-and-quality-to-be-same-as-input) as it was getting too verbose.  The old chat is also [here](http://chat.stackexchange.com/rooms/35023/discussion-between-bigbrother2010-and-mulvya).  

---

