Theora video compression format support

Rafael Ignacio Zurita rafaelignacio.zurita at gmail.com
Sun Oct 24 19:11:42 EDT 2010


Hello, 
  we have been talking about how hard it seems to have a free video format
useful for Ben Nanonote. We did a lot of tests with Theora free
video compression, without luck.

But, we really did?.. I just realized few days ago that using
a "Another Script" modified version from
http://www.jlime.com/wiki/documentation/user/7xx/howtos/converting_videos
and http://v2v.cc/~j/ffmpeg2theora/ we can play 320x240 ogv videos 
(with sound) on Ben Nanonote.

If you want to try I uploaded an ogv video example :
http://fz.hobby-site.org/hp660lx/nn/theora-example-nanowarofsteel.ogv

tested just with :
export DISPLAY=:0
mplayer theora-example-nanowarofsteel.ogv


We got that file encoding with :

jornadify.sh  our_video_file.whatever
ffmpeg2theora-0.27.linux32.bin  encoded.avi  encoded.ogv


The jornadify.sh script was made by filip from #jlime, and Tuxbrain (David)
pointed me the ffmpeg2theora binary.

jornadify.sh script.sh :
#!/bin/bash
J_WIDTH=320
J_HEIGHT=240
J_RATIO=$(calc -p $J_WIDTH/$J_HEIGHT | tr -d '~')
INPUT="$1"
eval $(mplayer -really-quiet -identify -frames 0 -vo null -ao null "$INPUT" 2>/dev/null | grep '^ID_VIDEO_')
V_RATIO=$(calc -p $ID_VIDEO_WIDTH/$ID_VIDEO_HEIGHT | tr -d '~')
[ "$(calc -p "$J_RATIO > $V_RATIO")" = "1" ] && {
        OUT_HEIGHT="$J_HEIGHT"
        OUT_WIDTH=$(calc -p "int($OUT_HEIGHT*$V_RATIO)" |tr -d '~')
} || {
        OUT_WIDTH="$J_WIDTH"
        OUT_HEIGHT=$(calc -p "int($OUT_WIDTH/$V_RATIO)" |tr -d '~')
}
mencoder \
        -ofps 15 -ovc lavc -lavcopts vcodec=mpeg1video:vbitrate=400 -vf scale=$OUT_WIDTH:$OUT_HEIGHT \
        -af pan=1:0.5:0.5,resample=11050:0:0 -oac pcm \
        -of lavf -lavfopts format=avi \
        -subfont-text-scale 3 -subcp cp1250 -subfps $ID_VIDEO_FPS \
        "$@"


The sound (11050 Hz, 1 channels, s16) is not so nice, but we can improve that surely.

Bye, Rafa




More information about the discussion mailing list


interactive