How to achieve audio recording in XVidCap...

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

How to achieve audio recording in XVidCap...

#1 Post by Mike Walsh »

Afternoon, boys & girls.

Screencasting, specifically capturing not only video but also audio, is often fraught with pitfalls in Puppy. I have several screen capture apps installed in Puppy, including RecordMyDesktop and my personal favourite (for ease of use), XVidCap.

I've figured out the way to record screen activity along with an audio commentary, by using the Logitech headset I bought last year. This works very well, and the results can be seen in one or two of my most recent YouTube Puppy videos.

However, getting any of these to record screen activity along with system audio has always eluded me. Until today, that is. I've been experimenting with various XVidCap settings, along with system mixer settings.....and, quite by accident, seem to have hit on a combination that works for me.

--------------------------------------------

So; this is my preferences screen in XvidCap, under the 'Multi-frame' tab:-


[Click to enlarge]

Image


1.) By default, XVidCap comes with all checkboxes ticked to 'Auto' settings, which gives the file format as 'General AVI file (DivX default) (mpeg)', and the video codec as 'MPEG 4 (DivX)'. We don't want this, so.....

2.) Uncheck the 'File format' checkbox. From the drop down, select the top option; 'Microsoft Audio Video Interleaved File (avi)'. Seriously! By default, this then changes the video codec to 'Microsoft DIVX 2'.

3. Leave the 'Audio codec' on 'Auto'. By default this gives you mp3.

4.) Other settings, as in the image above.

5.) Hit 'OK', then right-click again, and 'Save Preferences'. Now you're ready to try it out.

--------------------------------------

In Retrovol (or whatever mixer you use; some like ALSAmixer, some use PNMixer with 'gnome-alsamixer'. Doesn't matter), make sure you've got 'Capture Source' set to 'Mix'. You may need to play around with the PCM level the first few times you try this; although it's beneficial to have it set to 'Max' for playback, it also affects audio capture when using 'Mix' as the capture source, so needs to be set rather lower.

FireXVidCap up, set your screen size to where you want it (I like to detach the toolbar with the lock symbol, and move it out of the way to one side), and hit 'Record' to start. All things being equal, you'll actually see some response from the level meter on the left-hand side; it's the first time I've seen such, myself. Record for however long you want, then stop it. You'll find the resulting video clip in /root.

When you play it back with your media player of choice, you should have audio with it as well!

-------------------------------------

Now, I make no guarantees that this will work for everybody. My Pups get used as real 'test-beds' for so much stuff, it's a tribute to their robust design that they still work at all. The only major 'mod' I've made is to replace the default 'ffmpeg' in /usr/bin with one of the much more up-to-date versions Fredx181 discovered not so long ago from John Van Sickle, here:-

https://johnvansickle.com/ffmpeg/

When I first started with Linux, over five years ago, audio capture worked fine in Ubuntu. When I moved to Puppy a year or so later, audio capture was horribly slow and distorted.....and this was on the exact same hardware. I thought I'd just have to live with it, until I tried one of Fred's DebianDogs a year back, and discovered that audio capture did indeed still work. It was software-related, not the hardware, as I'd originally thought, so.....'twas a case of tracking down the culprit.

A while back, I tried out Will McEwan's Wex screencaster. During that period, Fred produced a modified 'portable' version, with an up-to-date version of FFmpeg included; once again, audio was behaving itself. Fred also released that FFmpeg build as a 'drop-in' replacement for the default Puppy version (which was pretty old), to give a 'global' update, system-wide. I initially tried it out in Slacko 560, where I've been all day today. And XVidCap's also capturing audio for the first time.

So, I have eventually tracked down the suspect. Audio capture now works with everything; RecMyDesk, Wex, XvidCap, even in mhWaveEdit and don570's Bacon Audio recorder. All behaving themselves.

Just wanted to share this with y'all.....especially bearing in mind that during my research, I found umpteen tales of woe from folks who couldn't make this work.

(BTW, don't ask me what /dev/dsp is, or what it does. The only thing I've been able to glean is that it's a 'system inode' of some kind, but nobody seems to want to explain it further than that...)


Mike. :wink:
Last edited by Mike Walsh on Thu 20 Jun 2019, 20:53, edited 1 time in total.

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#2 Post by rufwoof »

Great that you got things sorted Mike.

Digital Signal Processing ... dsp

Unix is based on 'everything is a file' so for devices like keyboard, mouse, sound cards, monitor ...etc. the system creates a 'file' i.e. such as /dev/dsp that it can read/write to, same as any other 'file'. Unix file structure is fundamentally a directories entry group in which all filenames are recorded along with a pointer to the first inode, inodes - that are pointers to blocks of actual storage area and often are chained (next inode), and the actual data blocks where stuff/data is actually recorded, but for some 'files' there is no actual storage area (for instance sound once 'written' out - to the speakers is in effect lost).

As another example, your screen framebuffer (terminal screen) is usually /dev/fb0 and you can copy/write to that as you might copy/write to a regular file.
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

Post Reply