capturing both audio and video with gstreamer to a file

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

capturing both audio and video with gstreamer to a file

xargon
I am using gstreamer to capture both audio and video to a file. I tried something as:

gst-launch-1.0 -v -e autovideosrc ! queue ! omxh264enc ! 'video/x-h264,
stream-format=(string)byte-stream' ! h264parse ! queue ! autoaudiosrc !
voaacenc ! qtmux ! filesink location=test.mp4

This returns an error saying that I cannot connect the queue to an audiosrc.

Capturing just the video with:

gst-launch-1.0 -v -e autovideosrc ! queue ! omxh264enc ! 'video/x-
h264, stream-format=(string)byte-stream' ! h264parse ! qtmux !
filesink location=test.mp4

This works fine. How can I simultaneously record audio and video to same file? I tried using a tee element but could not figure out how to use a common sink.
Reply | Threaded
Open this post in threaded view
|

Re: capturing both audio and video with gstreamer to a file

Ian Davidson
Your pipeline should be 'Y' shaped - with two different inputs: The
Video and the Audio.

Your Video works fine - but the mux is used to multiplex together the
Audio and Video components.

Give your mux a name.  Then write a section of pipeline to process the
audio and then pass the audio into the named mux.

You DO NOT want a '!' in front of autoaudiosrc - because that is the
beginning of the audio processing line.

On 18/04/2016 20:40, xargon wrote:

> I am using gstreamer to capture both audio and video to a file. I tried
> something as:
>
> gst-launch-1.0 -v -e autovideosrc ! queue ! omxh264enc ! 'video/x-h264,
> stream-format=(string)byte-stream' ! h264parse ! queue ! autoaudiosrc !
> voaacenc ! qtmux ! filesink location=test.mp4
>
> This returns an error saying that I cannot connect the queue to an audiosrc.
>
>

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel