Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to record a screencast using avconv (installed from official repo). All seems to work OK, except one thing: Always, the last 5 seconds from my mic audio are dropped from the final video.

I use this command:

avconv -f alsa -i pulse -f x11grab -r 10 -s 1366x768 -i :0.0 -c:a libmp3lame -q:a 9 -c:v libx264 "$HOME/screencast_001.mkv"

My output file is great, exactly as needed, except that ALWAYS the last 5 seconds of AUDIO is discarded. Video is OK until the end. Any hint about what can I do to fix it?

My system is Ubuntu 12.04.4 LTS 64 bits, all up to date.

share|improve this question

1 Answer 1

I assume that you are ending the recording by pressing Ctrl+C in the terminal. This ends the program without letting it finish what it has started. What that means is that some of the audio just hasn't been processed yet. The issue is with the processor time, you have a lot of load going on with video conversion on the fly, and thus audio gets buffered and then processed quickly as a batch of some seconds. When you terminate the program, there is always some audio left in the buffer that hasn't been processed yet.

One simply approach would be to just wait a little bit before terminating the recording.

If you are open to using other software, you can also use RecordMyDesktop, which generates Ogg+Theora videos and works quite nicely on my system.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.