My webcam to local website ( Live Stream & Image Capture) - php

I began thinking of a side-project recently that will make use of usb triggered relay switches to allow interaction between the internet and mechanical objects (something like click a button on a site and ring a real bell).
Now I have this part figured out but what I'd love to do is have this captured, live on streaming video via a webcam (and potential take a snapshot at a specific time). I'm pretty sure I'd have to use some sort of scripting language that can interact with hardware (flash/flex/silverlight). Also consider that this will be hosted locally, on the computer that has the webcam. Any Ideas? Thanks!

I would suggest writing a kiosk type of application in adobe air. You can capture the camera pretty easily and some simple network event listening to tell it when to snap some video.
Sounds somewhat interesting, if you need some help let me know (my stack nick has my email)

Related

Getting user's full address on internet for transfer

Is there a way to get a user's full address on the internet, using php, so that the address can be send to a client application on another computer on the internet and enable it to transfer files directly?
What I'm trying to do is: I have put together a desktop application in vb.net that will exchange live webcam feed between computers on a lan. However, I want to enable the users to exchange the feed via the internet, but the only servers I will have at my disposal are simple lamp servers. I'd like to write a script in php that the desktop application can periodically connect to so that the server can confirm the computer's availability as well as maintain it's physical address. Then, when a computer's desktop webcam app wants to connect to the other, it can check the php server to make sure it's available and grab it's physical address to know where to send the udp packets to.
Also, if anybody has a better suggestion as to how to deal with this need, I'd try anything that might work. I'm a paramedic at an ambulance service who loves to play with code and my boss is wanting to be able to use our mobile internet connections on our trucks to be able to provide live feed to the local trauma center and interact with trauma surgeons during our transports. I'm making great progress so far, but this is kind of where I'm stuck. Any suggestions would be greatly appreciated! Thanks in advance!
Have you looked at OpenTok? Its a javascript based video chatting solution. The service costs money, but is very affordable (free for 25,000 minutes a month)

php mobile website, need advice

