Tag Archives: ffmpeg

Converting files to mp3

I have previously used Lame to convert different file formats to mp3. Having stumbled on some mp4 videos that refused to being converted to mp3 I thought I’d try my luck with FFmpeg instead.

Using FFmpeg was quite easy:

ffmpeg -i infile outffile.mp3

Controlling the bit-rate of the created file:

ffmpeg -b 192 -i infile outffile.mp3

 

The mp4 file was converted to mp3 without problems. Mission accomplished!

Posted in Linux | Tagged , , , , | Leave a comment

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:

Posted in Linux | Tagged , , , , , , , , , , , , , , , , , , | Leave a comment