Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 23, 2012, 09:33:16 AM

Pages: [1]   Go Down
  Print  
Author Topic: MJPEG rebroadcast with only one connection to the source  (Read 1163 times)
edlins
Newbie
*
Offline Offline

Posts: 3


« on: September 27, 2011, 09:27:22 AM »

Hi all,

I'm trying to rebroadcast an MJPEG on my shared linux host such that any number of web users can connect to the LP host and receive an MJPEG stream, while the host maintains only one connection to the original MJPEG source.

I currently have a PHP script that pulls the MJPEG stream from the source and pushes it to a user's web browser.  Each web user spawns a separate PHP session that initiates its own connection (via PHP cURL) to the original source.  This actually works very well, but the problem is that the original source's network connection is low bandwidth and more than one user really bogs it down.  This connection cannot be upgraded.  Sad  I also have a javascript page that pulls JPG stills (again via PHP cURL) one at a time from the source, but that only gives me one image every 10 seconds whereas the connected MJPEG stream gives me about 1 frame per second (10 times faster).

What I'd like is a lightweight rebroadcast server that utilizes one permanent "service" connection to the MJPEG source and reproduces the MJPEG stream for any number web users.  Since I'm on a shared account, I'd rather not consume CPU transcoding the stream, so MJPEG output is fine.  Each web user would connect to the shared host only, and that would _not_ create a new connection to the source but the server would utilize a _single_ connection to the source to serve all web users.  I don't know of a way to do this simply (one page of code or less) in home-brew PHP.

I know there are various media servers that can do this, such as VLC as discussed here:
http://stream.deus-exmachina.net/axis-vlc-mms-HOWTO.html
However, it appears that VLC is not installed on my host (Nott).

So, does anyone have any ideas on how to do this?  Should I request VLC for Nott or pursue another option?

Thanks in advance,
-scott
Logged
AndrewBucklin
Newbie
*
Offline Offline

Posts: 1


« Reply #1 on: November 04, 2011, 07:19:04 PM »

I am looking to do the same.  I have a solution almost worked out, but I'm interested in seeing if you found a solution?
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: