Rotate mp4 videos without re-encoding

前端 未结 5 694
渐次进展
渐次进展 2020-12-07 08:04

I\'m looking for a way to rotate videos shot with my Nexus 4 on my Debian Wheezy sytem. The videos are shot in portrait mode and I would like to rotate them to landscape mod

5条回答
  •  眼角桃花
    2020-12-07 08:41

    This answer is simply a summary of the comments provided by LordNeckbeard.

    Rotating without encoding

    Rotating without re-encoding is not possible unless:

    • your input is MJPEG
    • you rotate upon playback

    Rotate with encoding using the correct ffmpeg

    To correctly understand the steps needed to this, one should start by reading or at least skimming this question:

    What are the differences and similarities between ffmpeg, libav, and avconv?

    Summary: avconv is a fork of ffmpeg, debian maintainer chose avconv, you have to compile the correct ffmpeg from source.

    The next step would be compiling the correct ffmpeg from source as is detailed here:

    Compilation guide of ffmpeg for Debian

    The final step is using the commands found in other posts:

    How to flip a video 180° (vertical/upside down) with FFmpeg? or Rotating videos with FFmpeg

    Summary: ffmpeg -vfilters "rotate=90" -i input.mp4 output.mp4

提交回复
热议问题