I know this thread is old but I found a solution that works for me and wanted to share. Here is part of a script that I wrote:
Code:
nohup ffmpeg -y -f x11grab -r 30 -s 1280x800 -i :0.0 -sameq -vcodec libx264 /tmp/video.tmp.avi > /tmp/nohup$$.out 2>&1 &
P1=$!
ffmpeg -y -f alsa -i hw:0,0 -acodec libmp3lame -ac 1 -ar 44100 -ab 128k /tmp/audio.tmp.mp3
/bin/kill -s INT $P1
ffmpeg -i /tmp/video.tmp.avi -i /tmp/audio.tmp.mp3 -vcodec copy -acodec copy $1.avi
if [ "$?" -eq 0 ]
then
rm /tmp/video.tmp.avi /tmp/audio.tmp.mp3
else
echo "Muxing error, temporary files have not been deleted from /tmp"
fi
Bookmarks