recordmydesktop produces "Broken pipe: Overrun occurred" in Kubuntu Jaunty with HDA Intel

Bug #339648 reported by Vítor E. Silva Souza
50
This bug affects 7 people
Affects Status Importance Assigned to Milestone
recordmydesktop (Ubuntu)
Confirmed
Undecided
Launchpadnewbie

Bug Description

Binary package hint: recordmydesktop

vitor@seattle:~$ lsb_release -rd
Description: Ubuntu jaunty (development branch)
Release: 9.04
vitor@seattle:~$ uname -a
Linux seattle 2.6.28-8-generic #28-Ubuntu SMP Thu Mar 5 21:49:36 UTC 2009 i686 GNU/Linux
vitor@seattle:~$ apt-cache policy recordmydesktop
recordmydesktop:
  Installed: 0.3.7.3-1
  Candidate: 0.3.7.3-1
  Version table:
 *** 0.3.7.3-1 0
        500 http://it.archive.ubuntu.com jaunty/universe Packages
        100 /var/lib/dpkg/status

Recording the desktop with recordmydesktop in Kubuntu Jaunty (with KDE 4) with an HP 6730b with HDA Intel sound card produces "overrun occurred" errors randomly. When they occur, there is a skipping in the sound recording. Also, in long recordings you notice the audio and video are not in sync (the audio is faster).

In the attached Ogg Theora video you can notice the 2nd time I say "testing" there is a skip and right after that the overrun message comes in the screen. It happens again the 2nd time I say "10", you can't even hear the word "ten", it's totally cut from the recording.

On my /etc/modprobe.d/alsa-base file, I have:

options snd-hda-intel index=0 probe_mask=3 position_fix=3 model=laptop

Which made it work when I had Ubuntu (with Gnome) 8.10. If I remove this line, sound doesn't work on the speakers (only in the headphone). At least the following line has to be in the file, and with that line, the problem with recordmydesktop is still there:

options snd-hda-intel index=0 probe_mask=3 position_fix=3 model=laptop

Revision history for this message
Vítor E. Silva Souza (vitorsouza) wrote :
Revision history for this message
Vítor E. Silva Souza (vitorsouza) wrote :
Revision history for this message
Vítor E. Silva Souza (vitorsouza) wrote :
Revision history for this message
Vítor E. Silva Souza (vitorsouza) wrote :
Revision history for this message
Vítor E. Silva Souza (vitorsouza) wrote :

Just in case anyone arrives here with the same problem I'm reporting, I'm currently using a workaround: using arecord to record audio and recordmydesktop to record video only.