i am planning to build a very simple mobile website which involves form submission and database storing, few years ago i have heard something called wap and wml to make these kind of webs, so i search on google for the IDE or the SDK, but it seems that all the pages regarding those is no longer available, i wonder....
anyway, what do people use nowadays to build mobile websites (because obviously, i am way left behind about this) ? if you don't mind, please provide me reading materials on how to build mobile websites today, thank you very much
what do people use nowadays to build mobile websites
HTML.
It depends,
Do you want to target high-end smartphones or older phones that only support basic HTML/CSS?
Typically most mobile websites work on a range of handsets and use HTML5 or XHTML-MP, if you need to support very old handsets you can use WML (otherwise don't bother).
WAP and WML are, as far as I'm concerned, effectively dead. Nobody uses them. It used to be the way mobile sites were built, but things have gotten much better.
These days your best bet is just to use HTML, CSS and JavaScript. You don't want to build a full desktop-style site though, you still want to build for low bandwidth consumption. Part of the issue is which platforms your are targeting. If you only care about iPhones, then it's really simple. You can build an test in Mobile Safari and be done with it. If you register for the Apple Developer Program, and download the XCode bundle, it includes a Mobile Safari emulator.
It's pretty easy to also support Android phones, as they use a very similar browser (Chrome/WebKit). It gets trickier when you want to include Blackberry or Windows Phone. Blackberry prior to OS version 6 has a terrible browser, which can only handle basic HTML, and limited or no CSS and JS. At this time I'm not aware of what the capabilities are on Windows Phone 7.
There are some JavaScript frameworks around that will help you add features to mobile sites via progressive enhancement, and they help you work with touchscreen events. Google for Sencha Touch and jQuery Mobile.
People tend to build mobile websites the same way they build standard websites: HTML, CSS, JS. See this article for a more in-depth look: http://www.smashingmagazine.com/2010/11/03/how-to-build-a-mobile-website/
If targeting high-end devices (iPhone, Android, iPad), you'd need to just get to know the browser application for those handhelds. Apple has lots of documentation on presenting web content for the iOS devices, and how to communicate different preferences to the browser (like should the page be able to be pinch-zoomed, or what image should be used for a shortcut icon if the user wants to save it to their springpad (larger image than a favicon)), like this guide for preparing content for the iPad.

How to send info to LCD from web

I have seen applications capable of sending information to Logitech LCD panels and played with that a bit a few years ago. Currently, I have four small LCD panels. Two are CrystalFontz 633s, one came from a 1U EMC data storage box and one was taken from an old ethernet-based KVM, so I've no idea what it's capabilities are. Using either Flex Builder or Visual Studio, is it possible to create either a webpage or an offline app, such as for Adobe Air, Mac Widget, or Windows 7 Gadget, that can check for and feed text to a USB- or serial-connected LCD device? If it's an offline app, it would be very convenient to be able to talk to web-based php scripts and relay that data back to the LCD.
PHP can talk to serial ports and fortunately for you someone has done the heavy lifting already:
http://code.google.com/p/php-serial/
After that it's just a question of talking to the LCD with whatever set of instructions it understands. That information should be in the developer manual unless you want to go the fun route and send random characters until something happens :)
Don't write directly to LCD's. That's just pain. Instead, write a tiny client application that will talk to your web server, and display the data on your LCD screens.

How to record voice files using PHP, FLASH

I am developing an application where I need to record voice(for those who does not have a webcam so they can use only microphone to record voice) or video(those who have a a webcam - like laptop or external) files and save them on server, thereafter save the file name and logged in users id on database for later access.
I know I need to use some sort of flash app for this. But is there any free one which could server this purpose or even if there are paid ones which could serve this purpose that would be great. I tried google but may be I was not being able to go after the proper term or something, I could not succeed finding a proper solution for this.
Please, help me out!
You can do that simply using jRecorder, a jQuery plugin. You don't even need a Flash Media Server or RED server. JRecorder is same as jPlayer, you can use jQuery and HTML to design your recorder and you don't even need Flash or Action script knowledge for this.
jRecorder uses 1 pix hidden swf file which manages all the recording / previewing and sending the file data (wav file) to a URL you defined (Where you can write code in PHP or Java to receive a POST file)
It is quite simple and tidy.
You can download this Plugin from:
http://www.sajithmr.me/jrecorder-jquery
I have same feature in our latest project, the client want to have video recording from webcam and the video appear in the user's profile page.
For the server, we implement the RED5 server. It need a Java virtual machine in your hosting. You can read the detail requirement and installation instruction in the website.
To handle recording, we develop our own flash application, because the client request a custom interface to match with the overall website interface. I don't know the detail, since we outsource it to a fellow flash developer. Maybe you can see follow this thread, the development of flash recording by JeroenW.
To play recorded video, you can use any flash video player that support playing rtmp video source. You cannot play the recorded flv file in RED5 directly, since the file lack of metadata required by the player. Serving the recorded file as rtmp is done by RED5.
In addition to red5 there is Adobe's own Flash Media server that allows you to record audio/video straight to the server.
Or if you feel geeky you might be able to put together your own solution for this using a socket connection to the server and decoding the stream yourself on the server side. You should be able capture the audio/video locally into memory and then feed the byte stream up to your own server application.
There are Open Source solutions but you will need an own server to run them.
There is no way to run these things from shared hosting except if your provider is really nice, and ready to install the necessary software.
I asked the same question a few weeks back, check out the answers.
This question when googling "How to record audio php" comes up first so here for anyone from the future.
A simple way to record audio with flash and save it with PHP:
https://github.com/clouddueling/SimpleRecorder
Record audio, post audio data to your choice of url.
You could try recordmp3online.com which has an SDK. The nice thing about this one, is that it doesn't need a third party server(ala Red5), and supports mobile devices that don't have flash installed.

Live Video Streaming with PHP

I have a PHP/AJAX/MYSQL chat application. I want to add video chatting to my application. How can I create live video streaming to be used for live video conferences/chatting in a PHP application. What are the key-terms I need to know if I wanted to build such a system? Is it a good idea in the first place to use PHP? Is there something I'm not thinking about? What other languages can I use, perhaps in conjunction with PHP?
I am not saying that you have to abandon PHP, but you need different technologies here.
Let's start off simple (without Akamai :-)) and think about the implications here. Video, chat, etc. - it's all client-side in the beginning. The user has a webcam, you want to grab the signal somehow and send it to the server. There is no PHP so far.
I know that Flash supports this though (check this tutorial on webcams and flash) so you could use Flash to transport the content to the server. I think if you'll stay with Flash, then Flex (flex and webcam tutorial) is probably a good idea to look into.
So those are just the basics, maybe it gives you an idea of where you need to research because obviously this won't give you a full video chat inside your app yet. For starters, you will need some sort of way to record the streams and re-publish them so others see other people from the chat, etc..
I'm also not sure how much traffic and bandwidth this is gonna consume though and generally, you will need way more than a Stackoverflow question to solve this issue. Best would be to do a full spec of your app and then hire some people to help you build it.
HTH!
Please note that the below described service is no longer available as
it was based on FLV media (Flash)
This project which utilizes the Red5, Flex and PHP for Live Video Streaming and Recording has many features
Stream Live video to the viewers
Record the streams from your cam or other video input devices to the server
Preview the recorded streams and files and thumbnail the frame which you would like to display for the video.
Upload the videos from your computer and convert them to FLV which can be streamed using Red5 .
Choose from any resolutions
Can be plugged to any script
Each website user can have a separate Directory for storing their videos and thumbnails use this link
http://code.google.com/p/red5-flex-streamer/
PHP will let you build the pages of your site that make up your video conferencing and chat applications, but it won't deliver or stream video for you - PHP runs on the server only and renders out HTML to a client browser.
For the video, the first thing you'll need is a live streaming account with someone like akamai or the numerous others in the field. Using this account gives you an ingress point for your video - ie: the server that you will stream your live video up to.
Next, you want to get your video out to the browsers - windows media player, flash or silverlight will let you achieve this - embedding the appropriate control for your chosen technology into your page (using PHP or whatever) and given the address of your live video feed.
PHP (or other scripting language) would be used to build the chat part of the application and bring the whole thing together (the chat and the embedded video player).
Hope this helps.
PHP/AJAX/MySQL will not be enough for creating the live video streaming application There is a similar thread here. It primarily suggests using Flex or Silverlight.
For live video conferencing you can't ignore the need of a streaming server.
Yes, flash will let you display video from a webcam within the local flash control, but that won't let you then send that video over the network - for that you need a streaming server to send it to.
If you're going to build something like this it's prudent to think about how you're going to host the video from a very early stage as it will influence how you build the application. Flash/Flex/Silverlight/Windows Media....etc....
There are a lot of "off-the-shelf" 'servers' that will run in your environment.
Most of these utilize the aforementioned Flex or Silverlight to implement the actual video itself but I'm pretty sure all will run under LAMP/PHP.
The challenges will picking the best software from everything that's available and getting your hosting-provider to let you stream video (it goes without saying that streaming is heavy on bandwidth).
You can easily build a website as per the requirements. PHP will be there to handle the website development part. All the hosting and normal website development will work just as it is. However, for the streaming part, you will have to choose a good streaming service. Whether it is Red5 or Adobe, you can choose from plenty of services.
Choose a service that provides a dedicated storage to get something done right. If you do not know how to configure the server properly, you can just choose a streaming service. Good services often give a CDN that helps broadcast the stream efficiently. Simply launch your website in PHP and embed the YouTube player in the said web page to get it working.
Same problem/answer here, quoted below
I'm assuming you mean that you want to run your own private video
calls, not simply link to Skype calls or similar. You really have 2
options here: host it yourself, or use a hosted solution and integrate
it into your product.
Self-Hosted
----------------- This is messy. This can all be accomplished with PHP, but that is probably not the most advisable solution, as it is
not the best tool for the job on all sides. Flash is much more
efficient at a/v capture and transport on the user end. You can try to
do this without flash, but you will have headaches. HTML5 may make
your life easier, but if you're shooting for maximum compatibility,
flash is the simplest way to go for creating the client. Then, as far
as the actual server side that will relay the audio/video, you could
write a chat server in php, but you're better off using an open source
project, like
janenz00's mention
of red5, that's already built and
interfacing with it through your client (if it doesn't already have
one). Or you could homebrew a flash client as mentioned before and
hook it up to a flash streaming server on both sides...either way it
gets complicated fast, and is beyond my expertise to help you with at
all.
Hosted Service
----------------- All in, my recommendation, unless you want to administer a ridiculous setup of many complex servers and failure
points is to use a hosted service like
UserPlane or similar and offload all the
processing and technical work to people who are good at that, and then
worry about interfacing with their api and getting their client well
integrated into your site. You will be a happier developer if you do.

Categories