I'm trying to rotate mp4 videos with ffmpeg. Couple of videos succesfuly rotated but one. The problem is audio out sync for entire video. I also used an ios app which was succesful to rotate. Have any idea what's wrong?

This is the code i've used for:

ffmpeg -i input.mp4 -vf "transpose=1, fps=30" -vcodec libx265 -crf 10 -acodec copy output.mp4

Other codes that i've used were also gave me same result:

ffmpeg -i input.mp4 -vf "transpose=1, fps=30" -vcodec libx264 -acodec copy output.mp4
ffmpeg -i input.mp4 -vf "transpose=1" output.mp4
ffmpeg -i input.mp4 -vf "transpose=1, fps=30" -acodec copy output.mp4
ffmpeg -i input.mp4 -vf "transpose=1" -crf 10 -b:v 600k output.mp4


ffmpeg 2.6.8

I think problem is the youtube-dl, This is the video i'm trying to rotate: https://www.pscp.tv/22dakika/1ZkKzlXkOMoJv


The problem was a broken video. I removed the first 30 secs of the video. After that, rotation process gave me a succesful output.

1 Answer 1


Update your ffmpeg and then run:

ffmpeg -i input.mp4 -c:a copy output.mp4

It will automatically properly rotate the video.

  • Version 3.2.4 Version git-2017-01-22-f1214ad are both not worked
    – Ozan Temel
    Apr 17, 2017 at 7:21
  • I've tried version 3.3. it wasn't worked also. all 3 versions gave me same result, which is a video hasn't rotated.
    – Ozan Temel
    Apr 17, 2017 at 8:19
  • @OzanTemel Can you show your command and the resulting, complete console output? You can edit your question with this info.
    – llogan
    Apr 17, 2017 at 17:49
  • Logs aren't available yet but i've added the video link. When i tried to download with youtube-dl i think packets have lost. That could be the reason why ffmpeg can't rotate succesfully
    – Ozan Temel
    Apr 20, 2017 at 8:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.