OESF Portables Forum
Everything Else => Zaurus Distro Support and Discussion => Distros, Development, and Model Specific Forums => Archived Forums => Angstrom & OpenZaurus => Topic started by: alan on May 24, 2005, 06:46:09 pm
-
Hi !
Since Xora launched a video how to for c7x0 serie on the open zaurus webpage, i really really want to try to get a universal how to.
i tweaked a bit his script, and here is waht i now use on my 750 :
#!/bin/sh
mencoder $1 -srate 24000 -ofps 15 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=150:vpass=1 -lameopts cbr:br=64:mode=3 -vf scale=320:-2:::,eq2=1.0:0.6:0.1:0.7 -oac mp3lame -o Z-$1;
mencoder $1 -srate 24000 -ofps 15 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=150:vpass=2 -lameopts cbr:br=64:mode=3 -vf scale=320:-2:::,eq2=1.0:0.6:0.1:0.7 -oac mp3lame -o Z-$1
use/edit/comment as much as possible for each Z model. I saved it as vid2zaurus and use it by "vid2zaurus file.avi". This produces a Z-file.avi.
Note that Z-file :
* automatically keeps aspect ratio
* needs around 100mo/hour
* enlight colors so that you can see them even without full lightscreen
* is a bit chunky as it is only 15 fps
* produces each one of the two passes at around 50 fps on my duron 1.3 ghz 512mo ram. (So a 2 hours film would be ready in about 2 hours.)
To play it, use Xora's script :
FOR GPE USERS :
#! /bin/sh
fbset -n -xres 240 -yres 320;
echo 1 >/sys/class/graphics/fb0/driver/w100fb/fastpllclk;
mplayer -cache 16384 -vo w100 -ac mad -ao oss -framedrop -fs -really-quiet -vop rotate=1 $@;
fbset -n -xres 640 -yres 480
FOR OPIE USERS :
#! /bin/sh
fbset -n -xres 240 -yres 320;
mplayer -cache 16384 -ac mad -ao oss -framedrop -really-quiet -fs -vop rotate=1 $@;
fbset -n -xres 640 -yres 480
FOR 5XXXX USERS :
remove the two fbset lines (and i have a doubt about the w100 driver for GPE users...)
Now things i'd like to know :
- is there a way to keep the black frames really black ? the enlighting process makes the darks frames look ugly, but without it, movie are unwatchable unless you are in the dark... Anyone who knows anything in matrices is welcome.
- what is the maximum bitrate each Z models can play ? i need testers for this, or someone who knows haow to calculate this.
- is there a way to make a gui from this ? i don't know anything in coding, if someone wants to take that, that would be great ! Something with a bitrate calculator, and all. (wonder if it would be very usefull...)
- can someone make the same job for Windows users ? i know virtualdub has some sripting abilities in filtering, and that the filtering process can be saved in a file. Can someone post those files here ?
-
- can someone make the same job for Windows users ? i know virtualdub has some sripting abilities in filtering, and that the filtering process can be saved in a file. Can someone post those files here ?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=81324\"][{POST_SNAPBACK}][/a][/div]
Well, the MPlayer project has made a Windows port for both MPlayer and MEncoder. It's still in beta, but I can make MEncoder for Windows encode movies that will work with MPlayer on the Zaurus using this command:
mencoder.exe "insert_video_location_here_in_the_script" -srate 44100 -vop scale=320:240 -o movie_name_that_you_want.avi -oac mp3lame -lameopts preset=15:mode=3 -ovc lavc -lavcopts vcodec=msmpeg4 -ofps 15 -sws 2
The change in the vcodec section represents the use of DivX3 instead of DivX 4 or 5, which seems to be the only one that MEncoder encoded and MPlayer plays. That command encoded a 1 hour and 30 minutes movie to around 102MB, so it'll fit nicely on a moderately-sized CF card.
EDIT: I should've mentioned before, I'm using a 5500 with the 3.5.3 Hentges ROM (uses MPlayer 1.0-pre7).
-
I just had a breakthrough on the encoding side. I'm still playing with it, but I was able to encode an mpeg file that played well on the Zaurus. I have found that downsampling the audio to 22050Hz mono reduces the loading on the Zaurus, and helps a lot.
My script does the following:
1. Strips the audio from the original video to a wav file
2. Rewrites the video with reduced framerate/bitrate for the Zaurus.
3. Strips the sound out of the video.
4. Converts the audio to ogg.
5. Combines the reduced-framerate video with the ogg audio.
6. Cleans up temporary files.
The code is very basic and not bulletproof, since I just got it working, and I haven't done any optimization. I would be interested in any improvements/modifications anyone might have.
Here is my script:
#!/bin/sh
file=$1
fname=`echo $file | awk -F. '{ print $1 }'`
if [ $file = $fname.avi ]; then
fname=$fname-1
fi
# Separate sound to a wav file
mplayer $file -ao pcm:file=audio.wav -vc dummy -aid 1 -vo null
# Rewrite video with no sound and reduced frame rate
mencoder $file -srate 24000 -vop scale=320:240 -o $fname.avi -oac mp3lame -lame
opts preset=15:mode=3 -ovc divx4 -divx4opts br=150 -ofps 15 -sws 2
mencoder -ovc copy -nosound -o $fname-pda.avi $fname.avi
# Convert wav to ogg
oggenc --downmix --resample 22050 -q 2 audio.wav
# Combine ogg and video to ogm file
ogmmerge -o $fname.ogm $fname-pda.avi --sync audio.ogg
# Remove temp files
rm $fname.avi $fname-pda.avi audio.ogg audio.wav
The original videos I tested this on were 90 and 164MB, and the resulting ogms were 7.9 and 11MB:
-rw-r--r-- 1 storm storm 93339884 Nov 15 2004 Strike-on-Koksan-Act1b.mpeg
-rw-r--r-- 1 storm storm 156162656 Nov 15 2004 Strike-on-Koksan-Act2b.mpeg
-rw-r--r-- 1 storm storm 8228337 May 30 00:35 Strike-on-Koksan-Act1b.ogm
-rw-r--r-- 1 storm storm 10716254 May 30 11:47 Strike-on-Koksan-Act2b.ogm
They play nicely on my SL-5500 running OZ3.5.3, with mplayer 1.0pre7 from the feed.
--Storm
-
check this thread:
https://www.oesf.org/forums/index.php?showtopic=11083 (https://www.oesf.org/forums/index.php?showtopic=11083)
xumbi and dreadlocks seem happy with their encoding options
-
I encoded a few files in different bitrates and different compression methods (mpeg4, xvid, divx) and they all seem to be jerky on video playback. i tried loading them onto a CF memory card, but that doesn't seem to work. I am usinga 64-0 build, so I wonder if I am slowing down because I don't have enough cache. any suggestions on what might be going on? I have been using opie-mplayer2 to play the video back. audio works great and if I play these files on my computer I see no hesitation in the video.
Thanks in advance
-John
-
I encoded a few files in different bitrates and different compression methods (mpeg4, xvid, divx) and they all seem to be jerky on video playback. i tried loading them onto a CF memory card, but that doesn't seem to work. I am usinga 64-0 build, so I wonder if I am slowing down because I don't have enough cache. any suggestions on what might be going on? I have been using opie-mplayer2 to play the video back. audio works great and if I play these files on my computer I see no hesitation in the video.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=84532\"][{POST_SNAPBACK}][/a][/div]
Quick update, if I use mplayer to play off the cf flash card, I don't get skipping, it's only if I use opie-mplayer2 when I get "skipping".guess it's time to figure out how opie-mplayer2 works and if there is a config file for it anyplace.
-
Hi,
first, I use alan's (or is it Xora?) scripts for encoding and playing... worked like a charm. I suggest adding the following line at the end of the opie play script:
qcop "QPE/System" "applyStyle()";
this will make opie refresh the screen after the movie exit.
Another thing that I'm missing in the play script, and couldn't find a satisfactory solution is the dimming of the screen when working offline... does anyone found a solution to this problem (that is other than to disable the dim and light off in the light and power settings)?
Thanx,
YoG