h264 stream still high bit rate when no movement

Marianna Smidth Buschle msb at qtec.com
Mon Oct 18 12:17:47 UTC 2021


ffprobe can tell you pretty much everything about your stream.
The trick is knowning which options to use and how to filter the output ;)


Is there a way to dump this information?

man. 18. okt. 2021 14.13 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. Re: syntax (James)
>    2. RE: h264 stream still high bit rate when no movement (Marc)
>    3. Re: h264 stream still high bit rate when no movement
>       (Marianna Smidth Buschle)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 18 Oct 2021 19:39:32 +0800
> From: James <jam at tigger.ws>
> To: Discussion of the development of and with GStreamer
>         <gstreamer-devel at lists.freedesktop.org>
> Subject: Re: syntax
> Message-ID: <6B976EA5-9055-4F38-9D8B-8D4DB5ECD609 at tigger.ws>
> Content-Type: text/plain;       charset=utf-8
>
> I learn, I learn. Thanks
>
> > On 18 Oct 2021, at 7:01 pm, Marc <Marc at f1-outsourcing.eu> wrote:
> >
> > 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: 2
> Date: Mon, 18 Oct 2021 12:05:44 +0000
> From: Marc <Marc at f1-outsourcing.eu>
> To: Discussion of the development of and with GStreamer
>         <gstreamer-devel at lists.freedesktop.org>
> Cc: Jeff Shanab <jshanab at jfs-tech.com>
> Subject: RE: h264 stream still high bit rate when no movement
> Message-ID: <735f75e8d9504f66a74702e7013136df at f1-outsourcing.eu>
> Content-Type: text/plain; charset="utf-8"
>
>
> Is there a way to dump this information? If I duplicate the stream and ad
> an ip-factor=2 the bandwidth seems to be a little less.
>
> >
> > 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 <mailto: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?
> >
> >
> >
> >
> >
>
>
> ------------------------------
>
> Message: 3
> Date: Mon, 18 Oct 2021 14:13:23 +0200
> From: Marianna Smidth Buschle <msb at qtec.com>
> To: Discussion of the development of and with GStreamer
>         <gstreamer-devel at lists.freedesktop.org>
> Cc: Marc at f1-outsourcing.eu
> Subject: Re: h264 stream still high bit rate when no movement
> Message-ID:
>         <CAGC+vnJgc4aOG=
> vUhcpXydoXfRwLGw-fpNgGTk7_gZXmAyDyoA at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> 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.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 31
> ************************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20211018/a3ef5834/attachment-0001.htm>


More information about the gstreamer-devel mailing list