Gstreamer Recording Video with Audio

Gstreamer Record Audio and Video

rtspsrc location=[RTSP_Server_IP] name=rtspsrc

! rtph264depay ! h264parse ! mpegtsmux name=mux ! filesink location="test.mp4" rtspsrc.

! rtpmp4gdepay ! aacparse ! mux.

Mix webcam video, audio with gstreamer

h264parse needed before mux

gst-launch-1.0 -v \
v4l2src device=/dev/video2 ! queue ! video/x-h264,framerate=30/1,width=1920,height=1080 \
! h264parse ! mux. \
alsasrc device=hw:1 ! queue ! audioconvert ! fdkaacenc ! mux. \
matroskamux name=mux ! filesink location=video.mp4

capture segmented audio and video with gstreamer

I needed to send the audio stream to the audio track of the muxer like so: mux.audio_0

gst-launch-1.0 -ev ksvideosrc ! video/x-raw !
videoconvert ! queue !
splitmuxsink max-size-time=1000000000 muxer=avimux name=mux
location=video%04d.avi autoaudiosrc !
decodebin ! audioconvert ! queue ! mux.audio_O

This happens when the documentation should be clear but you're missing out on some basic knowledge on how to interpret it.

capturing both audio and video with gstreamer to a file

Your pipeline is not correct. You have just one continuous pipeline. What you look for is more like a "Y" shaped one:

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

Note the dot at qtmux0 after your queue. This means "connect to the qtmux0 element" (which is the default name for the first qtmux element in your pipeline). After that there is no "!" - so the autoaudiosrc element following marks the begin of a new "branch" of your pipeline.

I did not test this.. so I hope got the syntax right..



Related Topics



Leave a reply



Submit