bugGnash - The GNU Flash player - Bugs: bug #33323, Gnash plays sound in Flash7 file...

 
 

bug #33323: Gnash plays sound in Flash7 file un-continually

Submitted by:  Nachanon Vetjasit <nachanon>
Submitted on:  Mon 16 May 2011 08:38:42 AM UTC  
Votes:  50  
 
Category: soundSeverity: 3 - Normal
Release: 0.8.9Status: Confirmed
Privacy: PublicAssigned to: None
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)

Sat 03 Mar 2012 03:16:00 PM UTC, comment #12:

Now I got a different way to pinpoint this.

I looked at the original sound used in making of gears.swf, it virtually has no silence period.
But sound extracted from gears.swf, I found out that it has ~100 ms slience gap at the beginning and ending.

When I compare this extracted sound side-by-side with ones recorded during gnash (0.8.10) playing gears.swf;
it matched, thus gnash is playing a raw sound data (which includes spaces).

So I manually applied SeekSamples and SoundSampleCount on the extracted sound data.
I found that this precisely clips the gap out both on the start and at the end.
This clipped sound played continuously, like Macromedia Flash Player do.

Summed up: I think SeekSamples+SoundSampleCount functionality were needed to play the sound correctly.

Note #1: The attached file (gears-sounds.zip) contains
peak-graph of sounds and comparision in my experiment (sounds.png),
the original sound (gears-original.wav),
extracted sound (gears-extracted.wav),
looped version of extracted sound (gears-extracted.loop.wav),
clipped (applied SeekSamples+SoundSampleCount) version of extracted sound (gears-clipped.wav),
clipped and looped version of extracted sound (gears-clipped.loop.wav) aka. the final result.

Note #2: These experiments were done under sound editor, which allowed me to do them only down to millisecond precision, enough to demonstrate what these parameters do, but it's not sample-by-sample accurate.

