v4l2rc MJPEG to Videomixer slow - alternative pathways?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

v4l2rc MJPEG to Videomixer slow - alternative pathways?

ashwath
Hi all,

I'm currently working with some UVC cameras that support outputting both raw
frames (YUV) and mjpeg.  Due to USB 2.0 bandwidth restrictions I'm hoping to
switch over to MJPEG so I can support higher resolution video.

My current pipeline takes X camera raw feeds, composites them via
videomixer, and pushes them into an appsink which I read from my Python
application.  

When I try to switch over from raw feeds to MJPEG, the stream is extremely
laggy if I use more than 3 cameras; I imagine this has to do with the way
MJPEG images are parsed, as well as with the timing involved with videomixer
(I convert the MJPEG feeds back to raw video because that's all videomixer
can support).

My question is, is there a way to more smoothly stream mjpeg frames into
videomixer?  I've tried placing queues in different locations; sync is set
to false (on appsink) and is-live and do-timestamp are set to true (on
v4l2src).  

Otherwise, would it be possible for me to design my pipeline in a different
way to support MJPEG (i.e. for X cameras, stream frames into X different
appsinks and composite them manually in Python/C - though I worry reading
from X appsinks in python will be slow)?  Perhaps there's a way to use tees
I'm not thinking of?  Or I could stream the mjpeg feeds via UDP locally and
simply stream the UDP locally as well?  Any suggestions or thoughts on how
this could work?

Thanks in advance,
Ashwath



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: v4l2rc MJPEG to Videomixer slow - alternative pathways?

Mike-Maverick
hI Aswath,

Can you please share your pipeline, so we all members can have a better look
at it and possibly find a solution for the same.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: v4l2rc MJPEG to Videomixer slow - alternative pathways?

ashwath
Sure, here is an example:

gat-launch-1.0 videomixer name=mix sink_0::xpos=640 sink_0::ypos=240
sink_1::xpos=0 sink_1::ypos=0 sink_2::xpos=0 sink_2::ypos=480 sink_3::xpos=0
sink_3::ypos=960  ! videorate ! video/x-raw,framerate=30/1 ! appsink
name=app enable-last-sample=true emit-signals=true sync=false drop=true
qos=true blocksize=2764800 v4l2src device=/dev/video0 do-timestamp=true !
image/jpeg,height=480,width=640,framerate=30/1 !  jpegparse ! jpegdec !
videoconvert ! video/x-raw,format=BGR ! mix.sink_0 v4l2src
device=/dev/video1 do-timestamp=true !
image/jpeg,height=480,width=640,framerate=30/1 !  jpegparse ! jpegdec !
videoconvert ! video/x-raw,format=BGR ! mix.sink_1 v4l2src
device=/dev/video2 do-timestamp=true !
image/jpeg,height=480,width=640,framerate=30/1 !  jpegparse ! jpegdec !
videoconvert ! video/x-raw,format=BGR ! mix.sink_2 v4l2src
device=/dev/video3 do-timestamp=true !
image/jpeg,height=480,width=640,framerate=30/1 !  jpegparse ! jpegdec !
videoconvert ! video/x-raw,format=BGR ! mix.sink_3

I was reading that MJPEG has no timestamps -- is it possible that I can set
the timestamp settings differently?  Or perhaps my blocksize is wrong?

Thanks



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel