This is my first post so I hope I don't annoy anyone. Basically, I'm on the verge of having a single command that will enable me to record all three elements of a screencast -- desktop, audio, and webcam -- but it is falling at the final hurdle.
- Ubuntu Lucid with updates
- Dell Inspiron 1520
- NVidia drivers
- Onboard webcam
- FFmpeg version SVN-r24872
I have two scripts that work independently, but I can't get them to work simultaneously. I have tried chaining the commands, but I get an error and I don't know how to solve it. I hope someone can give me some pointers.
Screencast: Desktop and Audio:/usr/bin/screencast:
# Record The Screencast
ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 30 -s 1440x900 -i :0.0 -qscale 1 -acodec alac -vcodec libx264 -vpre lossless_ultrafast -threads 0 ~/Videos/output.m4v
# Move and Rename the Screencast
mv ~/Videos/output.m4v ~/Videos/Screencasts/Screencast_on_$(date +%F_%A_at_%H:%M:%S).m4v
## Talking Cow (XCowsay 1.2 installed from source file)
xcowsay --cow-size=large --time=3 --monitor=0 "Your video has been recorded "
On its own, this works absolutely wonderfully.
## Record from webcam in 320x240 resolution
ffmpeg -f oss -i /dev/dsp -f video4linux2 -s 320x240 -i /dev/video0 ~/Videos/recording.mpg
## Wait for video to be created
# sleep 5
## Move file to ~/Videos/Screencasts
mv ~/Videos/recording.mpg ~/Videos/Screencasts/Webcam_on_$(date +%F_%A_at_%H:%M:%S).mpg
On its own it works perfectly too.
PROBLEM: They do not work together!
I have tried the following command without success:
(gnome-terminal -e screencast &);(gnome-terminal -e webcamscript)
The thing is that it opens two gnome-terminals, as I need in order to stop recording when I'm done, and webcamscript works perfectly, but my screencast (ffmpeg x11grab and audio) gives me the following output:
FFmpeg version SVN-r24872, Copyright (c) 2000-2010 the FFmpeg developers
built on Aug 23 2010 20:50:39 with gcc 4.4.3
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
libavutil 50.24. 0 / 50.24. 0
libavcore 0. 6. 0 / 0. 6. 0
libavcodec 52.85. 1 / 52.85. 1
libavformat 52.78. 3 / 52.78. 3
libavdevice 52. 2. 1 / 52. 2. 1
libavfilter 1.37. 0 / 1.37. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
[alsa @ 0xa9c9470] capture with some ALSA plugins, especially dsnoop, may hang.
When I tried it initially, it actually did work. I must have done something differently since then, but I can't figure it out. Ideas, anyone?