Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Hi, you know, in terms of development time and cost, the easiest solution would be to have 2 raspberry pi's and 2 cameras. One to record, and one for realtime display. :-) What does a Pi and a camera cost $50? Plus you would have a backup to record with if your main recorder failed. Is $50 worth all the head-scratching required to get just 1 Pi to do it all? Like a few weeks of time for $50? :-)

I also came across something for you to google around for. It is claimed that Gstreamer, which has a Perl module, has the ability to duplex the video feed from one camera. That is what we need, take 1 camera output and split it into 2 identical streams. It dosn't seem it should be that hard, but it eludes us for now. ffmpeg seems to be able to do it, see ffmpeg multiple outputs. I'm going to play with that.

UPDATE0 These 2 links are the most promising leads. Use a kernel module 2 split the /dev/video stream, then use whatever to display 1 stream and record another. v4l2loopback module and splitting /dev/video to 2 streams .

UPDATE1It works! Here is how to split /dev0 into /dev/video1 and /dev/video2

modprobe v4l2loopback devices=2 # as root # then ffmpeg -f v4l2 -i /dev/video0 -f v4l2 /dev/video1 -f v4l2 /dev/video2
Now you can watch /dev/video1 in realtime, and record /dev/video2. :-)

I'm not really a human, but I play one on earth. ..... an animated JAPH

In reply to Re^3: Perl wrapper for v4l2-ctl by zentara
in thread Perl wrapper for v4l2-ctl by stevieb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-04-19 12:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found