1

I have an IP-CAM that streams video over RTSP and I want to detect bar codes from it with zbarcam (from Ubuntu's zbar-tools package).

According zbarcam's manual, it expects to be given a video4linux character device (default /dev/video0). How can I let it receive that RTSP stream instead?


I tried to use mplayer, but I can't figure out how I could use that to pipe the stream to zbarcam.

  • 2
    You might be able to implement it using the instructions from superuser.com/questions/411897/… – Cristian Măgherușan-Stanciu Aug 31 '14 at 20:35
  • Great hint. Meantime I tried to create a node (mknod) but this didn't worked. I will try that ffmpeg v4l-device. Thank you. You better should use answers, then i can vote. – Bernd Ott Sep 1 '14 at 6:54
  • I wasn't actually giving a real answer, it was just a hint. I'll try to suggest an answer more properly. – Cristian Măgherușan-Stanciu Sep 2 '14 at 15:24
1

Try something on these lines:

sudo apt-get install v4l2loopback-utils gstreamer1.0-tools
sudo modprobe v4l2loopback # might not be needed
gst-launch-1.0 -v rtspsrc location=rtsp://your_stream_url ! v4l2sink device=/dev/video1

Then you should be able to use zbarcam against /dev/video1 as usual.

  • I think this could work, but not on my rasp pi. there is a problem with that v4l2loopback, can't get it to work. – Bernd Ott Sep 3 '14 at 20:06
  • What exactly fails? I guess v4l2loopback should be cross-platform... – Cristian Măgherușan-Stanciu Sep 9 '14 at 18:23
  • Is not part of my dist. so i have to compile it. won't compile because i didn't setup the infrastructure correct. I only need time, it's not a technical problem anymore. thx – Bernd Ott Sep 10 '14 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.