Posts tagged audio

Extract Audio Track from a Video File

I needed to isolate the audio track from an HDV video I captured from my camera. This command worked great:

mplayer -dumpaudio video.m2t -dumpfile audio.mp3

as discussed here:

UPDATE: To extract wav audio data from a dv file, I had to use this command:

ffmpeg -i video.dv -vn -acodec copy audio.wav

Details here:

Cinelerra Audio Sync Problem on Ubuntu Jaunty

Everytime I try to set up Cinelerra on a new project or on a new system configuration, it takes a while to get everything working well. In my case, I have several new variables to contend with: I’m starting with HDV footage from a new camera, I have a new machine, I’m using a new version of Ubuntu and of Cinelerra.

This time around, I’ve had trouble with audio sync during playback. The symptom is that when I play a dv clip (which is fine on its own in VLC) in the Compositor Window in Cinelerra, I get a 10 second audio time lag which seems impossible to correct by nudging or setting the audio offset value.

Fortunately, this doesn’t seem to affect rendering, but it still makes it tough to edit properly. After a great deal of fiddling, I finally discovered (via a note here) that I could use the Pulseaudio sound driver in Ubuntu (select “Esound” and port 7007 in the Cinelerra Playback settings) instead of ALSA. Suddenly, my project sounded much better. The audio track was still out slightly, but I used the technique described in Secrets of Cinelerra to sync the sound using the nudge value of the audio tracks. There is additional helpful info on audio syncing here.

I was surprised that this simple matter took so much searching to solve. Here’s hoping that this post will pop up in future searches.

To summarize, if you are running Cinelerra on Ubuntu and have audio sync problems, try switching your audio driver to “esound” on port 7007 and you may be pleasantly surprised.

UPDATE: This is very weird, but the above config works fine when I run Cinelerra as a user, but NOT when I run it as root! Obviously, I’ve got the PulseAudio settings messed up somewhere, but at least it works.