I am using ffmpeg to convert mp4 video from youtube. The video is HD开发者_JAVA百科 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
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
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
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
精彩评论