Tutorial - Linux - AVI-MPEG(DVD)


Coding Friends Tutorial Index - > Linux

Author Ian - Tutorial Posts = 62

Linux - How to convert AVI-MPEG/DVD

This shall serve as a reminder for myself and may help others. The software that I have used is

To convert the avi file into a mpeg file for a PAL 352x288 screen, there is different settings either use the 'man' or goto the Transcode website for viewing the conversion in more detail. The command line that I use is

transcode -i<AVI FILM> -V -y mpeg -F d -E 44100 -b 224 -fps 25 -o <OUTPUTFILENAME>

This generates two files, *.m2v (the dvd video segment) and *.mpa (the audio segment).

The options in the above command line are
  • -b    Audio bitrate Kbit's
  • -E    Audio sampling rate (Hz)
  • -F    codec (d = dvd)
  • -i     input file
  • -V    use internal video codec (faster but some import modules do not support this)
  • -y    video, audio export modules.
  • -fps  Frames per second, 25 is for PAL, 29.97 for NTSC
If the audio is in the AC3 Codec then you may need to reduce the bitrate for encoding. This is done with a profile file dvd.prof, which containts the following entry.

max_bitrate=4000000.0

this will reduce the bitrate to 4000 kpbs. The profile is passed to the transcode program within the 3rd parameter to -F, also the parameter -A means to use the internal AC3 codec.

transcode -i<AVI FILM> -V -y mpeg -F d,,dvd.prof -m <OUTPUTFILENAME.AC3> -A 0x2000 -fps 25 -o <OUTPUTFILENAME>

Joining the OUTPUTFILENAME's together

To join these two segments together

tcmplex -o <OUTPUT.VOB> -i <OUTPUTFILENAME.M2V> -p <OUTPUTFILENAME.MPA> -m d

If using the AC3 codec then

tcmplex -o <OUTPUT.VOB> -i <OUTPUTFILENAME.M2V> -p <OUTPUTFILENAME.AC3> -m d

Hope that helps, and this also servers as a reminder to me :)

Creation of cool tutorials :)

There is forum thread about tutorial here

User Name Password
Copyright@CodingFriends, 2005-2006. All Rights Reserved.
Home | Forums | Tutorials | Users
RSS Feeds - Global Global CodingFriends RSS Feed - Tutorials Tutorials CodingFriends RSS Feed - Forums Forums CodingFriends RSS Feed - News News CodingFriends RSS Feed
Users
Login|Password problem| Register here

Tutorials
Tutorials Home| C/C++| C#/Mono| Java| Javascript| PHP| Ruby| SQL| (X)HTML/CSS| VB| Linux| Windows

Forum
Forum Home

Projects
3D Game

Site
Home| About me| Links| FAQ

Search