I want to create some screencast, I am using avconv (recent ffmpeg counterpart) for doing so.
This is the reference for command I used. I also referred the avconv manual pages. Due to some reason I am unable to record audio from microphone into the screencast.
What is the -f
switch for audio from microphone? I tried -f jack
but it gives an error message.
I am not sure whether the microphone audio drivers are installed on my PC. Command I used is as follows:
avconv -f x11grab -f jack -s hd1080 -r 30 -i 0:0 screencast.mov
Error message I get is:
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
exec of JACK server (command = "/usr/bin/jackd") failed: No such file or directory
jack server is not running or cannot be started
[jack @ 0x9b6dc80] Unable to register as a JACK client
0:0: Input/output error
Make sure microphone is properly plugged in. You may also test your recording settings using "sound recorder" on your Ubuntu.
Now, execute the following command on terminal by replacing 1366x786 by your screen resolution.
avconv -f alsa -i pulse -f x11grab -r 30 -s 1366x768 -i :0.0 -vcodec libx264 -preset ultrafast -threads 4 -y myscreencast.mp4
If you use avconv regularly of making screencast you would like to avoid typing above command each time (in that case, do the following) :
Save the script given below in ~/Videos/ with filename
screencast
Do,
chmod +x screencast
Now, double-click on screencast file and "Run in Terminal" Enter the name of video you want to make(filename and extension eg:myvideo.mkv or myvideo.mp4).
Finally, on completing your screencast, do
^C
(contol+c) in terminal.Your video will be saved in
~/Videos/
Bingo!!!remove the
-f jack
and try-f alsa -i plughw:1,0
.You might need to substitute the 1 and the 0 for some number smaller than 3 (*) (maybe
-f alsa -i plughw:0,0
, or-f alsa -i plughw:0,2
...)this works on ffmpeg. Hopefully it will work on avconv as well
(note: jack is the name of a sound system, a part of the operating system that deals with audio. alsa is another sound system. My answer uses alsa just because it was the way I copied from somewhere online, a long time ago =P)
(*) these numbers have to do with the number of your soundcard and the number of the device in the soundcard