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

 
 

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

Submitted by:  Benjamin Wolsey <bwy>
Submitted on:  Sun 27 Jan 2008 12:13:54 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Release: NoneStatus: Postponed
Privacy: PublicAssigned to: Sandro Santilli <strk>
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

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

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>
Project MemberIn charge of this item.
Thu 10 Jul 2008 02:28:48 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.


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 #17:

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>
Project MemberIn charge of this item.
Wed 09 Jul 2008 11:55:31 PM UTC, comment #16:

> 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>
Project MemberIn charge of this item.
Wed 09 Jul 2008 12:57:18 AM UTC, comment #15:

> 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 #14:

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>
Project MemberIn charge of this item.
Tue 08 Jul 2008 09:15:45 AM UTC, comment #13:

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>
Project MemberIn charge of this item.
Mon 07 Jul 2008 07:49:28 AM UTC, comment #12:

> 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 #11:

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

Sandro Santilli <strk>
Project MemberIn charge of this item.
Fri 04 Jul 2008 06:06:14 AM UTC, comment #10:

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 #9:

> 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 #8:

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>
Project MemberIn charge of this item.
Tue 01 Jul 2008 12:54:41 AM UTC, comment #7:

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 #6:

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

Sandro Santilli <strk>
Project MemberIn charge of this item.
 Spam posted by an 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>
Project MemberIn charge of this item.
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>
Project 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>
Project MemberIn charge of this item.
Sun 27 Jan 2008 01:43:25 PM UTC, comment #2:

The loaded movie is:

http://www.rtl.de/ea/tvplaner/centerfield/ffff_v_20080122_cft_diemumie_.swf

It plays fine on its own.

Benjamin Wolsey <bwy>
Project 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>
Project MemberIn charge of this item.
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>
Project Member

 

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

Attach File(s):
   
   
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
  • -unavailable- added by zoulunkai (Posted a comment)
  • -unavailable- added by strk (he mentioned main movie should drive FPS)
  • -unavailable- added by bjacques (Posted a comment)
  • -unavailable- added by strk (Posted a comment)
  • -unavailable- added by bwy (Submitted 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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 08 Jul 2008 10:12:53 PM UTCstrkAttached File-=>Added rot-1.swf, #16035
      Attached File-=>Added rot-12.swf, #16036
    Mon 30 Jun 2008 10:22:04 PM UTCstrkCarbon-Copy-=>Added zoulunkai
    Mon 28 Jan 2008 03:26:36 PM UTCbjacquesStatusNone=>Postponed
      Assigned tobjacques=>strk
    Sun 27 Jan 2008 12:17:48 PM UTCstrkAssigned toNone=>bjacques

    Back to the top


    Powered by Savane 3.1-cleanup