FFMPEG - convert video without loss of resolution

I use ffmpeg to convert mp4 video from youtube. HD 1080 movie. When I convert it to mpeg2video, the video loses its sharpness, regardless of the -s 1920x1080 . How to convert video without loss of image clarity? The command I use:

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

+6
source share
3 answers

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

This will make your new team as follows:

 ffmpeg -i BBB.mp4 -vcodec mpeg2video -s1920x1080 -q:v 1 -acodec copy -f mpegts BBB.ts 
+4
source

Or try setting any bitrate that you think is acceptable:

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

mp4-> mpeg2 = transcoding

+3
source

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

Example:

 ffmpeg -i BBB.mp4 -vcodec mpeg2video -s 1920x1080 **-sameq** -acodec copy -f mpegts BBB.ts 
+2
source

Source: https://habr.com/ru/post/891526/


All Articles