bugGnash - The GNU Flash player - Bugs: bug #22132, Movieclip with embedded video...

 
 

bug #22132: Movieclip with embedded video plays at the wrong speed.

Submitter:  Benjamin Wolsey <bwy>
Submitted:  Sun 27 Jan 2008 12:13:54 PM UTC
   
 
Category:  None Severity:  3 - Normal
Release:  None Status:  Postponed
Privacy:  Public Assigned to:  strk
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 11 Jul 2008 04:43:22 PM UTC, comment #20: 

Ok, double confirmation now.
As long as embedded sound is playing, FPS of the whole movie,
including loader one, is incremented.
I guess next step would be testing with embedded sound only
and both higher and lower frame rate.
Also, a loader should loade different movies with embedded
sound at different rate, to figure which one should take
precedence.

Not that I like this behaviour...

Sandro Santilli <strk>
Group Member
Thu 10 Jul 2008 02:28:48 AM UTC, comment #19: 


> Made another test with embedded video:


> loadMovieNum('Video-EmbedSquareTest.swf', 2);


> The above compiled at 1FPS under testsuite/misc-ming.all.
> The video runs at 1FPS, which is, dominated by main frame
> rate. Tested with versions from 6 to 8.


I confirmed your tests and all my old tests. All the described behaviour are fine. I think there's no contraddictions. The problem is that we still don't have a general conclusion.

BTW, you cann't reproduce my tests with Video-EmbedSquareTest.swf. The file I used was ffff_v_20080122_cft_diemumie_.swf(see comment #2). I check the tags in both files, maybe it's not the video triggerring the FPS change, it's the audio.




Zou Lunkai <zoulunkai>
Thu 10 Jul 2008 12:05:43 AM UTC, comment #18: 

Made another test with embedded video:

 loadMovieNum('Video-EmbedSquareTest.swf', 2);

The above compiled at 1FPS under testsuite/misc-ming.all.
The video runs at 1FPS, which is, dominated by main frame rate.
Tested with versions from 6 to 8.

So, how to reproduce the '..but the FPS could change at run-time.'
portion of your analisys in comment #10 ?

Sandro Santilli <strk>
Group Member
Wed 09 Jul 2008 11:55:31 PM UTC, comment #17: 


> confirmed(with both the attached file and my own tests). The final FPS is dominated by the main movie.


Isn't this in contraddiction with comment #10 ?
Or is the embedded video stream triggering the change ?

Sandro Santilli <strk>
Group Member
Wed 09 Jul 2008 12:57:18 AM UTC, comment #16: 


> that the total FPS is 1, no matter the loaded movie is at 12.
> Confirmations ?


confirmed(with both the attached file and my own tests). The final FPS is dominated by the main movie.


Zou Lunkai <zoulunkai>
Tue 08 Jul 2008 10:12:53 PM UTC, comment #15: 

Attached files (rot-1.swf and rot-12.swf)
contain a red square rotationg onEnterFrame.
rot-1.swf have FPS=1, square rotates clockwise.
rot-12.swf have FPS=12, square rotates counterclockwise.

rot-1.swf also loads rot-12.swf.

Tests with the proprietary player 9 for linux shows
that the total FPS is 1, no matter the loaded movie is at 12.
Confirmations ?



(file #16035, file #16036)

Sandro Santilli <strk>
Group Member
Tue 08 Jul 2008 09:15:45 AM UTC, comment #14: 

Model draft:

- any loaded and alive resource should register self
- any unloaded resource should unregister self
- on register and unregister events, higher FPS among all resources is computed and signalled to the Gui

Notes:

- FLV (or external media in general) should be tested as of
  whether they also change FPS of the SWF movie or not
- The global register drafted above might be inspected by
  guis to keep all urls in a single place, seems a nice
  feature to have

Sandro Santilli <strk>
Group Member
Mon 07 Jul 2008 07:49:28 AM UTC, comment #13: 


> Is the runtime change only for _level# loads or also for
> loadMovie (loads in child chars) ?


for both, use MovieClip.loadMovie() has the same effect.


Zou Lunkai <zoulunkai>
Sat 05 Jul 2008 01:45:00 AM UTC, comment #12: 

Is the runtime change only for _level# loads or also for loadMovie (loads in child chars) ?

Sandro Santilli <strk>
Group Member
Fri 04 Jul 2008 06:06:14 AM UTC, comment #11: 

More careful testing conclusion: there is only ONE FPS at a give time, but the FPS could change at run-time.

Tests description:

Main swf frame1:
// embeded FPS of main swf file is 0.5
i = 0;
_root.onEnterFrame = function () {
i++;
trace(this + " " + i);
};

Main swf frame 10:
loadMovieNum ("extern-swf-without-videostream.swf", 1);
// embeded FPS of extern-swf-without-videostream.swf file is 2
//
// There is also an onEnterFrame event handler defined inside
// this external swf file.


loadMovieNum ("extern-swf-with-flv-videostream.swf", 2);
// embeded FPS of extern-swf-with-flv-videostream.swf file is 60
//
// There is also an onEnterFrame event handler defined inside
// this external swf file.

Main swf frame 100
unloadMovieNum(1);
unloadMovieNum(2);

Main swf frame 120
stop();

Oberserved behaviour(both AS and visual checks):
(1)From frame1 to 10, runtime FPS for all 3 files are 0.5(dominated by the main swf)
(2)From frame11 to 99, runtime FPS for all 3 files are 60(dominated by the video swf)
(3)From frame100 to 120, runtime FPS for all 3 files are 0.5(dominated by the main swf)



Zou Lunkai <zoulunkai>
Fri 04 Jul 2008 03:38:28 AM UTC, comment #10: 


> I'm sure loaded FLV plays at its own rate,


confirmed. And maybe I'v found more. The whole thing turned out to be less complex than we expected.

eg1.

file1.swf load file2.swf which has flv video streams.

The final FPS is dominated by file2 according to my tests, even AS in file1.swf are executed at the FPS advertised by file2.

eg2.

file1.swf: main swf file, FPS 1;
file2.swf: contains flv stream, FPS 60;
file3.swf: normal swf, no flv stream, FPS 2;

file1.swf loads file2.swf and file3.swf

tested results:

the final FPS of the 3 files is 60,  there is only one FPS at run-time.


Make it simple:)!




Zou Lunkai <zoulunkai>
Tue 01 Jul 2008 01:26:10 AM UTC, comment #9: 

Benjamin mentioned the loaded movie has an embedded (not loaded) FLV... I'm sure loaded FLV plays at its own rate,
tested with our own testcase.

I guess we need to double check with the pp the urls below.

Sandro Santilli <strk>
Group Member
Tue 01 Jul 2008 12:54:41 AM UTC, comment #8: 

If the main movie loads another swf moive(not video), then the frame rate is driven by the main movie.

eg.
main movie, advertised FPS: 1.
loaded swf, advertised FPS: 100.

The final FPS both both movie are 1, determined by the main movie(tested).

But I don't know if it is also true for loading a flv movie, not tested here.


Zou Lunkai <zoulunkai>
Mon 30 Jun 2008 10:22:04 PM UTC, comment #7: 

zou, did you mention to have tested how main movie should drive FPS ?

Sandro Santilli <strk>
Group Member
  Spam posted by anonymous
Mon 28 Jan 2008 08:40:42 AM UTC, comment #5: 

Ok, first of all this is surely NOT for 0.8.2.
To go on we must test mixed FPS (loader/loaded) despite
of video and see if a loaded movie at higher FPS still
runs at higher FPS anyway.

Both if it does or not, the "heart beating" model
should allow doing the right thing.
See http://wiki.gnashdev.org/wiki/index.php/MovieAdvancement

Sandro Santilli <strk>
Group Member
Sun 27 Jan 2008 06:00:34 PM UTC, comment #4: 

Embedded video streams don't advertise the framerate at which they would like to be played. So the decoder has no way to determine the rate at which it should show frames.

So this can be fixed by one of two things:
a) We use a different framerate for the loaded SWF (20fps), so that the video's frame data is retrieved 20 times per second. I guess this is what the PP does.
b) We expose the loaded SWF's framerate to the decoder, give it timer capabilities and let it render one out of three (20/60) times it's called. The downside here is that the video frame will have to be rendered much more frequently, even though nothing has changed. (And this is an expensive operation.)

Bastiaan Jacques <bjacques>
Group Member
Sun 27 Jan 2008 03:44:43 PM UTC, comment #3: 

Should be easy to produce a self-contained testcase for this,
using the code for Video-EmbedSquareTest code...

Sandro Santilli <strk>
Group Member
Sun 27 Jan 2008 01:43:25 PM UTC, comment #2: 
Benjamin Wolsey <bwy>
Group Member
Sun 27 Jan 2008 12:17:48 PM UTC, comment #1: 


Gnash uses the main advancent rate to switch between frames
of embedded video. It seems it should use the nominal frame rate
instead then... The only thing we can rely on would be the
VirtualClock, which is also useful for predicting times..

Sandro Santilli <strk>
Group Member
Sun 27 Jan 2008 12:13:54 PM UTC, original submission:  

This page has a SWF that plays another SWF with embedded FLV:

http://www.rtl.de/ea/tvplaner/content/index_r.php?id=100

The frame rate of the loaded FLV is 20 fps, the main movie is 60fps.

The loaded movie plays at 3 times the proper speed, i.e. that of the main movie. Changing the frame rate of the main movie corrects the problem, changing the rate of the loaded movie makes no difference.

I guess it would be easy to make a testcase for this - it seems as though it would affect more than just video.

Benjamin Wolsey <bwy>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #16035:  rot-1.swf added by strk (303B - application/x-shockwave-flash)
file #16036:  rot-12.swf added by strk (267B - application/x-shockwave-flash)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by zoulunkai (Posted a comment)
  • -email is unavailable- added by strk (he mentioned main movie should drive FPS)
  • -email is unavailable- added by bjacques (Posted a comment)
  • -email is unavailable- added by strk (Posted a comment)
  • -email is unavailable- added by bwy (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-07-08 strk Attached File- Added rot-1.swf, #16035
        Attached File- Added rot-12.swf, #16036
    2008-06-30 strk Carbon-Copy- Added zoulunkai
    2008-01-28 bjacques StatusNone Postponed
        Assigned tobjacques strk
    2008-01-27 strk Assigned toNone bjacques

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code