What a pity

Peter Maersk-Moller pmaersk at gmail.com
Mon Jan 3 23:58:12 UTC 2022


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.

Regards
Peter MM

On Mon, Jan 3, 2022 at 11:31 PM Jeff Shanab via gstreamer-devel <
gstreamer-devel at lists.freedesktop.org> wrote:

> Webcams are raw yuv video, arn't they? gstreamer in this case is using
> ffmpegs x-h264 to encode it
>
>
> On Mon, Jan 3, 2022 at 4:51 PM Nicolas Dufresne via gstreamer-devel <
> gstreamer-devel at lists.freedesktop.org> wrote:
>
>> Hi James,
>>
>> Le lundi 03 janvier 2022 à 07:16 +0800, James via gstreamer-devel a
>> écrit :
>> > gstreamer seems very nice in concept. The fact that I've been trying
>> for 3 months and can get no help is a big deterent.
>> >
>> > I've got a 4 core i7 NUC clocked to 4.8G and I get a stream of QoS
>> messages telling me the computer is too slow.
>> > (GST_DEBUG=2,pulsesrc:6)
>>
>> Sorry if previous message were missed. Perhaps your issue is specific to
>> your
>> WebCam ? I don't owned myself a webcam that encodes to H264, so I've used
>> vaapih264enc, and performance was decent.
>>
>> Asking question on public channels is an art, make sure to narrow down as
>> much
>> as possible your issue, and try to think on how others will be able to
>> reproduce, if you can't make sure to share extra information that would
>> allow
>> controlling the variable when simulating with audiotestsrc and similar.
>>
>> regards,
>> Nicolas
>>
>> >
>> > The machine is idle running a single pipeline.
>> > The stream stutters. ffmpeg shows dup and often a 100 dropped frames on
>> each segment.
>> >
>> > Using audiotestsrc renders perfectly.
>> >
>> > #! /bin/bash
>> >
>> > IP=`hostname -I`
>> >
>> > gst-launch-1.0 -e -v v4l2src device=/dev/video2 ! \
>> >       video/x-h264,width=1920,height=1080,framerate=30/1 ! \
>> >       h264parse ! \
>> >       tee name=vt \
>> >       vt. ! queue ! hlssink2 max-files=5 name=hl \
>> >       playlist-root=http://$IP
>> playlist-location=/dev/shm/channel1.m3u8 location=/dev/shm/segment_%05d.ts \
>> >       pulsesrc device=0 ! audioconvert ! avenc_aac ! \
>> >         tee name=at \
>> >       at. ! queue ! aacparse ! hl.audio
>> >
>> > The redundant tee's are for use later.
>> > unless I see a euroka moment I'll have to try somethink else
>> > James
>> >
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220104/5011a9bc/attachment.htm>


More information about the gstreamer-devel mailing list