Re: [PD] [OT] get video stream with pdgst from XIMEA camera
Hello, The answer about v4l2 driver for xiQ camera from Ximea : Dear Mr.Jack, Based on information of our linux implementation specialist we are not planning implementation of v4l2 because it is quite complicated task and there are no big potential from current customers. Probably gstreamer interface would be simpler for implementation, but unfortunately also this interface is not in our plan pipeline. Best regards Hello, I have a xiQ camera and test it on my Ubuntu. It works well with streamViewer provided by your staff. But for a lot of people working under linux platform like me, it would be very nice to use v4l2 driver. This is free/open and a standard on linux. Are you working on this solution (to make v4l2 driver for your xiQ USB3.0 camera) ? Best! ++ Jack For peole interested in the xiQ cameras : Ximea API/Gstreamer have worked during more 24 hours without problem on my computer (Ubuntu 12.04, kernel 3.8, gstreamer 0.10). I run into trouble (i get a crash after more or less 2 hours) when i tried to modify the code to get Gstreamer working with v4l2sink/v4l2loopback/[pix_video], but my skill in C++ are to bad to get things stable... ++ Jack Le 23/08/2013 12:17, Jack a écrit : Hello, Le 22/08/2013 21:03, IOhannes zmölnig a écrit : On 08/22/2013 08:40 PM, Jack wrote: $ cat /sys/devices/virtual/video4linux/video1/format GREY?30:1280x1024@30 I expect 60 fps. If i set : $ v4l2-ctl -d /dev/video1 -p 60 or $ v4l2-ctl -d /dev/video1 -p 1 It doesn't change anything. Do you know if there is a possibility to get this frame rate (60 fps) ? Is it a limitation using videoloopback ? no. v4l2loopback does not know nor care about frames or formats. it simply passes the frames from one application to another. there is no colorspace-conversion of resampling or the like involved. OK. it's gstreamer that doesn't set the framerate correctly. you could force it by running: $ echo @60 | sudo tee /sys/devices/virtual/video4linux/video1/format in practice i don't think that this framerate setting will do much. Yes, it doesn't change anything. For info, i get 60 fps when I use the application streamViewer. how do you know? It is written in the top window border : Acquisition [ cptured: 2854, skipped: 1, fps : 61.40 ] Seeing the video capture in the Gem window, i guess it is at 60 fps. So, in this case, information about framerate return by : $ v4l2-ctl --all -d /dev/video1 or $ cat /sys/devices/virtual/video4linux/video1/format is incorrect. Thank you for your help IOhannes, now I can get the stream from a XIMEA camera in Gem. Do you think, it will be much better/faster/stable to get a v4l2 driver from XIMEA than to use a pipe with gstreamer/v4l2loopback ? ++ Jack fdsmard IOhannes ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] [OT] get video stream with pdgst from XIMEA camera
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, Le 22/08/2013 21:03, IOhannes zmölnig a écrit : On 08/22/2013 08:40 PM, Jack wrote: $ cat /sys/devices/virtual/video4linux/video1/format GREY?30:1280x1024@30 I expect 60 fps. If i set : $ v4l2-ctl -d /dev/video1 -p 60 or $ v4l2-ctl -d /dev/video1 -p 1 It doesn't change anything. Do you know if there is a possibility to get this frame rate (60 fps) ? Is it a limitation using videoloopback ? no. v4l2loopback does not know nor care about frames or formats. it simply passes the frames from one application to another. there is no colorspace-conversion of resampling or the like involved. OK. it's gstreamer that doesn't set the framerate correctly. you could force it by running: $ echo @60 | sudo tee /sys/devices/virtual/video4linux/video1/format in practice i don't think that this framerate setting will do much. Yes, it doesn't change anything. For info, i get 60 fps when I use the application streamViewer. how do you know? It is written in the top window border : Acquisition [ cptured: 2854, skipped: 1, fps : 61.40 ] Seeing the video capture in the Gem window, i guess it is at 60 fps. So, in this case, information about framerate return by : $ v4l2-ctl --all -d /dev/video1 or $ cat /sys/devices/virtual/video4linux/video1/format is incorrect. Thank you for your help IOhannes, now I can get the stream from a XIMEA camera in Gem. Do you think, it will be much better/faster/stable to get a v4l2 driver from XIMEA than to use a pipe with gstreamer/v4l2loopback ? ++ Jack fdsmard IOhannes ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJSFzakAAoJEOuluecjw8GUxh8H/3uYQ0ZG0on0w8h1J6Rox2Tr kiIt4tSeV3fBPJfaBugYky6e003MprM8aLSyEE2ugbDMQ2tGX7O3qtau1jqpuRd6 gSA7l5R4UVK+whIunilwmG+mrBytwVUi4lx9CRmaRIgcN6GNYJO9mIDMKgOwNO7S B86SOYGX7TtKr7vTyC+z9jIq/fDaKgNQTN85gyYgimqdtP/zt1rIhkoomDuQO5u1 9IpezxPxu7JnEWqSjLJ+1VPM69k6JNsOga5A9Vv6IKvHbgWiK42n+Zr2KE4+HxlZ ZEAPJNNQg/sWH+/fAd+84tsQpAxUEr5bgTpw3ROt+wBumwk2S8wZzVZDA1BZ9rE= =1w9V -END PGP SIGNATURE- ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
[PD] [OT] get video stream with pdgst from XIMEA camera
Hello, I would like to get the stream from a XIMEA camera using gstreamer. There is an example (in the XIMEA Linux Software Package) that use gstreamer to get the stream. This example works fine on Ubuntu 12.04 (with kernel 3.8) and Ubuntu 13.04. But i would like to get the stream with v4l2sink/v4l2src from gstreamer with pdgst (or better, from [pix_video] ??? :). My skills in C++ are bad and if someone can help me to modify the source code (attached, dependencies : GTK+-2 and GStreamer-0.10) to make it work only with v4l2src, it would be very nice. The XIMEA Linux Software Package can be downloaded from : http://www.ximea.com/support/wiki/apis/XIMEA_Linux_Software_Package Thanx. ++ Jack #include sys/time.h #include pthread.h #include gtk/gtk.h #ifdef GDK_WINDOWING_X11 #include gdk/gdkx.h #endif #include gst/app/gstappsrc.h #include gst/interfaces/xoverlay.h #include m3api/xiApi.h #include m3api/xiExt.h BOOL acquire, quitting, render = TRUE; int maxcx, maxcy, roix0, roiy0, roicx, roicy; pthread_t videoThread; HANDLE handle = INVALID_HANDLE_VALUE; guintptr window_handle; GstBusSyncReply bus_sync_handler(GstBus* bus, GstMessage* message, gpointer) { if(GST_MESSAGE_TYPE(message) != GST_MESSAGE_ELEMENT || !gst_structure_has_name(message-structure, prepare-xwindow-id)) return GST_BUS_PASS; #if GST_CHECK_VERSION(0,10,31) gst_x_overlay_set_window_handle(GST_X_OVERLAY(GST_MESSAGE_SRC(message)), window_handle); #else gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(GST_MESSAGE_SRC(message)), window_handle); #endif gst_message_unref(message); return GST_BUS_DROP; } #if defined(GDK_WINDOWING_X11) void video_widget_realize_cb(GtkWidget* widget, gpointer) { GdkWindow *window = gtk_widget_get_window(widget); if (!gdk_window_ensure_native(window)) g_error (Couldn't create native window needed for GstXOverlay!); window_handle = GDK_WINDOW_XID(window); } #elif defined(GDK_WINDOWING_QUARTZ) void video_widget_realize_cb(GtkWidget*, gpointer); #else #error Unsupported GDK backend #endif inline unsigned long getcurus() { struct timeval now; gettimeofday(now, NULL); return now.tv_sec * 100 + now.tv_usec; } gboolean close_cb(GtkWidget*, GdkEvent*, gpointer quit) { quitting = quit ? TRUE : FALSE; if(videoThread) acquire = FALSE; else gtk_main_quit(); return TRUE; } void* videoDisplay(void*) { GtkWidget *videoWindow; GdkScreen *screen; GstElement *pipeline, *appsrc/*, *fpssink*/; GstFlowReturn ret; GstBuffer *buffer; GstBus *bus; GstCaps *caps = 0; int max_width, max_height; int prev_width = -1; int prev_height = -1; unsigned long frames = 0; unsigned long prevframes = 0; unsigned long lostframes = 0; unsigned long curtime, prevtime; long lastframe = -1; gchar/* *videofps,*/ title[256]; XI_IMG_FORMAT prev_format = XI_RAW8; XI_IMG image; image.size = sizeof(XI_IMG); image.bp = NULL; image.bp_size = 0; gdk_threads_enter(); videoWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(videoWindow), streamViewer); gtk_widget_set_double_buffered(videoWindow, FALSE); g_signal_connect(videoWindow, realize, G_CALLBACK(video_widget_realize_cb), NULL); g_signal_connect(videoWindow, delete-event, G_CALLBACK(close_cb), NULL); gtk_widget_show_all(videoWindow); gtk_widget_realize(videoWindow); screen = gdk_screen_get_default(); max_width = 0.8*gdk_screen_get_width(screen); max_height = 0.8*gdk_screen_get_width(screen); gdk_threads_leave(); if(xiStartAcquisition(handle) != XI_OK) goto exit; //pipeline = gst_parse_launch(appsrc is-live=TRUE name=streamViewer ! queue max-size-buffers=2 leaky=2 ! ffmpegcolorspace ! videoscale add-borders=TRUE ! fpsdisplaysink name=fpssink text-overlay=FALSE sync=FALSE, NULL); pipeline = gst_parse_launch(appsrc is-live=TRUE name=streamViewer ! queue max-size-buffers=2 leaky=2 ! ffmpegcolorspace ! videoscale add-borders=TRUE ! autovideosink, NULL); if(!pipeline) goto exit; bus = gst_pipeline_get_bus(GST_PIPELINE(pipeline)); gst_bus_set_sync_handler(bus, (GstBusSyncHandler)bus_sync_handler, NULL); gst_object_unref(bus); appsrc = gst_bin_get_by_name(GST_BIN(pipeline), streamViewer); //fpssink = gst_bin_get_by_name(GST_BIN(pipeline), fpssink); gst_element_set_state(pipeline, GST_STATE_PLAYING); prevtime = getcurus(); while(acquire) { if(xiGetImage(handle, 5000, image) != XI_OK) break; if(render) { buffer = gst_buffer_new(); gst_buffer_set_data(buffer, (guint8*)image.bp, image.width*image.height*(image.frm == XI_RAW8 ? 1 : 3)); GST_BUFFER_TIMESTAMP(buffer) = GST_CLOCK_TIME_NONE; if(prev_width != image.width || prev_height != image.height || prev_format != image.frm) { if(caps) gst_caps_unref(caps); if(image.frm == XI_RAW8) caps = gst_caps_new_simple (video/x-raw-gray, bpp, G_TYPE_INT, 8, depth, G_TYPE_INT, 8, framerate, GST_TYPE_FRACTION, 0, 1, width, G_TYPE_INT, image.width, height, G_TYPE_INT, image.height, NULL); else if(image.frm ==
Re: [PD] [OT] get video stream with pdgst from XIMEA camera
On 08/22/13 16:13, Jack wrote: Hello, I would like to get the stream from a XIMEA camera using gstreamer. There is an example (in the XIMEA Linux Software Package) that use gstreamer to get the stream. This example works fine on Ubuntu 12.04 (with kernel 3.8) and Ubuntu 13.04. But i would like to get the stream with v4l2sink/v4l2src from gstreamer with pdgst (or better, from [pix_video] ??? :). My skills in C++ are bad and if someone can help me to modify the source code (attached, dependencies : GTK+-2 and GStreamer-0.10) to make it work only with v4l2src, it would be very nice. hmm, i'm sure this is really a problem which should be solved by XIMEA: they ought to provide proper v4l2 drivers, rather than creating their own framework which will only ever be used by their products, and expect each application to support their framework (that is: unless they are willing to pay me so that i can add support for their software) anyhow, after a quick glance at your sample code it seems that GStreamer is *not* used to grab the video, but only for displaying it. the actual grabbing is done in application space via the SDK. this basically means, that you cannot do it in pdgst. a rather quick hack would be to change the gstreamer output from autovideosink to v4l2sink device=/dev/video42 and recompile the streamViewer. this should allow [pix_video] to access the video-stream via v4l2. fgmadrs IOhannes signature.asc Description: OpenPGP digital signature ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] [OT] get video stream with pdgst from XIMEA camera
On 08/22/13 16:51, IOhannes m zmölnig wrote: hmm, i'm sure this is really a problem which should be solved by XIMEA: they ought to provide proper v4l2 drivers, rather than creating their own framework just to make sure that this got through: you *really* should write to XIMEA asking them to create proper v4l2 drivers (at least for their USB-based cameras). those companies often need some user feedback... fgmasdr IOhannes signature.asc Description: OpenPGP digital signature ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] [OT] get video stream with pdgst from XIMEA camera
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le 22/08/2013 16:51, IOhannes m zmölnig a écrit : On 08/22/13 16:13, Jack wrote: Hello, I would like to get the stream from a XIMEA camera using gstreamer. There is an example (in the XIMEA Linux Software Package) that use gstreamer to get the stream. This example works fine on Ubuntu 12.04 (with kernel 3.8) and Ubuntu 13.04. But i would like to get the stream with v4l2sink/v4l2src from gstreamer with pdgst (or better, from [pix_video] ??? :). My skills in C++ are bad and if someone can help me to modify the source code (attached, dependencies : GTK+-2 and GStreamer-0.10) to make it work only with v4l2src, it would be very nice. hmm, i'm sure this is really a problem which should be solved by XIMEA: they ought to provide proper v4l2 drivers, rather than creating their own framework which will only ever be used by their products, and expect each application to support their framework (that is: unless they are willing to pay me so that i can add support for their software) I will email to XIMEA to suggest to use v4l2. It will be very more simple for everyone in linux world... anyhow, after a quick glance at your sample code it seems that GStreamer is *not* used to grab the video, but only for displaying it. the actual grabbing is done in application space via the SDK. this basically means, that you cannot do it in pdgst. a rather quick hack would be to change the gstreamer output from autovideosink to v4l2sink device=/dev/video42 and recompile the streamViewer. this should allow [pix_video] to access the video-stream via v4l2. It is exactly what i do but it doesn't work. ++ Jack fgmadrs IOhannes ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJSFil9AAoJEOuluecjw8GUJYIIAKBCFPJI0osmzeecP+fcmRtR vX7jDfxQ3JjEAeqgaTpeNUdIUc2bexwowMaVi/3Ge3xnYPrA3XGG6TZwN0diFdoo Ix6sesxjPMKxJg1GsaE3JPmaJ7f1p3OyLAPGpPqIyBTVnyfMM5ubjwA6YElYNJkE 21E7hTfrXm2I1zbkIFkqEpLcjhIm09YFbqniiRL9Ch6x1n6QJU91EwyhSQRMZYmT MpCvEDpHS/cLCkriajdPsBT3UN5KIW/+piFF8g8v6kykd5s5v6UQeaT8/AY+kdqJ i4OTo0oquKHzEjQ13vVgzTOXjciafGPB4ql0qFXgNe+pw/UF/k54LRVu52XQPBg= =1U75 -END PGP SIGNATURE- ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] [OT] get video stream with pdgst from XIMEA camera
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le 22/08/2013 16:56, IOhannes m zmölnig a écrit : On 08/22/13 16:51, IOhannes m zmölnig wrote: hmm, i'm sure this is really a problem which should be solved by XIMEA: they ought to provide proper v4l2 drivers, rather than creating their own framework just to make sure that this got through: you *really* should write to XIMEA asking them to create proper v4l2 drivers (at least for their USB-based cameras). those companies often need some user feedback... Yep. I will tonight. ++ Jack fgmasdr IOhannes ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJSFinsAAoJEOuluecjw8GUVEAIAKczqnujBEAqXOuYMKrLLUTl oLyHfCjrIn8CI++grmVuWUQC0VIJwSWfoX9IZ43FDPL1h5Meb1R2MYgU2Y25dtlN c4Ho6V9XJs05jCOIlWmKQ+tT6xMBZxK35h7rO/xhGucvPC8rHtNCuxBR+XcHJwNI MKHbRvc3e86JTURJ4ABoKWXmJ28RL0ZH92JNRgUUQA/YxtQ5R87fGtNRxhWxJhxh tb/8TtuJhR5Ae4ccC3g033kUwfWFjJ9cjUN8RiNqR4k6ex6pZxrjjPHvsTINfPNd 6J3fzCB+WF+fV9FCFO/EuoSWozZgiWe0IFSOmiwkvNIZhcqibM/AUeCpIGPavLQ= =pUWF -END PGP SIGNATURE- ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] [OT] get video stream with pdgst from XIMEA camera
On 08/22/13 17:08, Jack wrote: a rather quick hack would be to change the gstreamer output from autovideosink to v4l2sink device=/dev/video42 and recompile the streamViewer. this should allow [pix_video] to access the video-stream via v4l2. It is exactly what i do but it doesn't work. maybe you should clean the engines. dfmadr IOhannes signature.asc Description: OpenPGP digital signature ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] [OT] get video stream with pdgst from XIMEA camera
Le 22/08/2013 17:10, Jack a écrit : Le 22/08/2013 16:56, IOhannes m zmölnig a écrit : On 08/22/13 16:51, IOhannes m zmölnig wrote: hmm, i'm sure this is really a problem which should be solved by XIMEA: they ought to provide proper v4l2 drivers, rather than creating their own framework just to make sure that this got through: you *really* should write to XIMEA asking them to create proper v4l2 drivers (at least for their USB-based cameras). those companies often need some user feedback... Yep. I will tonight. ++ Jack Done, I expect their answer soon and keep you informed. ++ Jack fgmasdr IOhannes ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] [OT] get video stream with pdgst from XIMEA camera
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le 22/08/2013 17:23, IOhannes m zmölnig a écrit : On 08/22/13 17:08, Jack wrote: a rather quick hack would be to change the gstreamer output from autovideosink to v4l2sink device=/dev/video42 and recompile the streamViewer. this should allow [pix_video] to access the video-stream via v4l2. It is exactly what i do but it doesn't work. maybe you should clean the engines. What does it mean clean the engines. Thanx for your help. ++ Jack dfmadr IOhannes ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJSFi7dAAoJEOuluecjw8GUuA4IAKPoKtyouk7B0sZLjwo1l7XU /BXSZ7ZyRQlaIqC3gpJl8qmH5915H7LP37XjWkC8IzYHAZohK34NH8haH485O1Ea JihXm2o78rFkqpDg/pOH9XAtsOrsW0rHyyjckTyenR5TlrfYZ0XikpTWSs+usogB GrpbBwjfyLgG7/5Uw8ILQHF4reREqXlae/Jq892BxR0BVWhzGAOjIBIwK5WFvwt5 z9MD6+1mjAWmbwtlXzUsX8+NsKoFsj/IG/VaIDvTuxEQqHp9t5pjDS+bxQGGIff0 pjfooRBaW11FTY6UWZtOgo2zx0uByx1YRltu45O1ufYnvFvCOSTPha5IeOyyS/w= =pdDv -END PGP SIGNATURE- ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] [OT] get video stream with pdgst from XIMEA camera
On 08/22/13 17:31, Jack wrote: It is exactly what i do but it doesn't work. maybe you should clean the engines. What does it mean clean the engines. Thanx for your help. it means that i have absolutely no idea what you mean by it doesn't work. if you want help, you need to be more specific about your specific problem, about errors, warnings... gmasdr IOhannes signature.asc Description: OpenPGP digital signature ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] [OT] get video stream with pdgst from XIMEA camera
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le 22/08/2013 17:47, IOhannes m zmölnig a écrit : On 08/22/13 17:31, Jack wrote: It is exactly what i do but it doesn't work. maybe you should clean the engines. What does it mean clean the engines. Thanx for your help. it means that i have absolutely no idea what you mean by it doesn't work. if you want help, you need to be more specific about your specific problem, about errors, warnings... gmasdr IOhannes ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list OK. When I compile streamViewer.cpp which contains the gstreamer pipe finishing by : v4l2sink device=/dev/video2, i get no error. And after : $ ./streamViewer the application runs as expected. In Pd, i open the help patch about [pix_video] and send the message [driver v4l2, device 2( to [pix_video]. I expect to get the stream, but i get (in the pd console) : Cannot open '/dev/video2': 2, Aucun fichier ou dossier de ce type v4l: failed opening device: '/dev/video2' So, it seems the gstreamer pipe is wrong OR the streamViewer.cpp is wrong after the modification. How can i solve this problem ? ++ Jack -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJSFjpjAAoJEOuluecjw8GU8XEH/3jk3VRdyGhkHEEtSWeU7hgy nHV29F1UJgth2YUMZyvWSz6Xz8aRtDjmNgRpcBa2bPm9w02q7hZYrWCqKaOJUX6U EmBoNdfnjHiB0mVImtwiOP02u7XgtLFYYE0pNw2fbDOznlJ2MQT6cB9/jvhJ3sNY jXJLSSrQOgJHw5GCcDACOJfP9YfIUu+giz0gJxJ4wiPN5dunf2ujmIYyFx9EiFIK ZvVTPJjcFyySjqRP5IhRvhsJfP0dYAerMMPxySGgU3OhDgM8hV/+RI9PrytXe0h7 3SZlJxa5sjUaXXcyxQFMUlZx89Y9AkrENQLEBw+n/xE/xuVUb3NvTAv0K0oMmEE= =3B6d -END PGP SIGNATURE- ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] [OT] get video stream with pdgst from XIMEA camera
On 08/22/13 18:05, Jack wrote: When I compile streamViewer.cpp which contains the gstreamer pipe finishing by : v4l2sink device=/dev/video2, i get no error. And after : $ ./streamViewer the application runs as expected. you might try to create a slightly more complex pipeline, that outputs to both v4l2sink *and* autovideosink (so you can see whether the pipeline is running). In Pd, i open the help patch about [pix_video] and send the message [driver v4l2, device 2( to [pix_video]. I expect to get the stream, but i get (in the pd console) : Cannot open '/dev/video2': 2, Aucun fichier ou dossier de ce type v4l: failed opening device: '/dev/video2' So, it seems the gstreamer pipe is wrong OR the streamViewer.cpp is wrong after the modification. How can i solve this problem ? try raising the verbosity of streamViewer, to see what it really does: ./streamViewer --gst-debug-level=4 check what happens to the videodevice when streamViewer should write to it. try: v4l2-ctl --all -d /dev/video2 to see the mode of the device. also check /sys/devices/virtual/video4linux/video2/format whether the format has been set correctly. fgmasdr IOhannes signature.asc Description: OpenPGP digital signature ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] [OT] get video stream with pdgst from XIMEA camera
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le 22/08/2013 18:23, IOhannes m zmölnig a écrit : On 08/22/13 18:05, Jack wrote: When I compile streamViewer.cpp which contains the gstreamer pipe finishing by : v4l2sink device=/dev/video2, i get no error. And after : $ ./streamViewer the application runs as expected. you might try to create a slightly more complex pipeline, that outputs to both v4l2sink *and* autovideosink (so you can see whether the pipeline is running). In Pd, i open the help patch about [pix_video] and send the message [driver v4l2, device 2( to [pix_video]. I expect to get the stream, but i get (in the pd console) : Cannot open '/dev/video2': 2, Aucun fichier ou dossier de ce type v4l: failed opening device: '/dev/video2' So, it seems the gstreamer pipe is wrong OR the streamViewer.cpp is wrong after the modification. How can i solve this problem ? try raising the verbosity of streamViewer, to see what it really does: ./streamViewer --gst-debug-level=4 I get that in the terminal when it is running : 0:00:21.907218447 12629 0x7fd1f8001e00 DEBUG appsrc gstappsrc.c:1451:gst_app_src_push_buffer_full:streamViewer queue filled (1073479680 = 20) 0:00:21.907237033 12629 0x7fd1f8001e00 DEBUG appsrc gstappsrc.c:1486:gst_app_src_push_buffer_full:streamViewer queueing buffer 0x7fd1f80ef210 0:00:21.923285100 12629 0x7fd1f8001e00 DEBUG appsrc gstappsrc.c:1451:gst_app_src_push_buffer_full:streamViewer queue filled (1074790400 = 20) 0:00:21.923321131 12629 0x7fd1f8001e00 DEBUG appsrc gstappsrc.c:1451:gst_app_src_push_buffer_full:streamViewer queue filled (1074790400 = 20) 0:00:21.923332968 12629 0x7fd1f8001e00 DEBUG appsrc gstappsrc.c:1486:gst_app_src_push_buffer_full:streamViewer queueing buffer 0x7fd1f80ef2b0 0:00:21.939656140 12629 0x7fd1f8001e00 DEBUG appsrc gstappsrc.c:1451:gst_app_src_push_buffer_full:streamViewer queue filled (1076101120 = 20) 0:00:21.939721014 12629 0x7fd1f8001e00 DEBUG appsrc gstappsrc.c:1451:gst_app_src_push_buffer_full:streamViewer queue filled (1076101120 = 20) 0:00:21.939748951 12629 0x7fd1f8001e00 DEBUG appsrc gstappsrc.c:1486:gst_app_src_push_buffer_full:streamViewer queueing buffer 0x7fd1f80ef350 0:00:21.955868740 12629 0x7fd1f8001e00 DEBUG appsrc gstappsrc.c:1451:gst_app_src_push_buffer_full:streamViewer queue filled (1077411840 = 20) 0:00:21.955912125 12629 0x7fd1f8001e00 DEBUG appsrc gstappsrc.c:1451:gst_app_src_push_buffer_full:streamViewer queue filled (1077411840 = 20) check what happens to the videodevice when streamViewer should write to it. try: v4l2-ctl --all -d /dev/video2 to see the mode of the device. $ v4l2-ctl --all -d /dev/video2 Failed to open /dev/video2: No such file or directory also check /sys/devices/virtual/video4linux/video2/format whether the format has been set correctly. $ cat /sys/devices/virtual/video4linux/video2/format cat: /sys/devices/virtual/video4linux/video2/format: No such file or directory It seems there is a problem when I see : queue filled (1077411840 = 20) ? Thanks to help me to solve this problem ! ++ Jack fgmasdr IOhannes ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJSFj7hAAoJEOuluecjw8GUGrQH/1kkszHPI+IRZmhW2xiICXE1 ZCv7OjXmlykrgwMZJjus3gnZf7VpbLoaGYRg/1RytBAdE9zYI/v0WUyO/3j9/lXt kijg42gMiShRo+5RpsH1UzUH5smL2qOlvnaR3VpP2mWvBD68lVK5F7kOJJZXqCf1 vdX44hcklveDX4VfxIJnELyu+wEpM3IjSpTxuDXZTpCEueCwmOeqWpE/9tKlzafF wGdtYzJnsbicRdpArYbFPD8omXDTD49WzA1dtxd0isiuDPQcWyLgla9m2xTMiEEg mX+2Shp1Pm5DxrWPCR/3uDJNNn1QYNM4vdt+1/M4+DMl62w9ijAXsq5Rr3pNXS8= =S38u -END PGP SIGNATURE- ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] [OT] get video stream with pdgst from XIMEA camera
On 08/22/13 18:40, Jack wrote: Le 22/08/2013 18:23, IOhannes m zmölnig a écrit : On 08/22/13 18:05, Jack wrote: When I compile streamViewer.cpp which contains the gstreamer pipe finishing by : v4l2sink device=/dev/video2, i get no error. [...] $ v4l2-ctl --all -d /dev/video2 Failed to open /dev/video2: No such file or directory [...] $ cat /sys/devices/virtual/video4linux/video2/format cat: /sys/devices/virtual/video4linux/video2/format: No such file or directory it seems that there is no /dev/video2. you should set up your pipeline to write to an existing v4l2 loopback device. then report the output of v4l2-ctl and /sys/devices/... for *that* device. fgmdsr IOhannes signature.asc Description: OpenPGP digital signature ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] [OT] get video stream with pdgst from XIMEA camera
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le 22/08/2013 19:39, IOhannes m zmölnig a écrit : On 08/22/13 18:40, Jack wrote: Le 22/08/2013 18:23, IOhannes m zmölnig a écrit : On 08/22/13 18:05, Jack wrote: When I compile streamViewer.cpp which contains the gstreamer pipe finishing by : v4l2sink device=/dev/video2, i get no error. [...] $ v4l2-ctl --all -d /dev/video2 Failed to open /dev/video2: No such file or directory [...] $ cat /sys/devices/virtual/video4linux/video2/format cat: /sys/devices/virtual/video4linux/video2/format: No such file or directory it seems that there is no /dev/video2. you should set up your pipeline to write to an existing v4l2 loopback device. then report the output of v4l2-ctl and /sys/devices/... for *that* device. fgmdsr IOhannes ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list Thanks IOhannes, I completely forgot to install v4l2loopback. Now it is working perfectly. Nice ! :) ++ Jack -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJSFlclAAoJEOuluecjw8GU9iIH/0ASkVio1BIYCifCZuDHyPAQ luIRQ4ZHZgAfrkQJd/auRFh5kK2zbmnqB8rG6Ft2UKRPKdPOlFZYXQ8Fp9v2oEfc tiiq0UoOl8Srp7F9ow83TFEoMWTD12nslQr86H8GSqWGbX873tDs+rPs8tQnpc1Q 4DhQwkTv/0T5uFkcq3YX3MDiSDwxdiQ6e7kPg9R2P0ZWfhJJMHQc+Df9MDB9vlvM 64muy8wroFSnvJT6Jo1LpAwNZrnxxf1eQmT/gbvScl41w9TfKnM3YBN7a3P0nDej Cmg/j9fEd8gSg+cu6NnOOiDrKNCBJfICCgAH9FuZf65xEB3AsAUZUM3BwLP2698= =XWKK -END PGP SIGNATURE- ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] [OT] get video stream with pdgst from XIMEA camera
Le 22/08/2013 20:23, Jack a écrit : Le 22/08/2013 19:39, IOhannes m zmölnig a écrit : On 08/22/13 18:40, Jack wrote: Le 22/08/2013 18:23, IOhannes m zmölnig a écrit : On 08/22/13 18:05, Jack wrote: When I compile streamViewer.cpp which contains the gstreamer pipe finishing by : v4l2sink device=/dev/video2, i get no error. [...] $ v4l2-ctl --all -d /dev/video2 Failed to open /dev/video2: No such file or directory [...] $ cat /sys/devices/virtual/video4linux/video2/format cat: /sys/devices/virtual/video4linux/video2/format: No such file or directory it seems that there is no /dev/video2. you should set up your pipeline to write to an existing v4l2 loopback device. then report the output of v4l2-ctl and /sys/devices/... for *that* device. fgmdsr IOhannes ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list Thanks IOhannes, I completely forgot to install v4l2loopback. Now it is working perfectly. Nice ! :) ++ Jack ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list Now : $ v4l2-ctl --all -d /dev/video1 Driver Info (not using libv4l2): Driver name : v4l2 loopback Card type : Dummy video device (0x) Bus info : v4l2loopback:0 Driver version: 0.7.0 Capabilities : 0x0501 Video Capture Read/Write Streaming Video input : 0 (loopback: ok) Video output: 0 (loopback in) Format Video Capture: Width/Height : 1280/1024 Pixel Format : 'GREY' Field : None Bytes per Line: 1280 Size Image: 1310720 Colorspace: SRGB Format Video Output: Width/Height : 1280/1024 Pixel Format : 'GREY' Field : None Bytes per Line: 1280 Size Image: 1310720 Colorspace: SRGB Streaming Parameters Video Capture: Frames per second: 30.000 (30/1) Read buffers : 8 Streaming Parameters Video Output: Frames per second: 30.000 (30/1) Write buffers: 8 keep_format (bool) : default=0 value=0 sustain_framerate (bool) : default=0 value=0 timeout (int): min=0 max=1 step=1 default=0 value=0 timeout_image_io (bool) : default=0 value=0 $ cat /sys/devices/virtual/video4linux/video1/format GREY?30:1280x1024@30 I expect 60 fps. If i set : $ v4l2-ctl -d /dev/video1 -p 60 or $ v4l2-ctl -d /dev/video1 -p 1 It doesn't change anything. Do you know if there is a possibility to get this frame rate (60 fps) ? Is it a limitation using videoloopback ? For info, i get 60 fps when I use the application streamViewer. ++ Jack ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] [OT] get video stream with pdgst from XIMEA camera
On 08/22/2013 08:40 PM, Jack wrote: $ cat /sys/devices/virtual/video4linux/video1/format GREY?30:1280x1024@30 I expect 60 fps. If i set : $ v4l2-ctl -d /dev/video1 -p 60 or $ v4l2-ctl -d /dev/video1 -p 1 It doesn't change anything. Do you know if there is a possibility to get this frame rate (60 fps) ? Is it a limitation using videoloopback ? no. v4l2loopback does not know nor care about frames or formats. it simply passes the frames from one application to another. there is no colorspace-conversion of resampling or the like involved. it's gstreamer that doesn't set the framerate correctly. you could force it by running: $ echo @60 | sudo tee /sys/devices/virtual/video4linux/video1/format in practice i don't think that this framerate setting will do much. For info, i get 60 fps when I use the application streamViewer. how do you know? fdsmard IOhannes signature.asc Description: OpenPGP digital signature ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list