10

I am using ffmpeg to convert mp4 video from youtube. The video is HD 1080. When I convert it to mpeg2video, the video loses its sharpness, regardless of the -s 1920x1080 parameter. How can I convert the video without losing picture sharpness? The command I use is:

ffmpeg -i BBB.mp4 -vcodec mpeg2video -s1920x1080 -acodec copy -f mpegts BBB.ts

3 Answers 3

9

The best way to make sure your images are the same quality as they are before conversion, add -q:v 1. q is quality, v is for video, 1 is for the quality between 1-35, the lowest being the best quality.

That would make your new command as follows:

ffmpeg -i BBB.mp4 -vcodec mpeg2video -s 1920x1080 -q:v 1 -acodec copy -f mpegts BBB.ts
3

Or try setting whatever bitrate you find acceptable:

ffmpeg -i BBB.mp4 -vcodec mpeg2video -b 4000000 -s 1920x1080 -acodec copy -f mpegts BBB.ts

mp4->mpeg2 = transcoding

1

Use the -sameq tag for the final video to follow the same quality of the source.

Example:

ffmpeg -i BBB.mp4 -vcodec mpeg2video -s 1920x1080 **-sameq** -acodec copy -f mpegts BBB.ts
5
  • It seems that -sameq will transcode the file nevertheless. You'll know if your CPU usage will be 100% during the process. Jul 1, 2011 at 13:02
  • 10
    -sameq means "same quantizer", not same quality. From FFMPEG Dec 28, 2012 at 17:51
  • 7
    Current ffmpeg 2.1.3 complains about -sameq: Option 'sameq' was removed. If you are looking for an option to preserve the quality (which is not what -sameq was for), use -qscale 0 or an equivalent quality factor option. Feb 18, 2014 at 11:42
  • 1
    sameq is no more available and it NEVER meant same quality Jun 25, 2020 at 9:09
  • Madness to convert a video from mp4 to ts -- the only way to preserve picture quality is to retain it in mp4 format (the ts format is inferior to mp4 in my experience), or to covert from mp4 to mkv which has an improved quality compared to mp4.
    – Ed999
    Sep 27, 2020 at 22:48

Your Answer

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

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