[Solved] Webcam viewer tab plugin?

General Discussion

[Solved] Webcam viewer tab plugin?

Postby Dominic » Wed Mar 05, 2014 8:17 pm

Hello, the keypad app download page mentions that a webcam viewer tab plugin exists, but I haven't been able to find any more information about it. Is there any information about how to get the plugin and how to set it up?
Thanks,

Dominic
Dominic
newt
newt
 
Posts: 12
Joined: Sat Feb 22, 2014 11:37 am

Re: Webcam viewer tab plugin?

Postby mathewss » Wed Mar 05, 2014 9:35 pm

I use it on my own system at home and would love to have someone else test but a few dependencies make it tricky. This is based upon Linux. Other similar methods exist using C# and embedding media player on windows platforms.

The method I chose was only because it was the first successful way I found to get video to embed in C#.

I first went the webkit html5 method and thus was born the webkit plugin that is currently provided in the App modules directory. Sadly what I found though is that HTML5 and live video was not working at least in the webkit package for my Linux wall pc and it was not very clear if it ever would work. I tried many tests to stream video and most failed although I have seen some recent posts of a HTML5 webcam that look promising. It does a perfect job of streaming videos and such. Anyway long story short that was a dead end but I have hope for it in the future or maybe even today.

I ended up finding that mplayer had a cool little option -wid This when given the handle will render the video directly onto the window handle so all I had to do was create two 500x400 windows for my two cameras in my own plugin for the Keypad App and execute the correct mplayer command in the background to connect to the video streaming server i will talk about this later and the window handles i created.

This is the running process command running on my system that was crated and started by the mplayer plugin tab.
Code: Select all
 
/usr/bin/mplayer -wid 31458629 -really-quiet -msglevel all=-1 -vo x11 -vf scale=500:-3 -lavfdopts analyzeduration=0 -demuxer lavf http://k1.tardus:8000/?action=stream.mjpg


Now here is where this method may have taken a bad turn. I was not able on my newly rebuilt xubuntu 12.04 system in the past few months find a package with mplayer that actually had this feature turned on or even in the source code. It is almost like it went POOF!!! It looks like some big changes happened in some of the branches or forks and so at least xubuntu picked a package that was one where the wid option did not exist. Not too big a concern for myself but it rapidly goes beyond the "easy" button category. Anyway I found that the svn version r34540 did have this feature and was able to download and compile and install it to the system.

* svn version of mplayer that I can conform works. Possibly later versions do as well
https://code.google.com/p/mplayer-mirro ... il?r=34540

To stream my video I have USB capture dongles 60$ each as I recall that worked on Linux connected to my main MythTV and media server system and on that box I run mjpg_streamer. Its easy to build and run but does require the environment path telling it where its plugins are node the LD_LIBRARY_PATH environment set in the same line as the command is run..

Code: Select all
 
LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/mjpg_streamer -frames 100 -b -i "input_uvc.so --yuv -d /dev/video1 -r 320x240 -f 5" -o "output_http.so -p 8001"


Anyway it works. Its not perfect and could use more people working on the project. The best I can do for now is provide my own code and let others such as yourself try.

I will post the code for this module in the contributed modules thread tonight.

Re
Sean M
mathewss
Moderator
Moderator
 
Posts: 188
Joined: Fri Dec 06, 2013 11:14 am

Re: Webcam viewer tab plugin?

Postby Dominic » Thu Mar 06, 2014 4:35 pm

Thanks so much for the detailed info Sean. Unfortunately I'm using a Windows box for my AD2USB interface, so I won't be able to help test this one right now.

Thanks again,

Dominic
Dominic
newt
newt
 
Posts: 12
Joined: Sat Feb 22, 2014 11:37 am

Re: Webcam viewer tab plugin?

Postby mathewss » Thu Mar 06, 2014 4:48 pm

No problem. If you have any data on your capture cards devices etc let me know maybe I can setup a windows system and try to make a plug-in specifically for windows.

Re
Sean M
mathewss
Moderator
Moderator
 
Posts: 188
Joined: Fri Dec 06, 2013 11:14 am


Return to General

Who is online

Users browsing this forum: No registered users and 6 guests

cron