Convert other movie formats into avi to watch on your dvd player

Files in mkv, mov, mp4 format etc won’t work on a standard dvd player. You will need to convert the file to divx/xvid as an ‘avi’ file.

Here’s a quick bash script using ffmpeg that will do the conversion and keep sound/video in sync:

#!/bin/bash
nice -n 19 ffmpeg -i "$1" -vcodec mpeg4 -vtag xvid -sameq \
-acodec libmp3lame -ar 44100 -ac 2 -ab 192k -f avi -y /home/you/Videos/"$2"

Open a text file in an editor and save the above as ‘toavi.sh’ and make it executable. Then simply open a terminal and do

$ toavi.sh file-to-convert new-file-name.avi

(make sure you have a directory called Videos in your home directory and change the ‘you’ in /home/you/Videos to your user name ).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s