Tame your video files

ffmpeg

An advanced tool and able to handle most file formats, is ffmpeg. Install it with:

sudo apt-get install ffmpeg

 

Converting to SVCD

Convert all files in current directory to SVCD (PAL):

for file in *; do ffmpeg -i $file -target pal-svcd ${file}_final.mpg ; done

Convert all files in current directory to SVCD (NTSC):

for file in *; do ffmpeg -i $file -target ntsc-svcd ${file}_final.mpg ; done

 

Converting to VCD

Convert all files in current directory to VCD (PAL):

for file in *; do ffmpeg -i $file -target pal-vcd ${file}_final.mpg ; done

Convert all files in current directory to VCD (NTSC):

for file in *; do ffmpeg -i $file -target ntsc-vcd ${file}_final.mpg ; done

 

Merging mpg-files

Combine two mpg-files to one, as mpeg:

cat file1.mpg file2.mpg |ffmpeg -i - -f mpeg -vcodec copy -acodec copy merged.mpg

Combine two mpg-files to one, converting to SVCD while keeping the audio in sync:

cat file1.mpg file2.mpg |ffmpeg -i - -async 2 -vsync 1 -target pal-svcd merged.mpg

 

 

transcode-utils

Merging avi-files requires specific tools. This is where avimerge comes to the rescue! Install it with:

sudo apt-get transcode-utils

Also included with this package is:

  • avifix
  • aviindex
  • avimerge
  • avisplit
  • avisync

 

Merging avi-files

Combine two avi-files to one:

avimerge -i file1.avi -i file2.avi -o merged.avi
This entry was posted in Linux and tagged , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *