Such an easy question

James Linder jam at tigger.ws
Fri Jul 23 05:19:41 UTC 2021


My question is so simple that I cannot believe there is no answer

I have a camera providing 1080 at 30Hz in h254
I want to record the output together with pulse audio.

Google is fulll of tales of woe: eg

http://gstreamer-devel.966125.n4.nabble.com/How-do-you-record-audio-and-video-off-a-webcam-td4687419.html

Trying his ‘it works’ scenario found it does not work is even worse than mp4:

 
Mine: audio cuts out in 15 sec

gst-launch-1.0 $@ v4l2src device=/dev/video2 ! queue ! video/x-h264,width=1920,height=1080,framerate=30/1 ! h264parse ! queue max-size-buffers=0 max-size-bytes=0 max-size-time=1000000000 ! mux. pulsesrc device=0 ! audioconvert ! queue ! avenc_aac ! queue ! mux. mpegtsmux name=mux ! filesink location='output.mp4'

His: audio cust out in 1 sec

gst-launch-1.0 $@ v4l2src device=/dev/video2 ! queue ! video/x-h264,width=1920,height=1080,framerate=30/1 ! h264parse ! queue max-size-buffers=0 max-size-bytes=0 max-size-time=1000000000 ! \
 mux.  pulsesrc device=alsa_input.usb-Sensoray_Co.__Inc._Sensoray_Model_2263_551645-04.analog-stereo ! audioconvert ! vorbisenc ! matroskamux name=mux ! filesink location=‘output.mkv'

Can anyone help?

thanks
James


More information about the gstreamer-devel mailing list