Thanks a lot for your replies, guys!<div><br></div><div>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.</div>
<div><br></div><div>Again, thanks!</div><div>/Mathias<br><br><div class="gmail_quote">2011/2/23 Stefan Kost <span dir="ltr"><<a href="mailto:ensonic@hora-obscura.de">ensonic@hora-obscura.de</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 22.02.2011 16:16, Mathias Gyllengahm wrote:<br>
> Hi again,<br>
><br>
> I'd like to let my gstreamer process have realtime priority. I have<br>
> tried to do it with prefix the whole thing with "chrt -r -p 99" but I get:<br>
><br>
> GThread-ERROR **: file<br>
> /build/buildd/glib2.0-2.24.1/gthread/gthread-posix.c: line 348<br>
> (g_thread_create_posix_impl): error 'Invalid argument' during<br>
> 'pthread_attr_setschedparam (&attr, &sched)'<br>
><br>
> Doing a chrt by pid afterwards has no effect at all. This is my<br>
> pipeline, and it's clear that it has problems when cpu load goes up -<br>
> and I'd like to avoid that. I've seen something about realtime<br>
> priorities when it comes to using the API - but is there a way to do<br>
> it when using gst-launch?<br>
<br>
</div>Are you aware that switching to rt scheduling won't help if too hight<br>
cpu load is the problem. All you get for SCHED_RR/FIFO is more<br>
deterministic execution. If your pipeline is saturating the CPU power,<br>
you can buy a faster machine or optimize code.<br>
<font color="#888888"><br>
Stefan<br>
</font><div class="im"><br>
><br>
> Thanks in advance,<br>
> /Mathias<br>
><br>
> /usr/local/bin/gst-launch-0.10 -v<br>
> --gst-plugin-path=/usr/local/lib/gstreamer-0.10 \<br>
> v4l2src \<br>
> ! videorate \<br>
> ! video/x-raw-yuv,width=320,height=240,framerate=15/1 \<br>
> ! ffmpegcolorspace \<br>
> ! x264enc bitrate=152 subme=4 b-pyramid=true weightb=true \<br>
> ! queue2 \<br>
> ! flvmux name=mux \<br>
> alsasrc device=hw:0,0 \<br>
> ! audio/x-raw-int,rate=22050,channels=2,depth=16 \<br>
> ! audiorate \<br>
> ! queue2 max-size-buffers=600 max-size-bytes=0 max-size-time=0 \<br>
> ! audioconvert \<br>
> ! lamemp3enc target=1 bitrate=40 mono=true<br>
> encoding-engine-quality=1 target=bitrate \<br>
> ! mux. mux. \<br>
> ! queue2 \<br>
> ! filesink location=outfile.flv sync=false<br>
><br>
><br>
</div><div><div></div><div class="h5">> _______________________________________________<br>
> gstreamer-devel mailing list<br>
> <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</div></div></blockquote></div><br></div>