cyrille henry wrote:
ok, i think i understand the problem.
i can have an image with mplayer ( mplayer -tv driver=v4l2:device=/dev/video0:input=1:width=640:height=480 tv:// )
gstreamer is also able to use this device (but only input 0, as i don't know how to change input)
do you think there is a hack to forward this images to Gem?
This is one *really* hacky way that might work:
mkfifo stream.yuv stream.ppm mplayer -vo yuv4mpeg ... & y4mtoppm < stream.yuv > stream.ppm & pd -lib Gem:gridflow -open patch.pd
Gridflow can read ppm streams (which are just ppm frames concatenated together. Gridflow contains gridflow<-->pix bridge (I never got it to work, though - probably I was misusing it), either that or use its object to export a grid to a list.
But it might not be (probably won't be) fast enough for realtime use, I only used this hack for offline transcoding from Ogg/Theora made by recordmydesktop to DVD/MPEG2.
Probably not recommended,
Claude
thanks
cyrille
Claude Heiland-Allen a écrit :
Hi,
cyrille henry wrote:
i compile gem with V4L2 support, but it does not really work. i'm really missing a (working) V4L2 support in gem.
There are so many incompatible formats (RGB, YUV, YV12, JPEG, MJPEG, etc, ...) for V4L2, as described here:
-- irc.freenode.net/#dataflow/2008-03-31 --
20:19 < wip> is gem compatible with v4l2? 20:19 < wip> cause my built-in webcam is working with gstreamer-properties (v4l2) 20:19 < wip> but i cannot use it with gem... 20:48 < matju> wip: do you know what's the pixel format of your camera? cause this could be the problem 20:48 < matju> wip: the V4L2 API cannot be covered by GEM, because it's ever expanding, because Alan Cox has ruled that "format converters" are forbidden in the Linux source code. 20:49 < matju> wip: and i mean, the V4L2 API cannot be covered by anything at all. 20:49 < matju> wip: so you have to be lucky to have a camera that works. 20:50 < wip> matju: ic 20:50 < wip> matju: that's sad 20:51 < wip> matju: i will make some more test 20:52 < matju> wip: well, i spent just enough time on the v4l mailing-list to understand that. after that, i didn't want to waste time on that mailing-list. it's not for mere mortals, you know.
So what is needed is a userland V4L2-support library that provides all the format conversion stuff, as it doesn't make sense for every app to implement them natively, but I don't know if that exists...
Maybe VideoJACK would work for something like this?
Claude