Missing /dev/dsp* - what do I need to do/install for sound input from mencoder?

10,963

The problem seems to be that you're recording from a webcam and while the webcam might be the same, the sound device you're recording from isn't. So you end up with different results.

The first thing to do is to test you can record sound at all, use the sound recorded to test this and make sure to adjust the settings in System > Preferences > Sound

Once you know the sound input works, next you just need to use padsp in front of your command above, for instance:

padsp mencoder tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0:forceaudio:adevice=/dev/dsp1 ...

This command makes a /dev/dsp access for your command on the fly and pipes the sound via pulseaudio. See details here:

http://manpages.ubuntu.com/manpages/hardy/man1/padsp.1.html

Share:
10,963

Related videos on Youtube

JasonWoof
Author by

JasonWoof

Updated on September 17, 2022

Comments

  • JasonWoof
    JasonWoof over 1 year

    Linux sound is generally very confusing to me, especially when two different machines running the same version of Ubuntu don't behave at all the same way.

    I'm trying to use mencoder to record a video stream to an AVI file. From one of my laptops (an HP dv7) it works exactly as some random Ubuntu wiki post says it should with this command:

    mencoder tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0:forceaudio:adevice=/dev/dsp1 -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o webcam.avi
    

    On another laptop (a Lenovo Ideapad U460), that fails because there's no /dev/dsp1. There's no /dev/dsp or /dev/audio anything. There is a /dev/snd directory with various cryptically-named files in it, but I have no idea which is which.

    The webcam on the lenovo does work; I've tried it with Cheese. I would however like to at least understand why the systems would be different. (I have not done a side-by-side installed package comparison, I confess.)

    Any suggestions on packages to install or diagnostics to perform are welcome. Thanks.

    • Martin Owens -doctormo-
      Martin Owens -doctormo- over 13 years
      It looks like you're trying to record from a TV source (or a webcam) and it's important that when you enable the video source that you're using the correct sound module that makes the sound part of the any video-in device work. Can you explain further about what you're trying to do?
    • JasonWoof
      JasonWoof over 13 years
      Yes - record a video stream from a webcam.
  • Kees Cook
    Kees Cook over 13 years
    10.10 Maverick finally disabled the very old OSS drivers (which provided /dev/dsp, so the padsp wrapper is the easiest way to handle if it you can't select ALSA or PulseAudio directly.
  • David
    David almost 13 years
    padsp does not work for all programs, and does not provide complete emulation. The alternative OSS proxy (ossp) is even worse.