[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to rotate ogg/theora video 90 degrees? (PARTIAL SOLUTION)



Timo Juhani Lindfors <timo.lindfors@iki.fi> writes:
> 3) Finally on the #theora IRC channel I was adviced to use both
> mencoder and mplayer with an intermediate file.
>
> wget http://ftp.acc.umu.se/pub/debian-meetings/2009/debconf9/low/1050_Lightning_talk_Redirecting_require.ogv
> mencoder 1050_Lightning_talk_Redirecting_require.ogv -oac pcm -ovc lavc -lavcopts vcodec=ffvhuff -vf scale=320:240,rotate=1 -o output.avi
> ffmpeg -i output.avi -acodec libvorbis output.ogv
>
> almost works in debian unstable. The only problem is that some video
> frames are lost => The audio plays normally but last few seconds of
> video are not played at all and video generally lacks behind audio.

Some progress has been made. With

ffmpeg2theora   0.24-2+b1
mencoder        2:1.0~rc4.dfsg1-1
mplayer 2:1.0~rc4.dfsg1-1

in today's unstable bug #590441 does not cause problems. The following
test cases produce rotated 320x240 video that actually plays with
mplayer on openmoko freerunner [1]:

wget http://ftp.acc.umu.se/pub/debian-meetings/2009/debconf9/low/1050_Lightning_talk_Redirecting_require.ogv
mencoder -oac pcm -ovc lavc -lavcopts vcodec=ffvhuff -vf scale=320:240,rotate=1 -o 1050_Lightning_talk_Redirecting_require.tmp.avi 1050_Lightning_talk_Redirecting_require.ogv 
ffmpeg2theora -o 1050_Lightning_talk_Redirecting_require.rot90.ogv 1050_Lightning_talk_Redirecting_require.tmp.avi
mplayer 1050_Lightning_talk_Redirecting_require.rot90.ogv

youtube-dl http://www.youtube.com/watch?v=Z19zFlPah-o
mencoder -oac pcm -ovc lavc -lavcopts vcodec=ffvhuff -vf scale=320:240,rotate=1 -o Z19zFlPah-o.tmp.avi Z19zFlPah-o.flv
ffmpeg2theora -o Z19zFlPah-o.rot90.ogv Z19zFlPah-o.tmp.avi
mplayer Z19zFlPah-o.rot90.ogv

wget http://mirror.cessen.com/blender.org/peach/trailer/trailer_iphone.m4v
mencoder -oac pcm -ovc lavc -lavcopts vcodec=ffvhuff -vf scale=320:240,rotate=1 -o trailer_iphone.tmp.avi trailer_iphone.m4v
ffmpeg2theora -o trailer_iphone.rot90.ogv trailer_iphone.tmp.avi
mplayer trailer_iphone.rot90.ogv

This produces huge temporary files but who cares, at least it finally
works! ;-)

> (Please do not suggest me to get potentially non-free stuff from
> http://debian-multimedia.org/ -- I don't want to rely on software that
> can not be included in debian if at all possible.)


[1] I'm using unreleased

libtheora0      1.2.0alpha1+dfsg.1-1

due to its ARM optimizations, I'm expecting it to hit Debian this
year. If you are curious you can look at my extremely unofficial
repository at

deb-src http://lindi.iki.fi/lindi/debian destructive main


In addition to that, I'm using a launcher script called "run-mplayer"
to do some fine tuning:

function cleanup() {
    sudo om screen glamo-bus-timings 4-4-4
    sudo fbset 480x640
    sudo om screen resolution normal
    sudo chvt 7
    exit 0
}
trap cleanup 1 2 3 15
sudo chvt 2
# disable blanking
sudo sh -c "printf '\033[9;0]' > /dev/tty2"
# disable cursor blinking
sudo sh -c "printf '\033[?17;0;127c' > /dev/tty2"
# hide cursor
sudo sh -c "printf '\033[?25l' > /dev/tty2"
sudo om screen resolution qvga-normal
sudo fbset 240x320
sudo om screen glamo-bus-timings 2-4-2
mplayer -framedrop -ac -ffvorbis, -ao alsa -vc -fftheora, -vo fbdev -nocorrect-pts "$@"
cleanup


Reply to: