taskGnash - The GNU Flash player - Tasks: task #5930, implement DEFINEVIDEOSTREAM (using...

 
 

You are not allowed to post comments on this tracker with your current authentification level.

task #5930: implement DEFINEVIDEOSTREAM (using gstreamer & ffmpeg)

Submitted by:  Vitaly Alexeev <alexeev>
Submitted on:  Fri 29 Sep 2006 11:53:25 AM UTC  
 
Should Start On: Thu 28 Sep 2006 08:00:00 PM UTCShould be Finished on: Thu 28 Dec 2006 09:00:00 PM UTC
Category: NonePriority: 6
Status: DonePrivacy: Public
Percent Complete: 0%Assigned to: None
Open/Closed: ClosedEffort: 0.00

(Jump to the original submission Jump to the original submission)

Mon 14 May 2007 09:59:09 PM UTC, comment #21:

Yes

Tomas Groth <tgc>
Mon 14 May 2007 09:34:05 PM UTC, comment #20:

I guess we can close this, right ?

Sandro Santilli <strk>
Project Member
Mon 30 Oct 2006 09:32:30 AM UTC, comment #19:

Embedded video should have such frame rate as root. Embedded video is not implemented yet. I did not test FLV files. AVI files are played well. But there are problems with synchronization audio & video.

Vitaly Alexeev <alexeev>
Mon 30 Oct 2006 09:18:31 AM UTC, comment #18:

One more: When I set the fps to 0.5 then the video is rendered at a slower frame rate too. Seems like embedded video is rendered near 10 times the nominal frame rate (if that does not exceed the FLV frame rate).

Maybe the player works with some sort of sub-frames and does re-rendering checks 10 times per frame. This would be an approximation. As mouse events immediately force re-rendering checks because of the buttons, this probably affects video playback too.

Of couse these are assumptions but even if the player does not really work like that we could implement it this way in Gnash anyway.

Udo Giacomozzi <udog>
Project Member
Mon 30 Oct 2006 09:12:08 AM UTC, comment #17:

I analyzed this a bit and it's not exactly how I expected it.

First, the docs say that the frame rate of the player window is fixed to the nominal frame rate when using embedded video. However, this does not apply for streaming videos, which do not use frame-based playback:

http://livedocs.macromedia.com/fms/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000077.html

So I made a quick test using a short 30fps video and a external FLV file loaded via HTTP.

This page shows the video in a 30fps SWF:
http://www.nova-sys.net/temp/flv_test/nomimal.html

This page shows the same video in a 1 fps SWF:
http://www.nova-sys.net/temp/flv_test/slow.html

This is interesting. The SWF is rendered at 1 fps like it should be. You can see that in the little animation at the bottom right. The video is rendered at some slower frame rate, but certainly not at 1 fps. I'd say it's 10 fps or somewhere near to it. Further, when you move the mouse over the plugin, then the video is rendered faster (only better rendering, not faster playback), most probably a re-rendering is triggered due to the mouse events.

Udo Giacomozzi <udog>
Project Member
Mon 30 Oct 2006 08:36:28 AM UTC, comment #16:

Is it the video frame being skipped or the animation frame ?
Is there any document stating it ?
I'm aware of documents stating the need to skip animation frames
to keep in sync with audio (ie: execute actions but don't render
the frame).

Sandro Santilli <strk>
Project Member
Mon 30 Oct 2006 08:31:11 AM UTC, comment #15:

Yes. Normally you start with a normal flash movie (where you can freely set a frame rate between 0.01 and 120) and add a FLV player component (which is basically an embedded SWF), regardless of the type of FLV connection (Macromedia Server, HTTP, ...).

For automatic online videos like YouTube I guess the framerate is dynamically adjusted depending on the content.

When the frame rate is not very exact (say 31 fps vs. 30 fps) this results in one doubled or skipped frame every X seconds (in the example ~30 seconds). It's hard to notice that.

