Welcome to WebmasterWorld Guest from 126.96.36.199
Forum Moderators: open
I am providing live streaming/webcasting. I want to be able to automatically record/save the stream on the webserver, so that it is available for viewing immediately for any audience who wasn't able to watch it live. I'm using Windows Media Encoder & Player.
I know I can record the stream while encoding it, but that's on my encoding computer, then it would have to be transfered manually to my webserver, and I have unskilled people doing this.
Is there any PHP code or routine I can use to catch the stream? My setup is that I send the stream from my encoding computer to my CDN/Streaming Server provider. On my website, which is hosted by a standard hosting company, I embed a MS Media Player control, with a link to the streaming server company.
I guess on my web host computer I could have a PHP script that would act as another "viewer" of the stream, & record it to a local file, but I don't know how to do that offhand. It would be great if anyone could point me to any existing code or give me any tips/advice/suggestions.
Again, this is my own content that I am streaming; not someone else's I'm trying to rip off.
I know I can record the stream while encoding it, but that's on my encoding computer, then it would have to be transfered manually to my webserver
Why would it have to be transferred manually?
You could use a script. I can't imagine the non-technical people are so non-technical they can't open an icon after the webcast is done.
You could possibly just record to a remote file. (Depending on how well-behaved the encoder is if there are delays in writing the capture file.)
There are many ways to do that. There are FTP programs that will map a remote site to a local drive letter or directory. But FTP is evil, so I'd suggest looking into using SSH. On Linux, this is child's play, but on Windows, you will have to go shopping for programs that will map a remote site to your filesystem.
You might want to look into VLC. It has all sort of streaming options. For example, you could sent your stream to VLC, and it could spit it back out in two (or more) separate streams, record to a file, etc.
To give more detail, the webcasts will be done from remote locations, with a laptop temporarilly hooked up to a local, low-bandwidth internet connection webcast itself -- not enough to support a second stream to a remote file at the same time.
As soon as the webcast is finished, the laptop will be disconnected from the the internet, shut-down & removed. If the webcast itself lasts an hour, transferring the captured file would presumably take 1/2 hr to 1 hr itself, which won't be practical.
I could stream directly to another computer running VLC & a higher bandwidth, but since both my Web hosting provider & streaming provider are external commercial providers, I fear they wouldn't let me run VLC on their servers -- so I would have to send the stream to my own server, then forward it to the streaming server -- an added weak link which I would prefer to avoid.
Now that I think about your ideas some more, it occurs to me I could stream directly to the streaming provider, then on my personal server, set up a streaming capture program, and record it on my server & then transfer it to the web server. That's still suboptimal, because it still depends on my personal server machine & internet connection for the archived webcast, but the original live webcast would still go out if the other connections were up. So that's a workable workaround -- thanks very much for that help.
Still, if anyone knows of a php or other solution where I could capture directly on the web server, that would be great.