Author Topic: Rotation gets lost with copy mode  (Read 1683 times)


  • Newbie
  • *
  • Posts: 1
Rotation gets lost with copy mode
« on: August 04, 2016, 05:33:37 AM »
I find it very cool that avidemux can cut mp4 videos from mobile phone very fast in copy mode! But there seems to be a flaw with the rotation flag in the video. I have some videos where the phone had been turned when recording (90°, 180°, 270°). When I look at those in windows-mediaplayer (win10), they are displayed like they should: floor at the bottom sky at the top (there seems to be kind of flag that the phone sets in the movie, to enable an auto rotation by player software). When I look at those in avidemux, they are displayed wrongly (floor at the top e.g.), when I cut them and save to a new file, the file is displayed wrongly in every player software. I know I could add a filter for rotation, but then it needs to be reencoded (not copy mode), which takes longer and could lead to quality loss.
Is there a way to overcome this? Or could you implement an improvement, so that the flag is maintained in the output file?
Thank you anyway for your great software!

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 5888
Re: Rotation gets lost with copy mode
« Reply #1 on: August 04, 2016, 05:51:14 AM »
Without re-encoding, you could try with a recent ffmpeg:
Code: [Select]
ffmpeg -i input.mp4 -metadata:s:v rotate="90" -codec copy output.mp4
rotate =
  0 = landscape
 90 = portrait
180 = landscape upsidedown
270 = portrait  upsidedown

I've not tested this procedure, the player software needs to support metadata 'rotate' to.
« Last Edit: August 04, 2016, 07:09:55 AM by Jan Gruuthuse »


  • Hero Member
  • *****
  • Posts: 622
Re: Rotation gets lost with copy mode
« Reply #2 on: August 04, 2016, 06:42:10 AM »
I may be wrong, but the only flags I know in Avidemux are the audio shift and the display width with mkv containers.