Udo Giacomozzi <udog>
Project Member
Mon 30 Oct 2006 08:12:41 AM UTC, comment #14:

Just a tought: this will be up to the flash developer, right ?
I mean, a conscius developer will have the video and animation frame rates match...
How could we force them to match otherwise ? should we implement
a 'nearest' clocktick seek ?

Sandro Santilli <strk>
Project Member
Sun 29 Oct 2006 12:57:04 AM UTC, comment #13:

I was not talking about handling button events but more about rendering issues. I saw complex movies (Macromedia had some car presentations linked on their website when it released Flash 7) that heavily mixed FLV and classic Flash content.
The player will always need to respect the root movie's frame rate which in most cases will be near (or, more probably identical to) the FLV frame rate. Say, that's 30 fps. When you have a FLV that is not exactly 30 fps but very close to it (29 fps or 25 fps...) this results in a final frame rate around 60 fps or so which must be handled by the renderer. This can also happen when both nominal frame rates are identical but are calculated in a different way (different timers).

Most FLV players also have a regularily updated status bar so the invalidated bounds can't help here either.

So, I fear the frame rate feature will really affect playback in a negative way.

BTW, I once saw the complete Blade 2 movie online with a Flash player. The quality was very good, except for the very high video compression. But there was no complain regarding frame rates...

Udo Giacomozzi <udog>
Project Member
Sat 28 Oct 2006 08:07:53 PM UTC, comment #12:

First of all I should express the regret in occasion of failure of new release of gnash. I did not know that you plan it to make. I have deliberately laid out a crude videostream because I can not keep up with your changes (in occasion of the claim of Markus). I also have no sufficient free time for test videostream on Linux.
I recognize that I used public fragments of programs. Is it bad ?
Modern Nvidia videocards provide ~10ms per frame, therefore we can simultaneously start 4 films (4 = 1000ms/10ms*4-> 25 FPS) and with good quality. Simultaneously with it we can also to start easy flash animation. It abruptly. In total it can be reached only using modern hardware. The heaviest operation is a scaling. And I tried to avoid it.

Vitaly Alexeev <alexeev>
Sat 28 Oct 2006 07:01:32 PM UTC, comment #11:

I haven't read through this new code yet, but my general thought is to see how video is most often used. As far as I can tell, often a Flash based video player is limited to a few control buttons, and plays a single FLV movie at a time. So it seems that in this case Gnash should be optimized to make the video play with good quality, and it shouldn't be hard to still handle events froom the control buttons. Especially on an embedded target, once this works with AGG, I doubt any ARM based target could handle more than a single FLV at a time anyway.

Rob Savoye <rsavoye>
Project Administrator
Fri 27 Oct 2006 05:12:50 PM UTC, comment #10:

Rob, are you sure it's a good idea to have asynchroneous video playback? This would pratically result in a summed frame rate that must be handled by the renderer (the nomal frame rate + the frame rate of all videos.

Just think of a 15 fps SWF containing a 14 fps FLV and a 16 fps FLV. In theory this would result in a much higher frame rate if you really want match all of them. Remember there can be any vector shape over the video which means the render handler would have a hard job...

Udo Giacomozzi <udog>
Project Member
Fri 27 Oct 2006 03:28:28 PM UTC, comment #9:

The next my task - synchronization of audio & video streams.

Vitaly Alexeev <alexeev>
Thu 12 Oct 2006 04:57:13 PM UTC, comment #8:

I would actually like to see the video support in Gnash play a video stream or file at higher than the Flash movie framerates. This would let us play "dvd quality" video, unlike any existing Flash player. The way to do this is to fire up a background thread to play the video. Usually with Flash based audio or video players the only Flash being executed is just the player control buttons.

We also want the video support to work with the AGG backend as well as OpenGL. People embedding Gnash want video support too.

