Tag Archives: mplayer

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.

pymp on FreeBSD

When installing pymp, you get:

% sudo make install
...
install pymp //usr/local/bin
sed -i "s|PREFIX|/usr/local|g" //usr/local/bin/pymp
sed: 1: "//usr/local/bin/pymp": invalid command code u
*** Error code 1

Stop in /usr/local/src/pymp-1.0.

Change the path manually in /usr/local/bin/pymp.

Also, FreeBSD doesn’t have bash installed by default, and when it does, it’s in /usr/local/bin/bash. So, in /usr/local/bin/pymp (or wherever you installed it) change the first line from

#!/bin/bash

to

#!/bin/sh

or

#!/usr/local/bin/bash