Xvidcap and Screencast with audio question in general...

Ok,

I’m wondering what I am missing. I have a logitec USB webcam with a mic. I use it for Team Speak, and Skype, so I know it works (I literally just placed a test call in skype to confirm…)

I am trying to record a screen cast in OpenSUSE 11.3 and KDE4 with audio. Using any application that will do it.

I have tried gtkrecordmydesktop… but when I click on the “advanced” button to setup my audio… nothing happens… so I moved on. (it is supposed to present a window with options for setup… like sound source…)

I tried xvidcap, but I don’t know what “device” to point the capture at. When I try to record from /dev/dsp (the default device) I get an error that says it cannot identify the file type. What “device” do I need to point to to get it to use my mic?

I have read about half a dozen forums about the issue, and many of them say that normally it is a mixer problem. I have systematically gone through my mixer item by item adjusting capture settings, mute, and volume levels on each item, then recorded to see if I got sound… and I got nothing.

I know the device works, and I can get it to work in some programs (team speak, and skype), but How to I tell xvidcap to use it???

I found my device in the /dev list… it is
/dev/snd/by-id/usb-046d_08c9_938E22B5-02

But when I point to that I get the same error.

I am not stuck on any one program to do this but I need to be able to record screen casts with synchronized audio in Linux. I am not afraid of the console or shell scripts… can anyone offer some suggestions… I have a working mic… I just need something that can use it.

The best recommendation I’ve heard (so far) is running VNC and using camstudio in windows… but since my windows box is the same as my linux box… that is a bit difficult… I really need a real linux solution.

I have trouble believing there isn’t a higher demand for this.

I gave some thought to this recently, and I came up with a blank ‘slate’. So I am curious to read if you get any response. The reason I was curious, is because I now chat with my 84+ year old mother via Skype, where she lives in Canada and I live in Europe. I can only visit her once/year, and I am always worried she may not be around much longer … hence I would like to record (for prosperity / rememberance) some of our chat sessions. But I don’t see an easy way to do it (aside from setting up my videocamera on a tripod).

The problem as I see it, is Linux is not friendly for having more than one application share audio devices. Now it is possible with Pulse Audio, and in some cases using the ALSA API, for multiple applications to share an audio device for independantly sending sound to the speakers. But I am not aware of any method to send both the audio received via an application such as Skype, and send the output of a mic, to a record function, while one is also using an application such as Skype.

That is much more complex than a simple webcam audio/video recording, where applications such as wxcam and guvcview (in particular) are great.

I think with xvidcap (which I have used briefly) one could capture one’s desktop, and in that desktop have the video output of one’s webcam showing one chatting … however my guess is the audio may not be properly recorded (although I have not tried).

I looked at the xvidcap web site resources found here:

SourceForge.net: Faq - xvidcap

From a cursory glance, it seems to me that you need to use the OSS-emulation provided by ALSA. This doesn’t seem to be loaded by default.

I did a quick experiment. From a console, I su’d to root, and then ran:

modprobe snd_pcm_oss
modprobe snd_mixer_oss

which are the the OSS compatibility drivers. After this, /dev/dsp becomes available. Checking permissions on /dev/dsp, you will need to add your user to the audio group for rw access.

From there, you might need to look at mixer settings.

Anyway, maybe this helps, maybe not.

Paul

I performed the modprobe of both, I added my user to the group “audio”, then I worked on my mixer settings for about 10 min, trying everything I could think of. No luck unfortunately.

Did you log out and back in after adding the user to the audio group?

Nope… but I should have eh? :slight_smile: Next time I can stop, I’ll give it a shot. (I have to many things open I can’t close at the moment.). I’ll let yah know how it goes.

Please, can you explain again what you are attempting to do ?

I recorded the following a few minutes ago …
https://www.youtube.com/watch?v=3Kk3M7AAsk0)

My apologies for the poor quality. I’m a bit tired after a long day at work and I did not exactly dress up for the occasion.

I recorded this with xvidcap on an openSUSE-11.2 desktop. You can see firefox and guvcview applications running (guvcview has the webcam image). The audio is recorded by xvidcap.

Normally I would record a video at 800x600 and not the 1720x968. But I did this in a hurry.

After recording, I changed the resolution to 1280x720 and to the h264 codec using microchip’s h264enc scipt. But that desync’d the audio, so I used avidemux to bring the audio closer to sync with the video (but its still not perfect). I could have been a better job, but I am very tired right now.

I’m going to delete this after a few days or so.

Is this the sort of thing you want to do ?

Here are my xvidcap settings:

**General:
**http://thumbnails13.imagebam.com/10902/08ef3d109019189.jpg](http://www.imagebam.com/image/08ef3d109019189)
and

Single-Frame:
http://thumbnails13.imagebam.com/10902/48aa0a109019203.jpg](http://www.imagebam.com/image/48aa0a109019203)
and

Multi-Frame:
http://thumbnails32.imagebam.com/10902/602614109019206.jpg](http://www.imagebam.com/image/602614109019206)
and

Commands:
http://thumbnails25.imagebam.com/10902/0b808d109019208.jpg](http://www.imagebam.com/image/0b808d109019208)

I did nothing special that I can recall. I simply installed xvidcap and I used the default values, and it worked.

Yes, changes to group memberships are not effective until next login. No need to reboot though.

How’s it going ? Still stymied, or have you made progress ?

I think I more or less succeeded here earlier tonight recording a video chat session I had with my mother (she lives in North America and I live in Europe).

First, some information on the two Mics on my PC. From "arecord -l " :


oldcpu@core-i7:~> arecord -l
**** List of CAPTURE Hardware Devices ****
**card 0**: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog]
  Subdevices: 3/3
**  Subdevice #0: subdevice #0**
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
**card 1**: U0x46d0x821 [USB Device 0x46d:0x821], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  **Subdevice #0: subdevice #0**

So my headset Mic is hw:0,0 and my USB mic is hw:1,0

Now my mother’s PC is running a 64-bit openSUSE-11.3 KDE4 (as is my PC). Before connecting the video chat, I sent the ffmeg command below (to record video with ffmpeg via x11grab and record audio with my USB mic), and then we connected with Skype and initiated an audio chat.

ffmpeg -f alsa -ac 2 -i **hw:1,0** -f x11grab -r 30 -s 1920x1200 -i  :0.0 -acodec pcm_s16le -vcodec libx264 -vpre lossless_ultrafast -threads  0 output.avi 

where the output video will be ‘output.avi’. After the Skype call was complete, I stopped the recording by pressing <CTRL><C>.

Note again that the audio device recording with ffmpeg “hw:1,0” is my webcam mic. My webcam is a Logitech® HD Pro Webcam C910 and its mic has a general ‘broad’ pickup of all sound in the area.

Then for Skype, I had assigned device “hw:0,0” which is my headset mic. Hence Skype captured only audio coming from my headset mic (and not from the USB mic). I also made certain that my PC was configure so that the voice of the person I was talking was coming out of the speaker on my PC.

Thus my webcam mic recorded all audio in my room, which was my voice and also my mother’s voice, (coming out of my PC’s speakers). And my voice was transmitted thru Skype with my headset’s microphone.

Yes, its likely NOT the optimal way to do this, but at least it works ! :slight_smile: