简体   繁体   中英

Use ffmpeg to flip mp4 video horizontally without losing quality, and inceasing file size (too much)

As the title says, I want to flip an mp4 video horizontally, without losing quality, and without increasing the file size (if possible). Apparently due to having to re-encode, the file size will increase no matter what.

My current command is something like:

ffmpeg -i input.mp4 -vf hflip -qscale 0 -c:a copy output.mp4

Technically, not possible. Filtering requires encoding. When using lossy encoders you lose quality and have generation loss . Best you can do is provide a quality level or bitrate that provides an acceptable tradeoff between quality loss and file size. Assuming you are encoding with libx264 see FFmpeg Wiki: H.264 for detailed instructions.

One method to keep quality and file size is flipping during playback, but I doubt that is an acceptable solution:

ffplay -vf hflip input.mp4

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM