Realtime priority

Mathias Gyllengahm lunarshuttle at gmail.com
Wed Feb 23 03:05:10 PST 2011


Thanks a lot for your replies, guys!

Yes, I'm aware that I cannot exceed CPU usage - I've read some threads about
how it's not possible for the encoder to know that it should throw away
frames in case they're likely to not be encoded in time. My system seems to
work fine as long as I don't have any other processes that hog it.

Again, thanks!
/Mathias

2011/2/23 Stefan Kost <ensonic at hora-obscura.de>

> On 22.02.2011 16:16, Mathias Gyllengahm wrote:
> > Hi again,
> >
> > I'd like to let my gstreamer process have realtime priority. I have
> > tried to do it with prefix the whole thing with "chrt -r -p 99" but I
> get:
> >
> > GThread-ERROR **: file
> > /build/buildd/glib2.0-2.24.1/gthread/gthread-posix.c: line 348
> > (g_thread_create_posix_impl): error 'Invalid argument' during
> > 'pthread_attr_setschedparam (&attr, &sched)'
> >
> > Doing a chrt by pid afterwards has no effect at all. This is my
> > pipeline, and it's clear that it has problems when cpu load goes up -
> > and I'd like to avoid that. I've seen something about realtime
> > priorities when it comes to using the API - but is there a way to do
> > it when using gst-launch?
>
> Are you aware that switching to rt scheduling won't help if too hight
> cpu load is the problem. All you get for SCHED_RR/FIFO is more
> deterministic execution. If your pipeline is saturating the CPU power,
> you can buy a faster machine or optimize code.
>
> Stefan
>
> >
> > Thanks in advance,
> > /Mathias
> >
> > /usr/local/bin/gst-launch-0.10 -v
> > --gst-plugin-path=/usr/local/lib/gstreamer-0.10 \
> >     v4l2src \
> >     ! videorate \
> >     ! video/x-raw-yuv,width=320,height=240,framerate=15/1 \
> >     ! ffmpegcolorspace \
> >     ! x264enc bitrate=152 subme=4 b-pyramid=true weightb=true \
> >     ! queue2 \
> >     ! flvmux name=mux \
> >     alsasrc device=hw:0,0 \
> >     ! audio/x-raw-int,rate=22050,channels=2,depth=16 \
> >     ! audiorate \
> >     ! queue2 max-size-buffers=600 max-size-bytes=0 max-size-time=0 \
> >     ! audioconvert \
> >     ! lamemp3enc target=1 bitrate=40 mono=true
> > encoding-engine-quality=1 target=bitrate \
> >     ! mux. mux. \
> >     ! queue2 \
> >     ! filesink location=outfile.flv sync=false
> >
> >
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110223/afcf49de/attachment.htm>


More information about the gstreamer-devel mailing list