I made a bash script (I'm no bash script expert, so check if everything is OK before running it) that, when called, runs both programs in the background and when you press ENTER it finalizes both processes, waits for recordmydesktop to finish encoding the video and uses mencoder to merge audio and video into an AVI.

Usage:
recordSoundAndVideo.sh myvideo

(If the name of the video is not specified, it uses a default name)

nowardev (nowardev)
Changed in recordmydesktop (Ubuntu):
status: New → Confirmed
Changed in recordmydesktop (Ubuntu):
assignee: nobody → martinskerra
Revision history for this message
drcho (michael-digitallifedesign) wrote :

Check this!
http://odo.lv/Recipes/RecordmydesktopFix_en
the sound error workaround solved the problem for me (under ubuntu 9.04 with intel onboard soundcard on asus laptop)

Revision history for this message
Vítor E. Silva Souza (vitorsouza) wrote :

Hi drcho,

Thanks for your message, but neither

options snd-hda-intel position_fix=1 model=mobile

nor

options snd-hda-intel index=0 probe_mask=3 position_fix=3 model=laptop

fixed the issue for me. I've been using:

options snd-hda-intel model=mobile

which fixes the "Sound only on Headphones" problem, but regarding recordmydesktop it's the same thing as the other two lines: broken pipes are still occurring.

Revision history for this message
drcho (michael-digitallifedesign) wrote : Re: [Bug 339648] Re: recordmydesktop produces "Broken pipe: Overrun occurred" in Kubuntu Jaunty with HDA Intel

You are right. On my machine, it now works better but not perfect.
sometimes the recorder drops audioframes too.

drcho

Vítor Souza schrieb:
> Hi drcho,
>
> Thanks for your message, but neither
>
> options snd-hda-intel position_fix=1 model=mobile
>
> nor
>
> options snd-hda-intel index=0 probe_mask=3 position_fix=3 model=laptop
>
> fixed the issue for me. I've been using:
>
> options snd-hda-intel model=mobile
>
> which fixes the "Sound only on Headphones" problem, but regarding
> recordmydesktop it's the same thing as the other two lines: broken pipes
> are still occurring.
>
>

Revision history for this message
Michael A. Phillips (maphilli14) wrote :

@Vítor Souza

Thanks so much for the recording script. Is there any easy way to reassemble the 2 seperate audio and video streams? In the past I've used kdenlive or avidemux... but both are a bit intensive. Your record script is great!

Thanks!

Mike

Revision history for this message
Michael A. Phillips (maphilli14) wrote :

sudo aptitude install mencoder

and i'm in business!!!

Thanks much Vítor

Revision history for this message
Vítor E. Silva Souza (vitorsouza) wrote :

Mike,

I was going to say that joining the 2 separate audio and video streams is included in the script, but I guess you found that out already after installing mencoder... I'm glad it has been useful to someone else.

Vítor Souza

Revision history for this message
Michael A. Phillips (maphilli14) wrote :

Actually it's VERY useful, and would be nice if there was a way to toggle it on and off via the mouse?!

Thanks again!

Mike

Revision history for this message
jeadorf (jeadorf) wrote :

The following workaround fixed the problem on my installation:

# see http://alsa.opensrc.org/index.php/Proc_asound_documentation
echo "512" > /proc/asound/card0/pcm0c/sub0/prealloc
recordmydesktop -buffer-size 65536

(Ubuntu 9.04, recordMyDesktop v0.3.7.3, Intel sound card)

Revision history for this message
jeadorf (jeadorf) wrote :

I apologize. It just seemed to fix the problem. Might not have been the right buffer.

Revision history for this message
ncy (nyanginator) wrote :

this solution here works well for me:

http://ubuntuforums.org/showthread.php?p=3285506#post3285506

(changing the sound device to plughw:0,0)

Revision history for this message
Andrei Brănescu (andreibranescu) wrote :

I've had the same problem since I moved to Karmic. So, I compiled the latest version of recordmydesktop (command line) and it doesn't say buffer overrun any more. Instead, the sound is now behind the video. Probably it drops some video frames to catch all the sound. You can try this, and see if it works.

I'm still searching for a solution. The script (above posted) didn't work for me because arecord recorded really scratchy sounds.

Thanks for all the solutions, hope we'll figure it out.

Revision history for this message
Bill (hudacek) wrote :

Same problem on Lucid 10.04.1, recordmydesktop Version: 0.3.8.1+svn602-1ubuntu1. Kernel version 2.6.32-27-generic-pae.

Sound invariably quits recording partly through the larger recordmydesktop recording. This is very annoying - the recordmydesktop & gtk- variant are both completely unusable. I see this bug is more than a year old now. :-(

I'm not sure what 'confirmed, but undecided' means, but i found the arecord workaround to be successful. Tonight. After many hours lost. At some point, someone needs to debug this. If you are looking for that kind of assistance, please let me know and provide some guidance. Is this device driver? API? User-space, or kernel module? I don't know how to debug this.

Otherwise, I don't see why development should continue on this platform - frankly speaking, if I'd known it was going to cause me this much pain (think: "take 9! XXX tutorial"), I would not have tried to use it...but recordmydesktop has an excellent reputation. It's just broken on Ubuntu, apparently.........

Please let me know if I can help. I have a thinkpad w500 with 4GB of RAM, so resources are not at issue here.

/Bill

Revision history for this message
Richard Brown (rgbrown) wrote :

@Bill: I can confirm the problem that you are having. I'm recording ~50 minute screencasts (lectures for a course at University of Canterbury where the contact hours have dropped significantly after the Christchurch earthquake) , and as often as not the sound drops out completely 30-40 minutes in, which is VERY frustrating, especially as recordmydesktop gives no indication that there has been a problem, I only discover it when I try to play the video. I use it from the command line with 100% video and sound quality.

I'm glad to hear it doesn't appear to be a resource issue though, as I'm using a slow laptop - an HP2710p with Maverick (1.2GHz Core 2 Duo, 2GB).

I'm not certain that it is the same bug as this one though.

Revision history for this message
Sena-ufc (sena-ufc) wrote :

The script doesn't work for me.
the line to convert ogv to avi was making a bad conversion.
I change the line:
mencoder -ovc lavc -oac mp3lame "$baseName.ogv" -o "$baseName-nosound.avi"
for
ffmpeg -i "$baseName.ogv" "$baseName-nosound.avi"

and works!

Attached, my version of the script.

Revision history for this message
pauljohn32 (pauljohn32) wrote :

Wow, I'm frustrated with recordmydesktop. I made some recordings in which the video played at double speed, out-racing the audio. Folks said change the window manager, don't use compiz. That solved that.

Now I've made 2 screencasts that are 20 minutes long and the damn audio recording stops after 7 and 9 minutes. How much madder can I get? Not much.

Revision history for this message
Richard Brown (rgbrown) wrote :

@pauljohn32 Welcome to my world! Except with me it was 50min lectures.

Try increasing the audio buffer size
--buffer-size 65536

This *seems* to have worked for me (have now done 5 in a row without this problem reoccuring)

Revision history for this message
Jason Joines (joines) wrote :

The --buffer-size 65536 got rid of the overrun error for me too but did not fix the problem of getting out of sync. I've also tried recorditnow, istanbul, and gtk-recordmydeskop but all have the same issue of getting out of sync.

I tried the recordSoundAndDesktop.sh from this bug report. Had to replace -fps and -v_quality with --fps and --v_quality first. The result was a video with audio and video still out of sync that also ran way to fast.

I'm using Kubuntu 11.04 on Lenovo T510 with this sound hardware:
20: PCI 1b.0: 0403 Audio device
  [Created at pci.318]
  Unique ID: u1Nb.WiEkMfkoYv9
  SysFS ID: /devices/pci0000:00/0000:00:1b.0
  SysFS BusID: 0000:00:1b.0
  Hardware Class: sound
  Model: "Intel Ibex Peak High Definition Audio"
  Vendor: pci 0x8086 "Intel Corporation"
  Device: pci 0x3b56 "Ibex Peak High Definition Audio"
  SubVendor: pci 0x17aa "Lenovo"
  SubDevice: pci 0x215e
  Revision: 0x06
  Driver: "HDA Intel"
  Driver Modules: "snd_hda_intel"
  Memory Range: 0xf2620000-0xf2623fff (rw,non-prefetchable)
  IRQ: 41 (25351 events)
  Module Alias: "pci:v00008086d00003B56sv000017AAsd0000215Ebc04sc03i00"
  Driver Info #0:
    Driver Status: snd_hda_intel is active
    Driver Activation Cmd: "modprobe snd_hda_intel"
  Config Status: cfg=new, avail=yes, need=no, active=unknown

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.