[FFmpeg-user] Rotating webm videos

Michael Koch astroelectronic at t-online.de
Sat Mar 23 13:10:31 EET 2019


Am 23.03.2019 um 12:00 schrieb Rex East:
> On Sat, Mar 23, 2019 at 7:46 PM Michael Koch
> <astroelectronic at t-online.de> wrote:
>> As far as I know, rotating without re-encoding isn't possible. Try this:
>>
>> ffmpeg -i input.webm -vf rotate=PI/2 output.webm
>>
> Thank you Michael for the reply and information.
>
> However, that command resulted in the video being cropped to a square
> (original video is in portrait mode), and there is still significant
> quality loss...

then you could pad the video before applying the rotate filter, and crop 
it after the rotate filter:

-vf pad=iw:iw:-1:-1,rotate=PI/2,crop=xxx:ih
where xxx is the height of the input video

I'm not familiar with *.webm format. May be there are encoder options 
for better quality.

Michael



More information about the ffmpeg-user mailing list