(file #25257)

Nachanon Vetjasit <nachanon>
Sat 03 Mar 2012 06:36:28 AM UTC, comment #11:

This's still a problem on Gnash 0.8.10, with the same result.

Gnash: gnash_0.8.10-1~lenny (from getgnash.org APT repository)
System: Debian GNU/Linux 5.0 Lenny, i386

Nachanon Vetjasit <nachanon>
Sun 29 May 2011 04:48:14 AM UTC, comment #10:

I just checked gears.swf's sound embedding in source fla file, it wasn't a "Sync: Stream", but a "Sync: Start".
Sorry for my mistake on the first post.

Nachanon Vetjasit <nachanon>
Wed 18 May 2011 09:14:23 PM UTC, comment #9:

I take the SeekSamples immunity back. I was wrong, SWFMill didn't strip that value. The thing is that swfmill doesn't make it easy to tweak that value, but hacking it at random shows it does make a difference, enough to make the pp also play the gap...

Sandro Santilli <strk>
Project Member
Wed 18 May 2011 07:47:17 PM UTC, comment #8:

Sorry, 5182 is 1/32 and gives you the gap, while 10364 doesn't give you the gap.

Sandro Santilli <strk>
Project Member
Wed 18 May 2011 07:09:24 PM UTC, comment #7:

For the record: 1/16 of it is 2591, doubling it gets the gap back

Sandro Santilli <strk>
Project Member
Wed 18 May 2011 06:54:55 PM UTC, comment #6:

The problem seems to be with the start of decoding data:
decodedDataSize: 165824

Setting _inPoint to 1/16 of that makes the sound come out smooth.

Sandro Santilli <strk>
Project Member
Wed 18 May 2011 05:55:22 PM UTC, comment #5:

I've verified it is not the seekSamples, as it still behaves that way when SeekSamples are removed trough swfmill (and adobe player still makes no pause).

This is a looping sound, and the "gap" is between loops.
There might be an initial or final silence in the samples returned by the decoders, but both gst and ffmpeg behave the same (gst might be using ffmpeg anyway actually).

Sandro Santilli <strk>
Project Member
Tue 17 May 2011 09:36:11 PM UTC, comment #4:

Note that gnash doesnt' support the "Mp3: SeekSamples 1670" part, so if the mp3 starts with 1670 silent samples we could have an explanation for this. Haven't checked more closely yet.

Sandro Santilli <strk>
Project Member
Tue 17 May 2011 09:32:42 PM UTC, comment #3:

This is actually not a streaming sound but an event sound,
here's an extract from the gears.swf dumping using Ming's listswf:

Block type: 45 (SWF_SOUNDSTREAMHEAD2)
Block length: 4

PlaybackSoundRate 22 kHz
PlaybackSoundSize 16 bit
PlaybackSoundType stereo
StreamSoundCompression uncompressed
StreamSoundRate 5.5 kHz
StreamSoundSize 8 bit
StreamSoundType mono
StreamSoundSampleCount 0

Offset: 3615 (0x0e1f)
Block type: 14 (SWF_DEFINESOUND)
Block length: 7705

CharacterID: 13
SoundFormat: MP3
SoundRate: 22 KHz
SoundSize: 16-bit
SoundType: Stereo
SoundSampleCount: 18672
Mp3: SeekSamples 1670

Offset: 11330 (0x2c42)
Block type: 15 (SWF_STARTSOUND)
Block length: 5

SoundId 13
SoundInfo:
SyncStop: No
SyncNoMultiple: Yes
HasEnvelope: No
Loops: 32767

Note that the SWF_SOUNDSTREAMHEAD has no corresponding SWF_SOUNDSTREAMBLOCK

Sandro Santilli <strk>
Project Member
Mon 16 May 2011 12:26:33 PM UTC, comment #2:

This may also be a duplicate of bug #24481

Sandro Santilli <strk>
Project Member
Mon 16 May 2011 08:56:34 AM UTC, comment #1:

See also bug #33294 which seems to be a duplicate of this

Sandro Santilli <strk>
Project Member
Mon 16 May 2011 08:38:42 AM UTC, original submission:

Hello, I'm using gnash 0.8.9-1~lenny from getgnash.org apt repository.
When playing my dummy flash file created from Flash MX 2004 (Flash 7)
background sound that's supposed to repeat continuously,
just plays for 1 sec, stops and restarted, and things repeated again.
Animation plays fine, though.

http://www.mediafire.com/?3a3lxxl7iek3w90
This is a 'correct' result from Macromedia Flash Player 7
(You will notice that sound play all along the animation)

http://www.mediafire.com/?fzzbj9ttt7nz3s8
This is a video result from Gnash
(You will notice that sound play,stop,play,stop,... all along)

http://www.mediafire.com/?qq1r0vkic3y3e3b
This is my dummy flash file (created from Flash MX 2004), also attached here.

System: Debian GNU/Linux 5.0 Lenny on i386

Note: Sound was embedded in timeline as 'stream'

Nachanon Vetjasit <nachanon>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #25257:  gears-sounds.zip added by nachanon (1023kB - application/zip - SeekSamples and SoundSampleCount experiment on gears.swf)
file #23408:  gears.swf added by nachanon (17kB - application/x-shockwave-flash - Dummy test flash file (Flash 7))

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by nachanon (Voted in favor of this item)
  • -unavailable- added by strk (Posted a comment)
  • -unavailable- added by nachanon (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 50 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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 19 Aug 2012 04:23:45 AM UTCnachanonCarbon-Copy-=>Added nachanon
    Sat 03 Mar 2012 03:16:00 PM UTCnachanonAttached File-=>Added gears-sounds.zip, #25257
    Mon 16 May 2011 12:25:42 PM UTCstrkCategoryNone=>sound
      StatusNone=>Confirmed
    Mon 16 May 2011 08:38:42 AM UTCnachanonAttached File-=>Added gears.swf, #23408

    Back to the top


    Powered by Savane 3.1-cleanup