View source for Video Player
From Openmoko
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page:
Templates used on this page:
Return to Video Player.
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page:
Templates used on this page:
Return to Video Player.
Not a proper 'app' page, just an overview
It plays mpeg-4 320x240 stretched fullscreen, however other formats will require transcoding.
The default media player doesn't seem to handle video very well, but mplayer does OK.
It can be installed with the following command: opkg install mplayer
This only applies to GTA02 hardware which uses Glamo graphical chip.
First of all you'll need special version of Mplayer with glamo support.
You can download it from here: http://downloads.tuxfamily.org/3v1deb/openmoko/mplayer-glamo.tar.bz2
Just copy files inside the archive with:
cp mplayer /usr/bin/mplayer cp input.conf ~/.mplayer/input.conf
File shoud be preencoded with something like this:
mencoder file_to_encode.avi -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=300 \ -vf scale=320:240,eq2=1.2:0.5:-0.25,rotate=2 -oac mp3lame -ofps 15 -lameopts br=64:cbr \ -o file_for_openmoko
It can be played with:
mplayer -vo xover:glamo -fs your_file.avi
Please refer to: http://unadventure.wordpress.com/2008/06/08/accelerating-in-my-pocket/ for more details.
Create a file in /home/root/.mplayer/input.conf with this content:
# Freerunner Optimizations MOUSE_BTN0 vo_fullscreen MOUSE_BTN0_DBL q
Now, you can toggle the fullscreen by tapping the screen and exit from mplayer by touble-tapping the LCD. Accelerometers or hardware buttons could help more.
Create a script named 'vidplay' in your home directory with the following commands:
#!/bin/sh xrandr -display :0 --output default --mode 240x320 mplayer -vo fbdev "$1" > /dev/null xrandr -display :0 --output default --mode 480x640 reset
Make the script executable:
chmod 755 /home/root/vidplay
Known issues with this approach:
Despite these issues, it proves that the horsepower is there and it can be done.
No ssh, no xrandr, no script needed, juste mplayer and qwerty keyboard : Like it's said in the "Getting started with FreeRunner" wiki page, you have to install the full qwerty keyboard, see these instructions. After that, you can go to Terminal and type : mplayer vid/my_video.avi Mplayer starts in full screen, if your video is optimized like below 240x320 it's work like a charm and to quit just use the power button.
Only issue : You can't forward/backward/pause...
Download the source (no need to start with the giant full resolution version)
cd /tmp wget http://proyectos.pixelamigo.com/open/movies/BigBuckBunny/unofficial_PSP/big_buck_bunny_480p_AVC_FW33.mp4
Test the video filter settings (-vf crop=...) often omitting the last "rotate=2" (Optional, but recommended for long videos).
mplayer big_buck_bunny_480p_AVC_FW33.mp4 -vf crop=720:480:-1:-1,scale=320:-2,rotate=2 -zoom
Transcode it:
mencoder big_buck_bunny_480p_AVC_FW33.mp4 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=300 \ -vf crop=720:480:0:0,scale=320:-2,eq2=1.2:0.5:-0.25,rotate=2 -oac mp3lame -lameopts br=64:cbr \ -o big_buck_bunny_320.avi
or if it doesn't work (for me the image and the colours aren't ok) replace scale=320:-2 by scale=320:240
Transfer the resulting 27M file from the PC to the FreeRunner's MicroSD card scp user@192.168.0.200:/tmp/big_buck_bunny_320.avi /media/card
Play it /home/root/vidplay /media/card/big_buck_bunny_320.avi
To rotate the screen: xrandr -o 0 xrandr -o 1
Video is problematic on Neo 1973.
On the minus side.
However.
On the positive side.
For switching between QVGA and VGA mode do the following with a compatible kernel:
chvt 4 && echo qvga-normal > /sys/devices/platform/s3c24xx-spi-gpio.1/spi0.0/state && fbset qvga
vice versa:
echo normal > /sys/devices/platform/s3c24xx-spi-gpio.1/spi0.0/state && fbset vga && chvt 3
Taken from http://lists.openmoko.org/pipermail/neo1973-hardware/2007-October/000267.html
To avoid console blanking type:
echo -e '\033[9;0]' > /dev/ttyX
where 'X' is your terminal number - for example if you did chvt 4 then /dev/tty4 is your terminal.
To avoid kernel output in vt do
echo 0 > /proc/sys/kernel/printk
From a conversation with XorA, in the IRC channel.
400kbps mpeg4 works on a 200Mhz neo (without sound) on prerotated 240*320 ffmpeg codec videos, at 25fps, using stock mplayer.
With sound, this drops to 18fps.
There are optimisations for mplayer that look promising to get 25fps with sound.
To get best speed on GTA01 (best size-speed-resolution-codec trade-off I could find - doesn't mean it's perfect though) crosscode using: mencoder <sourcefile> -o <targetfile.avi> -ofps 13 -vf scale -zoom -xy 240 -af channels=1:0:0:1:0 -oac lavc -ovc lavc -lavcopts acodec=mp3:vcodec=h263p:autoaspect=1:vbitrate=300:abitrate=32
Also working okay: mencoder <sourcefile> -o <targetfile.avi> -ofps 13 -vf scale -zoom -xy 352 -af channels=1:0:0:1:0 -oac lavc -ovc lavc -lavcopts acodec=mp3:vcodec=h263p:autoaspect=1:vbitrate=200:abitrate=32
You can playback the file using: mplayer -sws 0 -nodouble -vo sdl -fs -framedrop <tagetfile.avi>
You may also want to use: -autosync 30 -vf scale -zoom -xy 640 -vf rotate=1
To make your videos/DVDs compatible use mencoder like this: Find out the -vf cropping parameters with mplayer input.avi -vf cropdetect let it run a few seconds and insert the given cropping values into this command mencoder input.avi -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=300 -vf crop=xx:xx:xx:xx,rotate=2,scale=-2:320 -oac mp3lame -lameopts br=64:cbr -o output2.avi To encode a DVD first find out the -vf cropping parameters with mplayer -dvd-device /path/to/dvd dvd:// -vf cropdetect -sb 50000000 let it run a few seconds and insert the given cropping values into this command mencoder -dvd-device /path/to/dvd dvd:// -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=300 -vf crop=xx:xx:xx:xx,rotate=2,scale=-2:320 -oac mp3lame -lameopts br=64:cbr -o output.avi This will rotate the video/DVD, scale it and encode it to mpeg4 with a bitrate of 300kBit/s. Works like a charm.
Source Code released: No
As a nice GUI gnome-mplayer can be recommended.
On Debian you can install it from repository:
![]() |
mplayer
The popular command line video player.
|
Source Code released: Yes
It provides another GUI to mplayer.
It was released first there: http://people.defora.org/~khorben/share/Openmoko/deforaos-player_0.1.0_armv4t.ipk
![]() |
deforaos-player
The DeforaOS media player, a frontend to mplayer
|