Srh
Srh

Reputation: 109

FFMPEG - convert video without losing resolution

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

Upvotes: 10

Views: 27528

Answers (3)

jrkt
jrkt

Reputation: 2715

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

Upvotes: 10

Mauricio Luis
Mauricio Luis

Reputation: 43

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

Upvotes: 1

ACz
ACz

Reputation: 31

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

Upvotes: 3

Related Questions