Search:  
Gentoo Wiki

Encode_videos_for_mobile_phones

Installation

This approach uses media-video/ffmpeg to convert videos into the DivX/Mpeg-4 format which is used natively on the Nokia N95. First make sure you have ffmpeg installed with the correct codecs

echo 'media-video/ffmpeg aac' >> /etc/portage/package.use
emerge -av ffmpeg

Script

A handy script was posted in the Gentoo Forum based on a posting in the Ubuntu Forum, and it has undergone a slight tweak to get it working.

File: n95enc
#! /bin/bash
clear
if [ -n "$1"]; then
   echo "please specify file to convert"
   
else

   if [ -n "$2"]; then
      newName=$(echo $1 | cut -d '.' -f1)
   
   else
      newName=$2
   fi

   echo "coverting $1 to $newName.mp4"

   ffmpeg -i "$1" -f mp4 -vcodec mpeg4 -b 250000  -r 15 -s 320x240 -acodec libfaac -ar 24000 -ab 64 -ac 2 "$newName.mp4"

fi


Usage

To use this script it needs to be in your $PATH and executable, you can then invoke it with the video you want to convert as the first argument (and optionally the output file as a second argument).

$ n95enc myvideo.avi [myvideo.mp4]
Retrieved from "http://www.gentoo-wiki.info/Encode_videos_for_mobile_phones"

Last modified: Fri, 05 Sep 2008 07:48:00 +0000 Hits: 871