minimattapps
Posts: 49
Joined: Thu Aug 02, 2012 9:04 am

Software to stream a .jpg

Tue Jan 29, 2013 1:48 am

Hi All,

I am currently trying to figure out how to use my Canon DSLR (550D / Rebel T2i) as a webcam using my Raspberry Pi. It is all working except for the very last step streaming it. Every 70 milliseconds my program writes the output of the live viewfinder to a file called output.jpg. I was wondering if there is any script/software out there to take this file and write it to a fake webcam (like v4l2loopback) and then stream it or stream it directly.

Thanks Matt

audioscience
Posts: 9
Joined: Sat Jan 19, 2013 9:45 pm

Re: Software to stream a .jpg

Tue Jan 29, 2013 2:42 am

I think you'll find some success using mjpg-streamer: http://translate.google.com/translate?s ... pi&act=url

Although I've not set it up using a DSLR, I believe they use the same mjpg format for video.

minimattapps
Posts: 49
Joined: Thu Aug 02, 2012 9:04 am

Re: Software to stream a .jpg

Tue Jan 29, 2013 3:01 am

That is fine for the streaming side of things but i first need to inject the jpg's into a fake webcam and v4l2loopback doesnt seem to be working. It compiles fine but doesnt seem to be generating a fake webcam device

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Software to stream a .jpg

Tue Jan 29, 2013 8:17 am

This might be of use :
https://sites.google.com/site/andycivil ... ith-ffmpeg
http://blog.gaiterjones.com/ffmpeg-how-to-make-video/

You can now happily start hacking with bash scripts , GNU tools ,
tmpfs , named pipes ..


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

minimattapps
Posts: 49
Joined: Thu Aug 02, 2012 9:04 am

Re: Software to stream a .jpg

Wed Jan 30, 2013 5:23 am

Thanks i actually came across those exact articles before you posted and it led me on the right track. I am now able to use my DSLR as a HD Broadcast Camera for Live Streams.

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Software to stream a .jpg

Wed Jan 30, 2013 6:29 am

How did you get it working ? Bash or Python ?
Do you mind sharing the code ?

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

User avatar
aTao
Posts: 1091
Joined: Wed Dec 12, 2012 10:41 am
Location: Howlin Eigg

Re: Software to stream a .jpg

Wed Jan 30, 2013 6:36 am

It seems like you are looking for a solution to push the jpgs. Have you thought of pulling them instead?
If, say they were on a web page, that page could request refresh every ? seconds, with appropriate no-cache settings it would pull the latest image.
>)))'><'(((<

bugloss
Posts: 22
Joined: Fri Jan 04, 2013 2:44 pm
Contact: Website

Re: Software to stream a .jpg

Thu Apr 11, 2013 7:08 am

I'd be very interested in seeing the code as I would like to use it the record the construction of the local sports hall for the sports club.
http://www.adamwilson.co

Return to “General programming discussion”