stuttering
James
jam at tigger.ws
Sun Jan 23 07:11:45 UTC 2022
On 22 Jan 2022, at 9:38 pm, Kaj-Michael Lang via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:
>
>
>
> On Sat, 2022-01-22 at 12:41 +0800, James Linder via gstreamer-devel
> wrote:
>> at. ! queue ! avenc_aac ! hl.audio \
>> vt. ! queue ! h264parse ! avdec_h264 ! xvimagesink \
>> vt. ! queue ! h264parse ! avdec_h264 ! xvimagesink \
>> vt. ! queue ! avdec_h264 ! queue ! x264enc tune=zerolatency
>> bitrate=1000 ! \
>
>
> You are decoding h264 3 times and also encoding aac audio and h264
> video at the same time. Perhaps optimizing the 3 decoding to 1 might
> help here.
I took this and Nicolas' advice and with a bit of trial and error I get a pipeline that previews and streams and has say 1 QoS event an hour (which is in the no-worries bracket) but I cannot record the stream. Tried to match caps etc. In the dump below the commented pipeline does work if I keep the bitrate below say 4000Kb/s.
The pipeline without the last 3 (record) lines works. With them I get
Setting pipeline to PAUSED ...
0:00:00.056481332 0x564e0e46b0c0 v4l2src gstv4l2src.c:694:gst_v4l2src_query:<v4l2src0>Can't give latency since framerate isn't fixated !
0:00:00.056498225 0x564e0e46b0c0 aggregator gstaggregator.c:2050:gst_aggregator_query_latency_unlocked:<mpegtsmux0>Latency query failed
<snip>
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
From the dot graph I can see framerate is NOT propegated, and my attempt to set the the output caps of h264parse results in a syntax error.
Can anyone teach me please.
James
#! /bin/bash
IP=192.168.5.150
gst-launch-1.0 -e -v v4l2src device=/dev/video2 ! video/x-h264,width=1920,height=1080,framerate=30/1 ! \
h264parse ! tee name=vt1 \
vt1. ! queue ! avdec_h264 ! tee name = vt2 \
vt2. ! queue ! xvimagesink \
vt2. ! queue ! xvimagesink \
at. ! queue ! avenc_aac ! hl.audio \
vt1. ! queue ! hlssink2 max-files=15 name=hl \
playlist-root=http://$IP playlist-location=/dev/shm/ch1.m3u8 location=/dev/shm/ch1_%05d.ts \
pulsesrc device=0 ! queue ! audioconvert ! \
tee name=at \
vt1. ! queue ! \
mp4mux name=mux ! \
filesink location=try7.mp4
##! /bin/bash
#
#IP=192.168.5.150
#
#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 ! hl.audio \
# vt. ! h264parse ! queue ! avdec_h264 ! xvimagesink \
# vt. ! h264parse ! queue ! avdec_h264 ! xvimagesink \
# vt. ! avdec_h264 ! x264enc tune=zerolatency bitrate=1000 ! \
# 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=try6.mp4
More information about the gstreamer-devel
mailing list