View previous topic :: View next topic |
Author |
Message |
Drasica Apprentice
Joined: 16 Apr 2006 Posts: 181
|
Posted: Mon Apr 07, 2014 5:31 pm Post subject: Streaming webcam/Flumotion--has anyone had success? |
|
|
I have a webcam connected to my desktop, and I'd like to make a website where people can go to it and simply see what my webcam does. I didn't realize that this wasn't quite a "solved problem". When I looked for solutions, I saw that many websites use proprietary solutions, and the FOSS solutions were rather complicated and ranged from making my own software to get images from the webcam and periodically refresh, somehow using RTMP, and others. The only "all inclusive" solution I found was Flumotion.
Unfortunately, flumotion has really not been working. The ebuild was out of date, but I tried it anyway, and encountered programming errors all over the place and Flumotion was unable to connect to my webcam. I decided to build the latest stable version, 0.10.1, from source, and it works even more poorly than the 0.8.1. I found the "blocking bug" on their bugtracker already, but the original reporter wrote it up 3 months ago and has gotten no developer response.
Have any of you solved this problem before? Or successfully used flumotion? The only requirements I have are that I want it to display inline in the browser. |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Tue Apr 08, 2014 12:41 am Post subject: |
|
|
Assuming you want a live video stream, ffmpeg/ffserver is all you need:
ffserver.conf: | Port 8012
BindAddress 0.0.0.0
MaxClients 64
CustomLog ffserver.log
<Feed webcam.ffm>
File /tmp/webcam.ffm
FileMaxSize 256M
ACL allow 127.0.0.1
</Feed>
<Stream webcam.webm>
Feed webcam.ffm
Format webm
NoAudio
VideoCodec libvpx
VideoFrameRate 15
VideoSize vga
VideoBitRate 200
AVOptionVideo flags +global_header
AVOptionVideo quality realtime
StartSendOnKey
</Stream> |
Code: | $ ffserver -f ffserver.conf
$ ffmpeg -f v4l2 -r 15 -i /dev/video0 http://localhost/webcam.ffm |
Then you should have a video stream at http://localhost:8012/webcam.webm (which even works in a <video> tag).
There's an example ffserver.conf with comments in the ffmpeg tarball, some of the examples are a bit outdated but it's still useful. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|