Tag Archives: video

Dump audio from video, revisited

From some post on some mailing list:

mencoder -v -ovc copy -oac mp3lame -o out.avi INPUT-FILE -ss HH:MM:SS
mplayer -v -vo null -vc dummy -ao pcm -dumpaudio -dumpfile out.mp3 out.avi

Advertisements

Dumping audio from video file

See here.

So I just use:

mplayer -dumpaudio <source> -dumpfile <destination>

It’s always useful to see beforehand what the format of audio in the source is.

Making a movie from image files using ffmpeg

There’s quite a lot of tutorials on the net, search for the title.

I had an issue, though: the images were taken with a web camera, and some of the images were garbled (wrong header, bad data, etc.). So ffmpeg choked on those silently, and the movie got cut off in the middle.

To find those, use something like

file * | grep

Also, to rename the images from the camera:

#!/bin/sh
#

n=1

for i in 122*; do
    echo $n
    cp $i processed/$n.jpg
    n=`expr $n + 1`
done