W_Garabrandt
Newcomer
Hello everyone.
I'm working on a project that I think will be very usefull to the community in general. (I will release complete code under GPL if I can ever get it working properly.)
Anyway, here's the project in sum.
I want to make a distributed content delivery system. Yes, that's a very big topic, which is why I don't even know what area of this forum to post it into. But after much big profound brain thingies in my head (just joking. it's a line from Madagascar...), i've decided to post it here since it's ultimate goal is to distribute live content via a network, hence the communications part.
Anyway, moving along.
Here's my theory: Pre-encode Avi (or Mpeg) video, and create a playlist.
Have a server program server this video (like a live stream) to viewers. Have other viewers relay this content to additional viewers to offset the load from the original broadcaster.
Simple concept, difficult to articulate how this will work. Consider this:
Say we have many movies encoded at 256 kbits (for 32 K/Sec throughput).
Say also that we cache 30 seconds of video on the server side, meaning that we create a buffer that will hold 30 seconds worth of video, and as more data is added new, the old "rolls off" the end, like a sliding scale window of available video.
Clients can connect to a server, and the server begins sending that client data from the oldest to the newest. The client buffers up the entire cache that's available, and begins playback from the first data available (that can be decoded). The client then monitors the server while it plays back the buffer. When the server has 10 or so seconds of more video, the client retrieves just the newest data. If a client falls behind (under-run), the client can request up to the previous 20 seconds of that new data (30 second cache, remember?) to resync to it.
Now this model is tried and true with other systems. but it has requirements on the server internet connection. Say the same video (at 256 kbits) is sent to 10 people. That's 2560 kbits of bandwidth! Who has that available? But now imagine for a second if we break this up into 5 second pieces. Suppose 10 people want to watch. Server sends piece 1 to client 1, piece 2 to client 2... and client 1 asks client 2 for piece 2, and so on, until all clients have all data that is needed for proper playback.
I know how to accomplish this feat, it's the common stuff I can't do, like say, oh, playing back video and audio from a buffer...
So does anyone know of some good, rock solid code out there (or ways to build said code) that I can play a buffer back from memory and display it in a window/full screen. Even if this requires me to manually ask VFW via API, any help is appreciated.
By the way, I've already searched google for some help, and so far, all i've gotten is people who want me to pay them lots of $$$. Well, I'm not inclined to build a free, open-source project for the betterment of the world and have to pay for it, especially when I know that it can be build from scratch probably better (because it will target the specific needs of the prog).
I think the audio part can be done with standard playsound calls that make playsound loop a couple second buffer, where I write new data just behind what has been played back, creating a constant "stream" of new audio playing.
Any Ideas anyone, on playing back live video on the fly in VB.Net? Also, I'm half-way decent in C++ as well, so if it's not too complex an example in C++, I may be able to re-write it in VB.Net.
I'm working on a project that I think will be very usefull to the community in general. (I will release complete code under GPL if I can ever get it working properly.)
Anyway, here's the project in sum.
I want to make a distributed content delivery system. Yes, that's a very big topic, which is why I don't even know what area of this forum to post it into. But after much big profound brain thingies in my head (just joking. it's a line from Madagascar...), i've decided to post it here since it's ultimate goal is to distribute live content via a network, hence the communications part.
Anyway, moving along.
Here's my theory: Pre-encode Avi (or Mpeg) video, and create a playlist.
Have a server program server this video (like a live stream) to viewers. Have other viewers relay this content to additional viewers to offset the load from the original broadcaster.
Simple concept, difficult to articulate how this will work. Consider this:
Say we have many movies encoded at 256 kbits (for 32 K/Sec throughput).
Say also that we cache 30 seconds of video on the server side, meaning that we create a buffer that will hold 30 seconds worth of video, and as more data is added new, the old "rolls off" the end, like a sliding scale window of available video.
Clients can connect to a server, and the server begins sending that client data from the oldest to the newest. The client buffers up the entire cache that's available, and begins playback from the first data available (that can be decoded). The client then monitors the server while it plays back the buffer. When the server has 10 or so seconds of more video, the client retrieves just the newest data. If a client falls behind (under-run), the client can request up to the previous 20 seconds of that new data (30 second cache, remember?) to resync to it.
Now this model is tried and true with other systems. but it has requirements on the server internet connection. Say the same video (at 256 kbits) is sent to 10 people. That's 2560 kbits of bandwidth! Who has that available? But now imagine for a second if we break this up into 5 second pieces. Suppose 10 people want to watch. Server sends piece 1 to client 1, piece 2 to client 2... and client 1 asks client 2 for piece 2, and so on, until all clients have all data that is needed for proper playback.
I know how to accomplish this feat, it's the common stuff I can't do, like say, oh, playing back video and audio from a buffer...
So does anyone know of some good, rock solid code out there (or ways to build said code) that I can play a buffer back from memory and display it in a window/full screen. Even if this requires me to manually ask VFW via API, any help is appreciated.
By the way, I've already searched google for some help, and so far, all i've gotten is people who want me to pay them lots of $$$. Well, I'm not inclined to build a free, open-source project for the betterment of the world and have to pay for it, especially when I know that it can be build from scratch probably better (because it will target the specific needs of the prog).
I think the audio part can be done with standard playsound calls that make playsound loop a couple second buffer, where I write new data just behind what has been played back, creating a constant "stream" of new audio playing.
Any Ideas anyone, on playing back live video on the fly in VB.Net? Also, I'm half-way decent in C++ as well, so if it's not too complex an example in C++, I may be able to re-write it in VB.Net.