Rob Savoye <rsavoye>
Project Administrator
Thu 12 Oct 2006 02:11:51 PM UTC, comment #7:

>>Does anybody know if this is possible with the current model?

no problem

>>but NetStream doesn't exist.

I'm doing the play method of NetStream

avcodec return images in YUV 420 format (one luminance and two chrominance channels, with the chrominance channels samples at half the spatial resolution of the luminance channel).

Does anybody know how to show the image of this format using OpenGL without intermediate converting to RGB and texture creation?

Vitaly Alexeev <alexeev>
Wed 11 Oct 2006 10:13:19 PM UTC, comment #6:

So about the "dynamic" video streams... That means that we need to be able to display the external video at a higher framerate than the SWF who loaded the video...
Does anybody know if this is possible with the current model?

Tomas Groth <tgc>
Wed 11 Oct 2006 03:43:05 PM UTC, comment #5:

NetConnection now works, but NetStream doesn't exist. I've been putzing with these on and off for a while. To make this work, I decided that adding RTMP/RTMPT/RTMPTS support to libCURL was the wasy to do this so all of the existing code in Gnash would "just work". Currently RTMPT works, RTMPTS is mostly done, and RTMP (which needs AMF support as well) is in progress and about 3/4 done. You can grab my snapshot of libCurl with RTMP support from http://www.welcomehome.org/gnash/curl-080206.tar.bz2.

Rob Savoye <rsavoye>
Project Administrator
Wed 11 Oct 2006 02:34:31 PM UTC, comment #4:

Thanks for the offer of the help. Implementation of embedded video has no big importance for me, because: frame rate of embedded video should be same as at root movie, embedded video has no sound.

It is much more interesting to do implementation of "dynamic" video streams, which is started approximately so:

on(release)
{
var my_nc:NetConnection = new NetConnection();
my_nc.connect(null);
var my_ns:NetStream = new NetStream(my_nc);
_root.my_video.attachVideo(my_ns);
_root.my_video1.attachVideo(my_ns);
my_ns.play("my.avi");
}

Vitaly Alexeev <alexeev>
Wed 11 Oct 2006 01:12:55 PM UTC, comment #3:

Ok, let me know if you need any help (not on windows stuff though...). I suggest you have a look at the gplflash2 source which has support for embedded video, which might give an example as to how it can be done.

Tomas Groth <tgc>
Wed 11 Oct 2006 12:00:32 PM UTC, comment #2:

I agree with "Using ffmpeg directly might be an easier solution than using gstreamer... "
I at last have compiled ffmpeg on VC++ and have received necessary DLL's. I understand with ffplay.c to begin programming Flash videostream

Vitaly Alexeev <alexeev>
Mon 09 Oct 2006 01:52:28 PM UTC, comment #1:

Using ffmpeg directly might be an easier solution than using gstreamer...
My suggested solution to this is to make a videohandler (same style as the sound handlers), which will make it more generic...

Tomas Groth <tgc>
Fri 29 Sep 2006 11:53:25 AM UTC, original submission:
Vitaly Alexeev <alexeev>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by tgc (Posted a comment)
  • -unavailable- added by strk (Posted a comment)
  • -unavailable- added by alexeev (Updated the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 14 May 2007 09:59:09 PM UTCtgcStatusReady For Test=>Done
      Open/ClosedOpen=>Closed
    Mon 14 May 2007 09:34:05 PM UTCstrkCarbon-Copy-=>Added tgc
    Fri 01 Dec 2006 10:43:56 AM UTCalexeevAssigned toalexeev=>None
    Fri 27 Oct 2006 03:31:05 PM UTCalexeevStatusNeed Info=>Ready For Test
    Fri 27 Oct 2006 03:28:28 PM UTCalexeevStatusIn Progress=>Need Info
    Mon 02 Oct 2006 07:32:09 AM UTCstrkCarbon-Copy-=>Added strk

    Back to the top


    Powered by Savane 3.1-cleanup