[SOLVED] Need help rotating a video file (.3gp) 90 degrees
Posted: 3. Jul 2012, 03:00
Hey there,
I accidentally shot a video (on my android) in portrait mode rather than landscape mode, so when I view the video on my laptop it is sideways. I found a Linux blog which offers this solution:
http://www.thelinuxblog.com/rotating-videos-in-linux/
But when I use this advice I get:
Two problems. First problem: there is no sound. I attribute this to fact that mencoder is looking for libopencore_amrnb where as the file on this system (Salix 13.1) seems to actually be named libopencore-amrnb (with a hyphen, not an underscore). Not sure how to solve this. Obviously copying the files and renaming them is an idea, but there are soft links and my rule is "if you don't know what you are doing; don't do it." Second problem: the video after having been flipped plays very quickly and choppily, like an old Charlie Chaplin flick. I have tried every version of an output file.... .AVI, .mpeg, etc. I have also used the suggested -ni (non-interleaved) option for AVI.
Can anyone give me some help on this? Thanks.

I accidentally shot a video (on my android) in portrait mode rather than landscape mode, so when I view the video on my laptop it is sideways. I found a Linux blog which offers this solution:
http://www.thelinuxblog.com/rotating-videos-in-linux/
But when I use this advice I get:
Code: Select all
dennis[2012-7]$ mencoder -ovc lavc -vf rotate=1 -oac pcm ben_eat.3gp -o ben_eat2.AVI
MEncoder 20100218-4.4.3 (C) 2000-2010 MPlayer Team
success: format: 0 data: 0x0 - 0x1fe7c44
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x8ee0920]max_analyze_duration reached
[lavf] Video stream found, -vid 0
[lavf] Audio stream found, -aid 1
VIDEO: [MP4V] 640x480 24bpp 60.000 fps 1828.8 kbps (223.2 kbyte/s)
[V] filefmt:44 fourcc:0x5634504D size:640x480 fps:60.000 ftime:=0.0167
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
Cannot find codec 'libopencore_amrnb' in libavcodec...
ADecoder init failed :(
ADecoder init failed :(
Cannot find codec for audio format 0x726D6173.
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [rotate=1]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
videocodec: libavcodec (480x640 fourcc=34504d46 [FMP4])
Writing header...1f ( 3%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0]
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
1 duplicate frame(s)!
Pos: 18.6s 1119f (55%) 48.20fps Trem: 0min 3mb A-V:0.000 [931:0]]
Too many audio packets in the buffer: (4096 in 131072 bytes).
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.
Flushing video frames.
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Video stream: 931.837 kbit/s (116479 B/s) size: 2172344 bytes 18.650 secs 1119 frames
dennis[2012-7]$
Can anyone give me some help on this? Thanks.


