pastebin - collaborative debugging tool
blankb.kpaste.net RSS


Raspi Low Bandwith Camera
Posted by Anonymous on Sun 2nd Apr 2017 03:48
raw | new post
view followups (newest first): Raspi Low Bandwith Camera by Anonymous

  1. Raspi video at 1 fps over web browser.
  2.  
  3. ###/home/pi/php/index.php
  4. <head>
  5.  <nometa http-equiv="refresh" content="2" />
  6. </head>
  7. <body>
  8.  <img src="frame.jpg" id="yourimage">
  9. <script>
  10. window.setInterval(function()
  11. {
  12.     document.getElementById('yourimage').src = "frame.jpg?random="+new Date().getTime();
  13. }, 1000);
  14. </script>
  15. </body>
  16.  
  17. ###/home/pi/php/startvideo.sh
  18. #!/bin/bash
  19. cd /home/pi/php
  20. php -S 0.0.0.0:8000 -t /home/pi/php/
  21. raspistill -t 0 -tl 2000 -w 640 -h 480 -o frame.jpg &

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}





All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at