20070802 transcode for converting avi to mpeg - plembo/onemoretech GitHub Wiki

title: transcode for converting .avi to .mpeg link: https://onemoretech.wordpress.com/2007/08/02/transcode-for-converting-avi-to-mpeg/ author: lembobro description: post_id: 668 created: 2007/08/02 05:47:00 created_gmt: 2007/08/02 05:47:00 comment_status: open post_name: transcode-for-converting-avi-to-mpeg status: publish post_type: post

transcode for converting .avi to .mpeg

The transcode utility is what you need if you want to convert standard avi video files to a flavor of mpeg. The following comes from the Authoring PC Media to DVD tutorial on the project site.

First, when converting an avi file for use on a DVD, you’ll want to split the content into separate video and audio files. In the case of a DVD for playback in the U.S. the encoding will be NTSC. Here’s an example given in the tutorial for how to convert a file called “matrix.avi”:

transcode  -i matrix.avi
           -y ffmpeg
           --export_prof dvd-ntsc
           --export_asr 2
           -o matrix
           -D0
           -s2
           -m matrix.ac3
           -J modfps=clonetype=3
           --export_fps 29.97

This will result in two files, matrix.m2v and matrix.ac3, containing video and audio content, respectively. The aspect ratio will be 4:3 (standard TV). To encode video at 16:9 (widescreen TV), use export_asr 3 instead. You might also want to use the “-Y” switch to set the top and bottom margins (the syntax would be -Y -32,0,-32,0 for letterboxing 32 characters high). I use 4:3 so that the resulting video will be compatible with Grandpa’s TV.

If you have more than one video file, you’d process each separately (you can combine multiple avi files into a one big file using avimerge, but there are limits to what both encoders, and most DVD players, can work with — see my previous post on combining avi files). Keep in mind that video quality degrades with each of these encoding and merging operations. There are tricks to minimize such degradation, but at the cost of a significant delay in processing.

To combine multiple video and audio files into one DVD-ready mpg file, use mplex. Again, from the transcode tutorial (where 3 original avi files, “matrix”, “outtakes” and “thx” are used as examples):

mplex -f8 -o matrix_dvd.mpg matrix.m2v matrix.ac3
mplex -f8 -o outtakes_dvd.mpg outtakes.m2v outtakes.ac3
mplex -f8 -o thx_dvd.mpg thx.m2v thx.ac3

Copyright 2004-2019 Phil Lembo