Question
Problem with recording a live-stream
Hello Adobe communtiy,
we are developing an online application where our users can send the output of their videocard live into the internet.
The app is based on flash communication server mx 1.5.3 and a user-interface developed with flash.
Some of our our users had asked for a posibilty to record their video streams from our software to watch it later.
To realize this feature we use the internal recording functions of flashcom. While the user is streaming his content he can push a record button in the ui. Then flash-com writes the stream into a flv-file on the server. Is the recording stopped by pressing another button or timeout the user will be asked if he wants to save the record. If he agrees the flash-ui starts a script in the background which catches the flv from our flashcom, encodes it into mpeg, saves it at our webserver and adds a dataset into our database.
So far so good, we could realize all that in a short time.
We still have some problems with the recording feature from flashcom. During the first seconds there are some failures in the video, which becomes apparent in green surfaces at the edges. This failures does not come from the encoding into mpeg, because i can see them directly in the original flv if i play it with the vlc-player.
Further I could observe that the corrupted part of the video depends on the framerate of the stream. As lower the framerate is, as longer is the incorrect section at the beginning of the video. Also a low framerate causes big failures. If i rise the framerate for example to 25fps the failures are nearly disappeared, but we don't want such high framerates for our stream, because in our project mainly the quality of the pictures are important.
On action-script side the recording is done only with the folowing 3 lines of code.
The stream it self is done by minimal modified AVPresence component (FcSono in the following code)
-------8<------------------------------------------------------------------
// Video Output an stream anhängen
client_cam = Camera.get();
_root.FcSono.ns.attachVideo(client_cam);
// Stream speichern
_root.FcSono.ns.publish("UserRecord", "record");
------------------------------------------------------------------>8-------
Has anybody an idea how we can get a perfect recording without these failures at the beginning?
Greetings,
Christopher Reitz, Alcedis GmbH
we are developing an online application where our users can send the output of their videocard live into the internet.
The app is based on flash communication server mx 1.5.3 and a user-interface developed with flash.
Some of our our users had asked for a posibilty to record their video streams from our software to watch it later.
To realize this feature we use the internal recording functions of flashcom. While the user is streaming his content he can push a record button in the ui. Then flash-com writes the stream into a flv-file on the server. Is the recording stopped by pressing another button or timeout the user will be asked if he wants to save the record. If he agrees the flash-ui starts a script in the background which catches the flv from our flashcom, encodes it into mpeg, saves it at our webserver and adds a dataset into our database.
So far so good, we could realize all that in a short time.
We still have some problems with the recording feature from flashcom. During the first seconds there are some failures in the video, which becomes apparent in green surfaces at the edges. This failures does not come from the encoding into mpeg, because i can see them directly in the original flv if i play it with the vlc-player.
Further I could observe that the corrupted part of the video depends on the framerate of the stream. As lower the framerate is, as longer is the incorrect section at the beginning of the video. Also a low framerate causes big failures. If i rise the framerate for example to 25fps the failures are nearly disappeared, but we don't want such high framerates for our stream, because in our project mainly the quality of the pictures are important.
On action-script side the recording is done only with the folowing 3 lines of code.
The stream it self is done by minimal modified AVPresence component (FcSono in the following code)
-------8<------------------------------------------------------------------
// Video Output an stream anhängen
client_cam = Camera.get();
_root.FcSono.ns.attachVideo(client_cam);
// Stream speichern
_root.FcSono.ns.publish("UserRecord", "record");
------------------------------------------------------------------>8-------
Has anybody an idea how we can get a perfect recording without these failures at the beginning?
Greetings,
Christopher Reitz, Alcedis GmbH
