[mdlug] Downloading video (and other) streams
Ingles, Raymond
Raymond.Ingles at compuware.com
Thu Feb 8 11:42:03 EST 2007
> From: Drew
> I'm looking for a way to download streams, such as are gotten on
> Youtube, to a zaurus.
If you mean something that downloads videos directly to a Zaurus to be
viewed there, then I don't know of anything like that.
> Any suggestions?
If, however, you're proposing downloading with a desktop, processing the
files there, and then putting the resulting files onto a Zaurus for viewing,
I've done that for my Treo 650. The first thing you'll want is the "Video
Downloader" extension for Firefox that everyone's mentioned.
Second, I use mencoder to process the files into something I can view on
the Treo. Here's an example script, you should be able to modify it to your
needs with a little man page reading:
--------------------------
#!/bin/sh
# Note: you will need to experiment to properly set FPS and SCALEH variables
# (There should be no need to set SCALEW variable. Palm screen is 320x320.)
# If you're skipping frames, increase FPS. If duplicating, decrease FPS.
# Usual values are 24, 25, 29.97, 30.
FPS=30
# Change only in unusual circumstances.
SCALEW=320
# In general take (320 / width of source) * height of source, round up
SCALEH=240
#SCALEH=180
#Set audio mode; if already compressed, just copy. For DVDs, you'll
#probably want to compress the audio.
#AUDIO="mp3lame -lameopts vbr=3"
#AUDIO="mp3lame -lameopts abr:br=64"
AUDIO=copy
echo $AUDIO
#Set crop, if needed. (Generally only for DVDs.)
#CROP="-vf crop=320:160:0:28"
# Whatever the original type of the file, we're gonna make an AVI.
SUFFIX=`echo $1 | cut -d. -f 2`
NEWNAME=`basename $1 ${SUFFIX}`avi
#Just in case one's left over from a previous run.
rm -rf divx2pass.log
# Two-pass encoding. Some files seem to work better if FPS is not set.
if [ -n "$FPS" ]; then
mencoder $1 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 -ofps ${FPS} -oac ${AUDIO} -vf scale=${SCALEW}:${SCALEH} -o /dev/null
mencoder $1 -ovc lavc -lavcopts vcodec=mpeg4:vpass=2 -ofps ${FPS} -oac ${AUDIO} -vf scale=${SCALEW}:${SCALEH} -o ${NEWNAME}
else
mencoder $1 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 -oac ${AUDIO} -vf scale=${SCALEW}:${SCALEH} ${CROP} -o /dev/null
mencoder $1 -ovc lavc -lavcopts vcodec=mpeg4:vpass=2 -oac ${AUDIO} -vf scale=${SCALEW}:${SCALEH} ${CROP} -o ${NEWNAME}
fi
#Clean up after ourselves.
rm -rf divx2pass.log
--------------------------
Sincerely,
Ray Ingles (313) 227-2317
"Don't try to frighten us with your closed-source ways, Lord Gates.
Your sad devotion to that ancient religion has not helped you conjure
up more internet server market share, or given you clairvoyance
enough to find all of the bugs in Win... *cough* *gag*" - J. R. Rimmer
The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.
More information about the mdlug
mailing list