You are not logged in.
Pages: 1
Trying to rotate some home movies that were filmed sideways by mistake. They just need to be rotated 90° counter-clockwise, and I've tried with both mencoder and ffmpeg but neither of them actually rotates the videos.
mencoder VIDEO.AVI -vf rotate=2 -oac copy -ovc copy -o VIDEO-ROTATED.AVI
ffmpeg -i VIDEO.AVI -acodec copy -vcodec copy -vf rotate=2 VIDEO-ROTATED.AVI
There is no system but GNU and Linux is one of its kernels.
Offline
mencoder -vf rotate=2 -oac pcm -ovc lavc input.file -o output.file
works for me.
Offline
Maybe my videos are just too weird a format for it to handle? Here is the output of 'ffmpeg -i'
$ ffmpeg -i VIDEO.AVI
ffmpeg version 0.7.6, Copyright (c) 2000-2011 the FFmpeg developers
built on Oct 3 2011 13:04:32 with gcc 4.6.1 20110819 (prerelease)
configuration: --prefix=/usr --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-libx264 --enable-libvpx --enable-libtheora --enable-postproc --enable-shared --enable-x11grab --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libschroedinger --enable-libopenjpeg --enable-librtmp --enable-gpl --enable-version3 --enable-runtime-cpudetect --disable-debug
libavutil 50. 43. 0 / 50. 43. 0
libavcodec 52.122. 0 / 52.122. 0
libavformat 52.110. 0 / 52.110. 0
libavdevice 52. 5. 0 / 52. 5. 0
libavfilter 1. 80. 0 / 1. 80. 0
libswscale 0. 14. 1 / 0. 14. 1
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, avi, from 'VIDEO.AVI':
Metadata:
encoder : Lavf52.110.0
Duration: 00:03:55.40, start: 0.000000, bitrate: 6094 kb/s
Stream #0.0: Video: mjpeg, yuvj420p, 640x480, 14.99 tbr, 14.99 tbn, 14.99 tbc
Stream #0.1: Audio: mp3, 44100 Hz, stereo, s16, 224 kb/s
There is no system but GNU and Linux is one of its kernels.
Offline
Lets take the ffmpeg example, you have "-acodec copy -vcodec copy" this will copy the video and audio streams directly to the output file, to rotate the video you need to re-encode it so directly copying it is not an option, for the audio it should be ok.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Lets take the ffmpeg example, you have "-acodec copy -vcodec copy" this will copy the video and audio streams directly to the output file, to rotate the video you need to re-encode it so directly copying it is not an option, for the audio it should be ok.
+1
When I used '-ovc copy' the video remained unrotated.
Offline
So there's no way to losslessly rotate it?
There is no system but GNU and Linux is one of its kernels.
Offline
So there's no way to losslessly rotate it?
Not that I know of, it could be possible to use a container format that would allow you to specify the desired rotation, which when used with a player that supports output rotation would make it work as you want, but I don't know if that's possible or widely supported.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
ffmpeg -i VIDEO.AVI -acodec copy -vcodec copy -vf rotate=2 VIDEO-ROTATED.AVI
The filter used to rotate video in FFmpeg is called transpose:
ffmpeg -i VIDEO.AVI -acodec copy -vcodec mjpeg -qscale 2 -vf transpose=2 VIDEO-ROTATED.AVI
You didn't mention a specific output format, so I just used the same as the input.
So there's no way to losslessly rotate it?
You could use a lossless format, but the file will be much bigger.
ffmpeg -i VIDEO.AVI -acodec copy -vcodec huffyuv -vf transpose=2 VIDEO-ROTATED.mkv
I know you can losslessly rotate jpg images with jpegtran for example, but I'm not sure about mjpeg.
Offline
Mplayer can of course use the rotate and transpose filters for playback. But I guess that only helps if you never want to use another player.
6EA3 F3F3 B908 2632 A9CB E931 D53A 0445 B47A 0DAB
Great things come in tar.xz packages.
Offline
Pages: 1