Question: It is possible to implement a feature that allows users to watch videos as they are uploaded to server by others. Is html 5 suitable for this task? But flash? Are there any read to go solutions, don't want to reinvent the wheel. The application will be hosted on a dedicated server.

Thanks.

Answer: 
Of course it is possible, the data is there isnt it?

However it will be very hard to implement.

Also I am not so into python and I am not aware of a library or service suiting your requirements, but I can cover the basics of video streaming.

I assume you are talking about video files that are uploaded and not streams. Because, for that, there are obviously thousands of solutions out there...

In the most simple case the video being uploaded is already ready to be served to your clients and has a so called "faststart atom". They are container format specific and there are sometimes a bunch of them. The most common is the moov-atom. It contains a lot of data and is very complex, however in our use case, in a nutshell, it holds the data that enables the client to begin playing the video right away using the data available from the beginning.

You need that if you have progressive download videos (youtube...), meaning where a file is served from a Webserver. You obviously have not downloaded the full file and the player already can start playing.

If the fastastart atom was not present, that would not be possible.
Sometimes it is, but the player for example cannot display a progress bar, because it doesnt know how long the file is.

Having that covered the file could be uploaded. You will need an upload solution that writes the data directly to a buffer or a file. (file will be easier...).

This is almost always the case, for example PHP creates a file in the tmp\_dir. You can also specify it if you want to find the video while its being uploaded.

Well, now you can start reading that file byte by byte and print that data to a connection to another client. Just be sure not to go ahead of what has already been recieved and written. You would probaby initiate your upload with a metadata set in memory that holds the current recieved byte position and location of the file.

Anyone who requests the file after the uploaded has started can just recieve the entire file, or if the upload is not yet finished, get it from your application.

You will have to throttle the data delivery or pause it when the data becomes short. This will appear to the client almost as a "slow connection". However you will have to echo some data from time to time to prevent the connection from closing. But if your upload doesnt stall, and why shoud it?, that shouldnt be a problem.

Now if you want to have someting like on the fly transcoding of various input formats into your desired output format, things get interesting.

AFAIK ffmpeg has neat apis which lets you directly deal with datasterams.

Also handbrake is a very good tool, however you would need to take the long road using external executeables.

I am not really aware of your requirements, however if your clients are already tuned in, for example on a red 5 streaming server, feeding data into a stream should also work fine.
Yes, take a look at Qik, <http://qik.com/>

"Instant Video Sharing ... Videos can be viewed live (right as they are being recorded) or anytime later."

Qik provides developer APIs, including ones like these:

* qik.stream.subscribe\_public\_recent -- Subscribe to the videos (live and recorded)
* qik.user.following -- Provides the list of people the user is following
* qik.stream.public\_info -- Get public information for a specific video