[FFmpeg-user] Trying to understand ffmpeg cpu usage in this case of capturing rtsp streams

Jim Ruxton jim.ruxton at gmail.com
Sat Nov 9 17:59:38 EET 2024


When I do an apt update the ppa shows up in my source list ie.
Hit:25 https://ppa.launchpadcontent.net/ubuntuhandbook1/ffmpeg7/ubuntu
jammy InRelease
Could it be that      ffmpeg -version         is just dropping the 7 from
the front of the version output?

On Sat, Nov 9, 2024 at 10:07 AM Ferdi Scholten <ferdi at sttc-nlp.nl> wrote:

> Thanks so much for the help. Not sure why but when I try to upgrade ffmpeg
> > using the ppa as you suggested I get:
> >
> > ffmpeg is already the newest version (7:4.4.2-0ubuntu0.22.04.1+esm5).
> >
> > however if I check with "ffmpeg -version " I get :
> >
> > ffmpeg version 4.4.2-0ubuntu0.22.04.1+esm5 Copyright (c) 2000-2021 the
> > FFmpeg developers
> > built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
> >
> > There is no 7 showing up in the version number, though  maybe I already
> > have the newest version installed?
> >
> >
> > On Thu, Nov 7, 2024 at 6:37 PM Ferdi Scholten<ferdi at sttc-nlp.nl>  wrote:
> >
> >> I'm using Ubuntu 22.04 and ffmpeg version 4.4.2-0
> >>> I'm capturing 3 rtsp streams as shown at the bottom .
> >>> Stream A resolution is 1600x1200
> >>> Stream B and Stream C resolution is 384x192 .
> >>> Stream A and B are coming from one device (ip address) and Stream C is
> >>> coming from a second device (ip address)
> >>>
> >>> When I start Stream A and capture it with the command below I get a cpu
> >>> usage of around 90% using the top command. If I then start stream B
> >>> simultaneously it shows about 25% cpu usage in another ffmpeg instance.
> >>>
> >>> Then with the other 2 streams running I start Stream C and it shows
> about
> >>> 90% cpu usage.
> >>>
> >>> If I start Stream B on it's own it shows 90% cpu usage.
> >>>
> >>> In other words it doesn't seem to matter what the resolution of the
> video
> >>> coming in is but rather which stream starts first that determines the
> cpu
> >>> usage. Does it matter that Stream A an B are coming from the same ip
> >>> address and that explains why the second stream uses less cpu? My
> >>> expectation is that Stream B and C would have the same cpu usage since
> >> they
> >>> are the same resolution just coming from different devices.  Can anyone
> >>> explain what I see as strange behaviour. Stream commands follow.
> >>>
> >>>
> >>> Stream A: ffmpeg -f rtsp -irtsp://192.168.35.243:8086/?camera=world
> -f
> >>> v4l2 /dev/video2
> >>>
> >>> Stream B: ffmpeg -f rtsp -irtsp://192.168.35.243:8086/?camera=eyes
> -vf
> >>> format=yuv420p  -f v4l2 /dev/video3
> >>>
> >>> Stream C: ffmpeg -f rtsp -irtsp://192.168.35.247:8086/?camera=eyes
> -vf
> >>> format=yuv420p  -f v4l2 /dev/video5
> >>>
> >>> Thanks,
> >>> Jim
> >>> _______________________________________________
> >>>
> >> Does this also happen if you use a less antique version of ffmpeg?
> >> Either a static build or build it from git master or use a ppa? were at
> >> version 7.1 now.
> >> Current versions are much better in using multiple threads and there
> >> have been numerous changes to internal code to improve the resource
> usage.
> >>
> >> for ease of use this ppa delivers ffmpeg 7.1 for ubuntu 22.04
> >> https://ubuntuhandbook.org/index.php/2024/04/ffmpeg-7-0-ppa-ubuntu/
> >> _______________________________________________
> >> ffmpeg-user mailing list
> >> ffmpeg-user at ffmpeg.org
> >> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >>
> >> To unsubscribe, visit link above, or email
> >> ffmpeg-user-request at ffmpeg.org  with subject "unsubscribe".
> >>
> > Then the ppa was not correctly added to your apt sources.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-user mailing list