• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

PICAMERA stream

Scheduled Pinned Locked Moved Requests
5 Posts 2 Posters 4.5k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L_i_v_e
    last edited by Aug 5, 2016, 11:17 AM

    Hi i’d like to have a picamera stream in the mirror, under the compliment text. I currently use 2 raspi, one will stream, the other is where i host the server, but i can simply use the same for both recording and creating the server, to be opened from the other pi. As streamer i use RPi Cam Control v6.2.11 but i can use any other. I have no clue of how to do it, can you advice me please? Thanks

    1 Reply Last reply Reply Quote 0
    • L Offline
      L_i_v_e
      last edited by paviro Sep 27, 2016, 8:15 PM Aug 15, 2016, 8:03 PM

      Ok, so i have to merge those two codes to make stuffs work:
      The idea is to have a stream as wide as the vertical display at the current place of the “message module”. Is anyone with a suggestion on how to make it work? Tomorrow i’ll start the trials.

      php:

      <!DOCTYPE html>
      <html>
        <head>
          <title>RPi Cam Preview</title>
          <script src="script_min.js"></script>
        </head>
        <body onload="setTimeout('init();', 100);">
          <center>
            <div><img id="mjpeg_dest" /></div>
          </center>
       </body>
      </html>
      
      

      js:

      var mjpeg_img;
       
      function reload_img () {
        mjpeg_img.src = "cam_pic.php?time=" + new Date().getTime();
      }
      function error_img () {
        setTimeout("mjpeg_img.src = 'cam_pic.php?time=' + new Date().getTime();", 100);
      }
      function init() {
        mjpeg_img = document.getElementById("mjpeg_dest");
        mjpeg_img.onload = reload_img;
        mjpeg_img.onerror = error_img;
        reload_img();
      }
      

      Note from admin: Please use Markdown on code snippets for easier reading!

      1 Reply Last reply Reply Quote 0
      • L Offline
        L_i_v_e
        last edited by L_i_v_e Aug 16, 2016, 9:40 AM Aug 16, 2016, 9:24 AM

        Ok, so my cam have two pure streams:
        http://192.168.0.101/html/cam_pic_new.php
        which is a constant stream (by refreshing the page)
        http://192.168.0.101/html/cam_pic.php
        which is the latest capture from the camera. So basically i need to set a picture viewer area in the mirror that refresh a lot
        any suggestion?

        https://www.npmjs.com/package/imagemagick-stream this could help?

        F 1 Reply Last reply Sep 25, 2016, 9:56 PM Reply Quote 0
        • F Offline
          frasen @L_i_v_e
          last edited by Sep 25, 2016, 9:56 PM

          @L_i_v_e It actually sounds like you have static images and not a video stream. It also doesn’t seem to be picamera specific. Have you tried using the Camera module? https://github.com/alexyak/camera

          L 1 Reply Last reply Sep 26, 2016, 12:55 PM Reply Quote 0
          • L Offline
            L_i_v_e @frasen
            last edited by Sep 26, 2016, 12:55 PM

            @frasen said in PICAMERA stream:

            @L_i_v_e It actually sounds like you have static images and not a video stream. It also doesn’t seem to be picamera specific. Have you tried using the Camera module? https://github.com/alexyak/camera

            Hi, thanks for the suggestion but i’m not sure it will work. The description says: The webcamera needs to be connected to the Raspberry Pi via USB.
            My camera in on another raspberry, so there is no way that this could work.
            Anyway i’ll ask to the creator, maybe he knows how to make it work.

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy