HOW-TO stream a WebCam to XBMC
#1
Hi all,
This took me a few hours to work out, so I thought I would document it here for future searches.

This describes how to stream a webcam from your pc to xbmc.

1) Setup streaming on your PC
Using Windows Media Encoder, setup a stream from your camera. It is pretty straight forward to follow the wizard.

The streaming url will be something like
mms://192.168.1.3:9002

Test this by plugging the url into Windows Media Player or Internet Explorer.
You should see a video stream from your webcam.

2) Create a playlist file - webcam.pls

Code:
[playlist]
NumberOfEntries=1

File1=mms://192.168.1.3:9002
Title1=My WebCam
Length1=-1

Version=2

3) Ftp the playlist into your /UserData/playlists/Video folder

4) Now in XBMC, go to Videos, select Library Mode

5) Browse to Playlists and find your webcam playlist

6) Right click (white button), select Add to Favorites

7) Done, you can now view your webcam from xbmc!


This will of course work with external webcams etc (eg: surf cams) - you just have to edit the playlist file accordingly (see wikipedia).

HTH
Reply
#2
You know whats so cool about this. This could be used for Security cameras. Hook up about 11 of them around your house and tune them in on your xbox. XBMC is just so versatile! This would also be great for milti room video i supose.
Reply
#3
Well lurked long enough but thought I'd say thanks for the heads up on this.

Just tried streaming from WebcampXP to the xbox. Works a treat Smile

I just created a file with one line :

mms://192.168.0.5:9001/0


Put that on the xbox then opened that and get a really good stream.

Thanks WinterFool.
Reply
#4
Just gotta notice that "> Start Encoding" button, a voila!
Reply
#5
set this up and there is a 5-10 second delay, so by the time you realised your missus was misbehavin... he would have finished and gone Angry
Reply
#6
Any idea if this will work for IP cameras also?

Has anyone tried it and got it working?? :confused2:
Reply
#7
Hi.

Great idea...

Though your post isn't exactly what i want to do, it does seem to show me what might be possible.

So, I'm just wondering if there might be any way to use this to watch my cable service?

I currently have my cable TV coming through my PC capture card and can watch it with the card's supplied software. However, it would be super-cool if i could watch it through XBMC.

So, does anybody know how i might watch my cable in this way?

ALso, second question, can i do all of this locally? Because my XBMC HTPC does not have an internet connection i cannot set up an internet stream..

Thanks anyone for any help
Reply
#8
ethan_9219 Wrote:Hi.

Great idea...

Though your post isn't exactly what i want to do, it does seem to show me what might be possible.

So, I'm just wondering if there might be any way to use this to watch my cable service?

I currently have my cable TV coming through my PC capture card and can watch it with the card's supplied software. However, it would be super-cool if i could watch it through XBMC.

So, does anybody know how i might watch my cable in this way?

ALso, second question, can i do all of this locally? Because my XBMC HTPC does not have an internet connection i cannot set up an internet stream..

Thanks anyone for any help

I have done this with the VLC Player on my laptop. I remember following a tutorial for doing this, But it was a long time ago. But it is possible to do. Try http://forum.xbmc.org/showthread.php?tid=3658
Reply
#9
I setup a Windows Media Encoder stream and successfully tested it by navigating my web browser to mms://192.168.1.140:1111.

I then uploaded a webcam.pls file with the content below to /UserData/playlists/Video.

Quote:[playlist]
NumberOfEntries=1

File1=mms://192.168.1.140:1111
Title1=WebCam - Great Room
Length1=-1

Version=2

I tried opening the stream in XBMC and it fails, I get a message that says:
Quote:Opening Stream - 100%

Webcam - Great Room

terminating

I tried uploading another file GreatRoom.pls with the following content:
Quote:mms://192.168.1.140:1111/0

GreatRoom.pls does nothing. No apparent response, no error message.

Any ideas?

I am running:
XBMC Live 8.10 from a USB flash drive
Athlon 64 x2 5000+ w/ 2GB RAM
NVidia GeForce 8500


Here is a snippet from my xbmc.log
Quote:16:07:35 T:3053131648 M:1800650752 DEBUG: Update - NEW at 169589:000000037ff07be0 00 Down mceusb
16:07:35 T:3053131648 M:1800650752 DEBUG: OnKey: 167 pressed, action is 4
16:07:35 T:3053131648 M:1800650752 DEBUG: Load defaultFileBig.png: 0.2ms (bundled)
16:07:35 T:3053131648 M:1799229440 DEBUG: Update - NEW at 169900:000000037ff07be0 00 Down mceusb
16:07:35 T:3053131648 M:1799229440 DEBUG: OnKey: 167 pressed, action is 4
16:07:35 T:3053131648 M:1799229440 DEBUG: Load defaultPlaylistBig.png: 1.3ms (bundled)
16:07:36 T:3053131648 M:1797070848 DEBUG: Update - NEW at 170359:000000037ff07bdd 00 OK mceusb
16:07:36 T:3053131648 M:1797070848 DEBUG: OnKey: 11 pressed, action is 7
16:07:36 T:3053131648 M:1797070848 DEBUG: new file set audiostream:0
16:07:36 T:3053131648 M:1797070848 DEBUG: CPlayerCoreFactor::GetPlayers(mms://192.168.1.140:1111)
16:07:36 T:3053131648 M:1797070848 INFO: Loading skin file: DialogProgress.xml
16:07:36 T:3053131648 M:1797070848 DEBUG: Load DialogProgress.xml: 1.36ms
16:07:36 T:3053131648 M:1797070848 DEBUG: DialogProgress::StartModal called
16:07:36 T:3053131648 M:1797070848 DEBUG:
16:07:36 T:3053131648 M:1797070848 DEBUG: ------------------- GUI_MSG_WINDOW_INIT
16:07:36 T:3053131648 M:1797070848 DEBUG: Progress dialog
16:07:36 T:3053131648 M:1797070848 DEBUG: -------------------
16:07:36 T:3053131648 M:1797070848 DEBUG: Load button-focus2.png: 0.1ms (bundled)
16:07:36 T:3053131648 M:1797070848 DEBUG: Load button-nofocus.png: 0.1ms (bundled)
16:07:36 T:3053131648 M:1797070848 DEBUG: Alloc resources: 0.27ms (0.01 ms skin load, 0.05 ms preload)
16:07:36 T:3053131648 M:1796038656 DEBUG: Load DialogBack.png: 6.2ms (bundled)
16:07:36 T:3053131648 M:1792815104 DEBUG: Load DialogFront.png: 6.2ms (bundled)
16:07:36 T:3053131648 M:1792815104 DEBUG: Load separator.png: 0.1ms (bundled)
16:07:36 T:2904382352 M:1792815104 DEBUG: Running thread 2904382352
16:07:36 T:2904382352 M:1792815104 DEBUG: thread start, auto delete: 1
16:07:36 T:3053131648 M:1792815104 NOTICE: DVDPlayer: Opening: mms://192.168.1.140:1111
16:07:36 T:3053131648 M:1792815104 WARNING: CDVDMessageQueue:Tongueut MSGQ_NOT_INITIALIZED
16:07:36 T:2895989648 M:1792815104 DEBUG: Running thread 2895989648
16:07:36 T:2895989648 M:1792815104 DEBUG: thread start, auto delete: 0
16:07:36 T:2895989648 M:1792815104 NOTICE: Creating InputStream
16:07:36 T:2895989648 M:1777676288 DEBUG: CFileCache::Open - opening <> using cache
16:07:36 T:2895989648 M:1777676288 DEBUG: MMS: socket connected
16:07:36 T:2895989648 M:1777676288 ERROR: MMS: eof reached
16:07:36 T:2895989648 M:1777676288 ERROR: MMS: pre-header read failed
16:07:36 T:2895989648 M:1777676288 ERROR: MMS: error reading ASF header
16:07:36 T:2895989648 M:1777676288 ERROR: Open - failed to open source <mms://192.168.1.140:1111/>
16:07:36 T:2895989648 M:1793417216 ERROR: CDVDPlayer::OpenInputStream - error opening [mms://192.168.1.140:1111]
16:07:36 T:2895989648 M:1793417216 NOTICE: CDVDPlayer::OnExit()
16:07:36 T:2895989648 M:1793417216 NOTICE: CDVDPlayer::OnExit() deleting input stream
16:07:36 T:2895989648 M:1793417216 DEBUG: Playback was stopped
16:07:36 T:2895989648 M:1793417216 DEBUG: staticThread, deleting thread graphic context
16:07:36 T:2895989648 M:1793417216 DEBUG: Thread 2895989648 terminating
16:07:36 T:3053131648 M:1793355776 NOTICE: CDVDPlayer::CloseFile()
16:07:36 T:3053131648 M:1793355776 WARNING: CDVDMessageQueue:Tongueut MSGQ_NOT_INITIALIZED
16:07:36 T:3053131648 M:1793355776 NOTICE: DVDPlayer: waiting for threads to exit
16:07:36 T:3053131648 M:1793355776 NOTICE: DVDPlayer: finished waiting
16:07:36 T:3053131648 M:1793355776 ERROR: Playlist Player: skipping unplayable item: 0, path [mms://192.168.1.140:1111]
16:07:36 T:2904382352 M:1793355776 DEBUG: staticThread, deleting thread object
16:07:36 T:2904382352 M:1793355776 DEBUG: staticThread, deleting thread graphic context
16:07:36 T:2904382352 M:1793355776 DEBUG: Thread 2904382352 terminating
16:07:36 T:3053131648 M:1791823872 DEBUG: ------------------- GUI_MSG_WINDOW_DEINIT
16:07:36 T:3053131648 M:1791823872 DEBUG: Progress dialog
16:07:36 T:3053131648 M:1791823872 DEBUG: -------------------
Reply
#10
Question 
I tried adding an m3u playlist that I tested successfully using WinAmp. The m3u playlist fails just like the pls. The contents of the m3u play list are as follows:

Quote:#EXTM3U
#EXTINF:0,WillyB - Front Drive Cam
mms://192.168.1.147:1721
#EXTINF:0,WillyB - WillyBsHome
mms://192.168.1.140:1111

I noticed that when uploading the files my FTP client (WinSCP) gives the following error:

Quote:Upload of file 'Webcam.m3u' was successful, but error occurred while setting the permissions and/or timestamp. If the problem persists, turn on 'Ignore permission errors' option.

Permission denied.
Error code: 3
Error message from server: Permission denied
Request code: 9

Is it possible the streams are failing due to a permissions issue? I checked the permissions, and they appear to be 777. I SSH'd in and tried to manually set the permissions but I get the message:
Quote:chmod: changing permissions of 'webcam.m3u' : Operation not permitted

Any suggestions are welcome & greatly appreciated.
Reply
#11
WillyB Wrote:I setup a Windows Media Encoder stream and successfully tested it by navigating my web browser to mms://192.168.1.140:1111.

I then uploaded a webcam.pls file with the content below to /UserData/playlists/Video.



I tried opening the stream in XBMC and it fails, I get a message that says:


I tried uploading another file GreatRoom.pls with the following content:

GreatRoom.pls does nothing. No apparent response, no error message.

Any ideas?

I am running:
XBMC Live 8.10 from a USB flash drive
Athlon 64 x2 5000+ w/ 2GB RAM
NVidia GeForce 8500


Here is a snippet from my xbmc.log


Did you get this working? I've got a Linksys wireless internet cam that I'd like to stream. Thanks
Reply
#12
So I've followed your initial instructions and created the following webcam1.pls file

[playlist]
NumberOfEntries=1

File1=http://192.168.1.105/axis-cgi/mjpg/video.cgi:80
Title1=My WebCam
Length1=-1

Version=2

Added to XBMC the way you describe but when I choose webcam1.pls from Favourites nothing happends....any ideas please?
Reply
#13
:80 should not be at the end.
Reply
#14
File1=http://192.168.1.105/axis-cgi/mjpg/video.cgi:80

This does not make sense to me. How can a file be a web cam stream. THis is how I break this down.

WEB ADDRESS ON NETWORK/File location/ Port number. Weird?

Maybe I am not getting something. I thought all you had to do was give an IP address and the machine would look for the content there.

I think Ill be reading into how streaming really works. I need some more info on this subject.
Reply
#15
Zeron Wrote::80 should not be at the end.

Ok so it now tries to open the stream. A popup window comes up saying Opening File at the top of the popup box and sits at 23%

Underneath it says 'Caching.....'
Then 'demux_open(00D3C010,0,-1,-1,1)

I'm running Nightly Build 21055 dated 14th June 2009
Reply

Logout Mark Read Team Forum Stats Members Help
HOW-TO stream a WebCam to XBMC2