What a pity

James Linder jam at tigger.ws
Tue Jan 4 02:49:10 UTC 2022

> On 4 Jan 2022, at 7:58 am, Peter Maersk-Moller via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:
> Some webcams, like the old-timer Logitech C920, can deliver H.264 encoded video over V4L2.
> That said, while cameras like the C920 camera records frames at a steady rate evenly spaced apart in time, these arrive in the driver/kernel level unevenly spaced apart and may need a mechanism to timestamp them with an even spaced time stamps. However the uneven spacing may only occur either between each second or perhaps between each I-frame. Usually I-frames will be late and the following P and B frames may arrive in a bulk or in some cases, the fP and B frames following an I frame, may have the same timestamp or nearly the same timestamp, If this is the case and the hlssink2 muxer does not correct for the timestamps being evenly spread out (it most likely do not), the mixer may have a hard time to mux audio with perhaps correct timestamps and video with basically faulty timestamps. You can check that by adding the "identity silent=false" element to your video pipeline before the hlssink2 video input. You may have to add "-v" to gst-launch-1.0.

Peter thanks, I think we are starting to get somewhere:

If I make a recording and edit it with shotcut then shotcut complains of variable framerate etc etc
but if I take a native recording with sensorays API then shotcut thinks the framerate is fixed !!!

The trouble is

Sensoray (2263) has an h264 1080P30 stream (or P25) on /dev/video2
And if the API is using it, then it’s not availble.
They also supply a 768x576 preview on /dev/video0
Since they use USB2 bandwidth is an issue.

My record pipeline is (show the full pipeline to be pedanticall exact:

gst-launch-1.0 -e -v v4l2src device=/dev/video2 ! \
	video/x-h264,width=1920,height=1080,framerate=30/1 ! \
	tee name=vt \
	at. ! queue ! avenc_aac ! aacparse ! hl.audio \
	vt. ! h264parse ! queue ! avdec_h264 ! xvimagesink \
	vt. ! h264parse ! queue ! avdec_h264 ! xvimagesink \
	vt. ! h264parse ! hlssink2 max-files=15 name=hl \
	playlist-root=http://$IP playlist-location=/dev/shm/ch1.m3u8 location=/dev/shm/ch1_%05d.ts \
	vt. ! h264parse ! queue max-size-buffers=0 max-size-bytes=0 max-size-time=1000000000 ! \
	mux. \
	pulsesrc device=0 ! queue ! audioconvert ! \
	tee name=at \
	at. ! audioresample ! audio/x-raw, rate=48000 ! \
	queue ! avenc_aac ! queue ! \
	mux. mp4mux name=mux ! \
	filesink location=try26.mp4

Where may I fiddle to force the framerate


More information about the gstreamer-devel mailing list