FFmpeg on iPhone - Modifying Video Orientation

前端 未结 4 1739
长发绾君心
长发绾君心 2020-12-03 09:25

I\'m messing with h264 videos loaded with FFmpeg on the iPhone 3GS. The problem is any videos recorded in \"Portrait\" orientation have a transformation matrix applied to th

4条回答
  •  不思量自难忘°
    2020-12-03 09:44

    Portrait video recorded in iPhone 3GS is strangely rotated in landscape, and only quicktime plays it correctly, players like VLC etc play the portrait mode videos in landscape because it is encoded that way! Maybe apple have set some bit so that quicktime identifies and sets the orientation properly.

    You can use -vfilters option of ffmpeg to rotate the video. It is available in version r21242. You have to patch it on your version of ffmpeg.

    configure the build by using --enable-vfilters

    and you can use the option:

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

    to rotate the input movie.

提交回复
热议问题