[FFmpeg-user] hflip so slooooooooow

Moritz Barsnick barsnick at gmx.net
Fri Mar 3 10:06:22 EET 2017

On Thu, Mar 02, 2017 at 18:39:16 -0700, JD wrote:
> Hi all, should horizontal flipping be as slow as this:
> frame=27067 fps= 12 q=28.0 size=  143993kB time=00:18:06.27
> bitrate=1085.9kbits/s dup=0 drop=35 speed=0.47x

How do these numbers compare to when you omit the filter?

> the command was:
> $ ~/bin/ffmpeg.d/ffmpeg -i video_mnt13.mp4  -vf "hflip" -y
> video_mnt13-hflip-m1B6z-54q_0.mp4
> ffmpeg version 3.2.4-static http://johnvansickle.com/ffmpeg/  Copyright (c)
> 2000-2017 the FFmpeg developers   built with gcc 5.4.1 (Debian 5.4.1-5)
> 20170205

The complete, uncut console output is much more practical for us.

> how can I speed it up? (I thought that flipping should not need
> transcoding)???

Using filters in ffmpeg always requires re-encoding. Furthermore, I'm
not aware that "mp4" (we don't even know which [input] codec you used,
because you didn't show us the complete, uncut console output), or
rather the common codecs such as mpeg4 of h264, support lossless
rotation or flipping. JPEG (and as such probably Motion JPEG) does
allow that under certain constraints. ffmpeg doesn't support it for
those though, and if it did, that would be a so-called "bitstream
filter" ("-bsf:v").


More information about the ffmpeg-user mailing list