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
-----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 >= 200000) 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 >= 200000) 0:00:21.923321131 12629 0x7fd1f8001e00 DEBUG appsrc gstappsrc.c:1451:gst_app_src_push_buffer_full:<streamViewer> queue filled (1074790400 >= 200000) 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 >= 200000) 0:00:21.939721014 12629 0x7fd1f8001e00 DEBUG appsrc gstappsrc.c:1451:gst_app_src_push_buffer_full:<streamViewer> queue filled (1076101120 >= 200000) 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 >= 200000) 0:00:21.955912125 12629 0x7fd1f8001e00 DEBUG appsrc gstappsrc.c:1451:gst_app_src_push_buffer_full:<streamViewer> queue filled (1077411840 >= 200000)
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 >= 200000) ? 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
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
-----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
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 (0x0000) Bus info : v4l2loopback:0 Driver version: 0.7.0 Capabilities : 0x05000001 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=100000000 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
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
-----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
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 ->