h264 stream still high bit rate when no movement

Marianna Smidth Buschle msb at qtec.com
Mon Oct 18 12:13:23 UTC 2021


Depends on encoder settings, rate-control (CBR, VBR, CQP,...) , but also
things like key frame interval.

Is that a Hw (vaapih264enc,...) Or sw (x264) encoder?

Also, what is the frame size and fps?

Streaminglearningcenter has a lot of good articles for understanding h264
and encoder "tunning".

I have a h264 stream (from a camera) and that is still 2mbit when there is
no movement. Can this be optimized so it has a much lower bit rate when
there is no movement, or do I then compromise on quality when there is
movement?

man. 18. okt. 2021 14.00 skrev <
gstreamer-devel-request at lists.freedesktop.org>:

> Send gstreamer-devel mailing list submissions to
>         gstreamer-devel at lists.freedesktop.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> or, via email, send a message with subject or body 'help' to
>         gstreamer-devel-request at lists.freedesktop.org
>
> You can reach the person managing the list at
>         gstreamer-devel-owner at lists.freedesktop.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of gstreamer-devel digest..."
>
>
> Today's Topics:
>
>    1. syntax (James Linder)
>    2. RE: syntax (Marc)
>    3. h264 stream still high bit rate when no movement (Marc)
>    4. Re: h264 stream still high bit rate when no movement (Jeff Shanab)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 18 Oct 2021 18:05:22 +0800
> From: James Linder <jam at tigger.ws>
> To: gstreamer-devel at lists.freedesktop.org
> Subject: syntax
> Message-ID: <D4DEDBDA-575F-4732-B23C-2D71FBFA02A4 at tigger.ws>
> Content-Type: text/plain;       charset=utf-8
>
> Help with the syntax please.
> I?m trying to feed audio to hlssink2
>
> James
>
> dvr at dvrTW:~> cat gst.haf
> #!/bin/bash
>
> IP=`hostname -I`
>
> gst-launch-1.0 \
>  hlssink2 playlist-location=/dev/shm/channel1.m3u8 playlist-root=http://$IP
> \
>  location=/dev/shm/channel1_%05d.ts max-files=15 target-duration=3 name=hl
> \
>  v4l2src device=/dev/video2 ! \
>  video/x-h264,width=1920,height=1080,framerate=30/1 ! \
>  h264parse ! \
>  tee name=t \
>  t. ! queue ! hl.video \
>  t. ! queue ! avdec_h264 ! xvimagesink \
>  t. ! queue ! avdec_h264 ! xvimagesink \
>  pulsesrc device=0 ! \
>  queue2 ! audioconvert ! avenc_aac maxrate=800 ! \
>  tee name=u \
>  u. ! queue | hl.audio \
>  t. !  queue max-size-buffers=0 max-size-bytes=0 max-size-time=1000000000
> ! \
>  mux. u. \
>  mux. mp4muxname = mux ! \
>  filesink location=try.haf.mp4
> dvr at dvrTW:~>
> dvr at dvrTW:~>
>
> dvr at dvrTW:~>
> dvr at dvrTW:~>
> dvr at dvrTW:~>
> dvr at dvrTW:~>
> dvr at dvrTW:~>
> dvr at dvrTW:~> ./gst.haf -e -v
> ./gst.haf: line 19: hl.audio: command not found
>
> ------------------------------
>
> Message: 2
> Date: Mon, 18 Oct 2021 11:01:39 +0000
> From: Marc <Marc at f1-outsourcing.eu>
> To: Discussion of the development of and with GStreamer
>         <gstreamer-devel at lists.freedesktop.org>
> Cc: James Linder <jam at tigger.ws>
> Subject: RE: syntax
> Message-ID: <a5d8216a7c274d0a98fa6bfdbc548517 at f1-outsourcing.eu>
> Content-Type: text/plain; charset="utf-8"
>
> Does this help ?
>
> t. ! queue ! tsdemux name=demux \
>      demux. ! parsebin ! h264parse ! queue ! hlssink.video \
>      demux. ! parsebin ! aacparse ! queue ! hlssink.audio \
>      hlssink2 name=hlssink
> playlist-location='/mnt/rados/playlist-cam1.m3u8'
> location='/mnt/rados/seg-cam1-%05d.ts' target-duration=2 max-files=5
>
>
> >
> > Help with the syntax please.
> > I?m trying to feed audio to hlssink2
> >
> > James
> >
> > dvr at dvrTW:~> cat gst.haf
> > #!/bin/bash
> >
> > IP=`hostname -I`
> >
> > gst-launch-1.0 \
> >  hlssink2 playlist-location=/dev/shm/channel1.m3u8 playlist-
> > root=http://$IP \
> >  location=/dev/shm/channel1_%05d.ts max-files=15 target-duration=3
> > name=hl \
> >  v4l2src device=/dev/video2 ! \
> >  video/x-h264,width=1920,height=1080,framerate=30/1 ! \
> >  h264parse ! \
> >  tee name=t \
> >  t. ! queue ! hl.video \
> >  t. ! queue ! avdec_h264 ! xvimagesink \
> >  t. ! queue ! avdec_h264 ! xvimagesink \
> >  pulsesrc device=0 ! \
> >  queue2 ! audioconvert ! avenc_aac maxrate=800 ! \
> >  tee name=u \
> >  u. ! queue | hl.audio \
> >  t. !  queue max-size-buffers=0 max-size-bytes=0 max-size-
> > time=1000000000 ! \
> >  mux. u. \
> >  mux. mp4muxname = mux ! \
> >  filesink location=try.haf.mp4
> > dvr at dvrTW:~>
> > dvr at dvrTW:~>
> >
> > dvr at dvrTW:~>
> > dvr at dvrTW:~>
> > dvr at dvrTW:~>
> > dvr at dvrTW:~>
> > dvr at dvrTW:~>
> > dvr at dvrTW:~> ./gst.haf -e -v
> > ./gst.haf: line 19: hl.audio: command not found
>
> ------------------------------
>
> Message: 3
> Date: Mon, 18 Oct 2021 11:10:23 +0000
> From: Marc <Marc at f1-outsourcing.eu>
> To: Discussion of the development of and with GStreamer
>         <gstreamer-devel at lists.freedesktop.org>
> Subject: h264 stream still high bit rate when no movement
> Message-ID: <1d6fdd4d1b5d46279623a8953f12a73a at f1-outsourcing.eu>
> Content-Type: text/plain; charset="utf-8"
>
>
> I have a h264 stream (from a camera) and that is still 2mbit when there is
> no movement. Can this be optimized so it has a much lower bit rate when
> there is no movement, or do I then compromise on quality when there is
> movement?
>
>
>
>
>
> ------------------------------
>
> Message: 4
> Date: Mon, 18 Oct 2021 07:35:33 -0400
> From: Jeff Shanab <jshanab at jfs-tech.com>
> To: Discussion of the development of and with GStreamer
>         <gstreamer-devel at lists.freedesktop.org>
> Subject: Re: h264 stream still high bit rate when no movement
> Message-ID:
>         <
> CAM09sypuq3OtFF5aNGai+K3cYPJZBQac9drhexZyMrmucoQZgw at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Dumb Q. Is it all I frames? P frames are generally 1/10 of I frame when
> there is no motion and grow when there is more .Iframes are same size
> motion or not
>
>
>
> On Mon, Oct 18, 2021, 07:10 Marc via gstreamer-devel <
> gstreamer-devel at lists.freedesktop.org> wrote:
>
> >
> > I have a h264 stream (from a camera) and that is still 2mbit when there
> is
> > no movement. Can this be optimized so it has a much lower bit rate when
> > there is no movement, or do I then compromise on quality when there is
> > movement?
> >
> >
> >
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20211018/d600ba71/attachment-0001.htm
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
> ------------------------------
>
> End of gstreamer-devel Digest, Vol 129, Issue 30
> ************************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20211018/cd1c8f29/attachment-0001.htm>


More information about the gstreamer-devel mailing list