2

I have many videos taken from Nokia N73 that are getting played on my laptop (after transferring from phone to laptop) horizontally. How to make them play vertically.

I have read this link. but the issue is this link talks of mp4 file & mine is avi.

Regarding my mp4 video file I ran:

ffmpeg -i infile.mp4 -vf "transpose=1" -an -vcodec mpeg4 outfile.mp4

It worked for mp4 but I lost my sound from the video. Also after getting rotated, the area on screen on which the video is running has shrinked (one can call it frame size or so). Now it has become more narrow vertically. Is this how it will be?

6

You probably want to use -acodec copy to copy the original audio, instead of -an:

# Adjust vcodec/crf as desired
ffmpeg -i infile.mp4 -vf "transpose=1" -acodec copy -vcodec h264 -crf 23 outfile.mp4
  • It has worked with this note: My original file is 26.2 MB & the one created by the above command is only 8.2 MB Does it mean the quality of the new file has deteriorated? – Ravi Jan 8 '14 at 14:49
  • @Ravi Well, you're reencoding the video with -vcodec mpeg4, it's not lossless, so that's not totally unexpected. – Chris Down Jan 8 '14 at 16:44
  • In my case the video was originally H264, so the end result was better using -vcodec h264. Still not the same size, not even close, but much better result. – landroni Feb 26 '17 at 18:21

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.