Tuesday, February 17, 2009

Encoding Videos for Samsung Duo SCH-W339

The video files converted using the script for C5320 does not work with Samsung Duo SCH-W339. Well ... actually I lied. It does work, except that the extension has to be changed from .3gp to .mp4. I learnt it the hard way. I do not know why it is so. Anyway the C5320 has no problem with the extension being .3gp or .mp4. So here is the (not so updated) script for converting videos to mp4 for use in Samsung Duo SCH-W339. It just adds an additional line to change the extension:

#!/bin/bash

FILENAME=`echo $1|cut -d "." -f 1`
SIZE=qcif

CHANNELS=1
SAMPFREQ=22050
ABITRATE=48

FPS=25

ffmpeg -i $1 -s $SIZE -vcodec h263 -acodec aac -ac $CHANNELS -ar $SAMPFREQ -r $FPS -ab $ABITRATE -y $FILENAME.3gp
mv $FILENAME.3gp $FILENAME.mp4
exit 0

No comments: