Re: [LAU] Recording a video with High quality audio

From: Jannis Achstetter <jannis_achstetter@email-addr-hidden>
Date: Mon Apr 20 2015 - 07:24:16 EEST

Hello Ivan,

Am 20.04.2015 um 05:46 schrieb Ivan K:
> [...]
> Is there any application that can record video
> from a webcam but use an audio input other than
> the built-in mic on the cam?

This can be done very easily using gstreamer. You can construct
pipelines from single elements. Here's an example that might work for
your application:

gst-launch-1.0 v4l2src ! video/x-raw,width=640,height=360,framerate=30/1
! vp8enc deadline=30000 threads=4 ! queue ! matroskamux name=mux !
filesink location=test.mkv jackaudiosrc ! audio/x-raw,channels=2 !
audioconvert ! opusenc ! queue ! mux.

This will grab raw video from your cam, encode it, mux it and save it to
a file. Furthermore, audio will be grabbed from jack, encoded and also
muxed to the same file. If your webcam supports it, you can also take an
encoded stream from the device and add audio without re-encoding:

gst-launch-1.0 v4l2src !
video/x-h264,width=640,height=360,framerate=30/1 ! h264parse ! queue !
matroskamux name=mux ! filesink location=test.mkv jackaudiosrc !
audio/x-raw,channels=2 ! audioconvert ! opusenc ! queue ! mux.

Here's some docs if you need further info:
http://docs.gstreamer.com/display/GstSDK/Basic+tutorial+10%3A+GStreamer+tools

Best regards,
        Jannis

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Mon Apr 20 08:15:01 2015

This archive was generated by hypermail 2.1.8 : Mon Apr 20 2015 - 08:15:01 EEST