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)
|
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
|
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.
|
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...
|
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.
|
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
|
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.
|
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).
|
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.
|
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
|
Mon 16 May 2011 12:26:33 PM UTC, comment #2:
This may also be a duplicate of bug #24481
|
Mon 16 May 2011 08:56:34 AM UTC, comment #1:
See also bug #33294 which seems to be a duplicate of this
|
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'
|