Rotating a video (ubuntu 12.04)
2
votes
0
answers
1719
views
I have a video, shot on my android phone, which I want to rotate 90 degrees clockwise for computer viewing. Here's what I expect should work:
ffmpeg -i infile.mp4 -vf "transpose=1" -an -vcodec mpeg4 outfile.mp4
except that it gives me:
Error while opening encoder for output stream #0.0 - maybe incorrect
parameters such as bit_rate, rate, width or height
The command
ffmpeg -codec
does produce a long list which includes DEVSDT mpeg4 MPEG-4 part 2
Then I experimented with
ffmpeg -vf "transpose=1″ -qscale=2 -i infile.mp4 outfile.mp4
but this seems to be an unfinished command, as all I get is a ">" symbol in my terminal.
I've also tried:
mencoder -fps 30000/1001 -ofps 30000/1001 -ovc lavc -vf rotate=1 -oac pcm
infile.mp4 -o outfile.mp4
which does work, but gives a very poor output - far worse than the input.
I can certainly view the video in the correct orientation:
mplayer -vo xv -vf rotate=1 infile.mp4
but I have as yet not found a way to write the rotated video to a file. I have no experience at all with video coding, so any advice would be most welcome!
Asked by Alasdair
(281 rep)
Jun 26, 2013, 07:29 AM
Last activity: Nov 10, 2013, 12:55 PM
Last activity: Nov 10, 2013, 12:55 PM