Capturing internal audio with gstreamer + ALSA

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Capturing internal audio with gstreamer + ALSA

Muammar El Khatib
Dear all,

I am trying to capture internal audio using gstreamer, so far I came with this
pipeline that sends the captured audio to stdout:

```
gst-launch-1.0 -v alsasrc device="hw:0,0" ! audioconvert ! lamemp3enc target=1 bitrate=64 cbr=true ! filesink location=/dev/stdout
```

This command works, but it is capturing audio from the microphone. To give more
information about my setup I would like to add that I am not using pulseaudio
for this, just ALSA. My sound card info:

```
± % lspci |grep Audio
!10018
00:03.0 Audio device: Intel Corporation Broadwell-U Audio Controller (rev 09)
00:1b.0 Audio device: Intel Corporation Wildcat Point-LP High Definition Audio
   Controller (rev 03)
```

arecord is showing the following:

```
± % arecord -L                                                                                                                                         !10016
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=PCH
    HDA Intel PCH, CS4208 Analog
    Default Audio Device
sysdefault:CARD=PCH
    HDA Intel PCH, CS4208 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, CS4208 Analog
    Front speakers
dmix:CARD=PCH,DEV=0
    HDA Intel PCH, CS4208 Analog
    Direct sample mixing device
dsnoop:CARD=PCH,DEV=0
    HDA Intel PCH, CS4208 Analog
    Direct sample snooping device
hw:CARD=PCH,DEV=0
    HDA Intel PCH, CS4208 Analog
    Direct hardware device without any conversions
plughw:CARD=PCH,DEV=0
    HDA Intel PCH, CS4208 Analog
    Hardware device with all software conversions
```

I have tried different devices, but it is not working. I would be glad if
anybody could help me with this?.

OTOH, if instead of sending the audio to stdout I would like to stream it via
http, how should I modify the last part of the gst-launch-1.0 command?.

Regards,
--
Muammar El Khatib.
http://muammar.me
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Capturing internal audio with gstreamer + ALSA

Muammar El Khatib
On Wed, Sep 14, 2016 at 7:31 PM, Muammar El Khatib
<[hidden email]> wrote:
> Dear all,
>
> I am trying to capture internal audio using gstreamer, so far I came with this
> pipeline that sends the captured audio to stdout:
>
> ```
> gst-launch-1.0 -v alsasrc device="hw:0,0" ! audioconvert ! lamemp3enc target=1 bitrate=64 cbr=true ! filesink location=/dev/stdout
> ```
>


For those interested, I solved this problem with this:

http://unix.stackexchange.com/questions/310164/create-virtual-device-in-asoundrc-file



--
Muammar El Khatib.
http://muammar.me
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel