Archived flashes:
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2035 · P4070

<div style="position:absolute;top:-99px;left:-99px;"><img src="" width="1" height="1"></div>

Required text body length: 2 characters. Maximum: 15000 characters.
A file is optional.

Age: 34.22d   Health: 100%   Posters: 2   Posts: 8   Replies: 6   Files: 0

>>Anonymous  18jul2017(tu)18:02  No.51418  OP  P1

I'm not really sure where this thread should go since /how/ is frozen.

So for the flash ng.swf, when it's decomplied there's a 10mb mp3 that plays at 320kbps. How does one accomplish this kind of compression? It has to be compressed to smaller than 5mb to leave room for all of that animation and or actionscript.

Speaking of getting small audio sizes, what sort of space savings are possible if someone uses a tracker to play the music, such as something they made in PulseBoy.swf and try to use in an animation?

>>Anonymous  18jul2017(tu)19:48  No.51420  A  P2R1
Most likely the decompiler is unable to extract the audio in its original state and simply converts it to a mp3 with as the high quality as possible (swf supports more audio formats than mp3).

I tried myself with Sothink SWF Decompiler 7.1 and it could extract it to a 22.0 kHz mono wav at 9.57 MiB. If you zip or gzip the wav (using Deflate at Normal) you get a good idea how much space the file would take inside a compressed swf container, then the wav became 9.3 MiB in size for me. It means the extracted wav (or the mp3 that you got) could not have been how the audio was stored in the swf, because swf doesn't have better compression than Deflate @ Normal.

Well, there is a new compression added to a later version of swf but swfchan doesn't support it right now and since the flash you linked to is on swfchan the old compression is used in the swf. swfchan vill get support for the "newer" compression in time, luckily almost nobody uses it so few swfs are affected.

Just for fun I tried compressing the wav audio file in a couple more formats (at their highest settings):
.rar (classic) = 8.10 MiB
.rar (newer rar5) = 6.75 MiB
.7z (LZMA) = 3.5 MiB

Would have been great if swf used LZMA compression instead of simple Deflate right from the beginning, the algorithm wasn't really finished then however and perhaps added too much decompression overhead for computers at the time.

In fact that "new compression" later added to swf (introduced in 2012 with Flash Professional CS6) is LZMA. It's however not at all at the same level as 7-Zip's compression using LZMA:

I tried sticking the wav into a swf and set the audio export settings to Raw 22kHz mono (raw audio in flash is PCM, which is the same format used by the wav container) and with the old Deflate compression the swf became 9.29 MiB (notice it's pretty much the same as the 9.3 MiB zip) while with the new LZMA compression the swf became 8.38 MiB. With only 0.91 MiB gained in this case it's no wonder LZMA swfs never really caught on since you don't gain that much but will break compatibility with ~10 years of tools and upload sites developed for flash.

Anyway, you can't really accomplish the level of compression that you seek with flash. Unless of course you write some really nice ActionScript 3 decompressor that basically does what 7-Zip does and you store the externally-created LZMA bytes inside the code (the flash you linked to just uses the plain audio stuff that flash provides by default).

>>Anonymous  18jul2017(tu)20:28  No.51421  OP  P3R2
Oh I didn't know that's how decompressors did it for audio.

Trackers, midi, dob players or other similar music players with action script are probably the best way to get sound that would be otherwise costlier in filesize from an mp3 file. As an example there's FlodDemo1.swf, which is about 400kb and has 3 songs which together would be a couple of megabytes in an mp3 or even wav format; the 400kb also includes a visualizer and other stuff which are not necessary to play said songs.

I wonder if there's any text-to-speech program done in flash. While I was bored at my job I've daydreamed a few times of turning a movie into a vector animation; however stuff like sound and voices would rack the filesize up astronomically.

My daydreamed idea so far, which probably won't ever get accomplished, is to:
>Find some way to get the voice to a low size
Text-to-speech will have to work for the voices, hopefully there's a good enough one for flash or maybe I can make one myself after seeing some examples already in use.
>Find a way for music to be at low size
The music could be done with a tracker player. The only problem with that approach is to decide on an acceptable tracker that's in flash. Not to mention finding either a converter or simply manually turning the song into a tracker that the player accepts.
>Find a way to play sound at low sizes
It's a possibility to use whatever tracker decided on. Perhaps there's an independent "sound player" as well.

For people who don't know what I mean by trackers, I'm talking about stuff that plays sound from a file format that's specific to certain music. For example there's the .nsf which stands for Nintendo Sound Format which stores music/sound that appeared on NES games. They're typically very small from around 20-4 kb per song.

Anyway that' s a daydream which probably will never happen.

>>Anonymous  18jul2017(tu)21:45  No.51425  A  P4R3
Oh man, I can only just begin to imagine how many hours that would take to get done if you're talking about converting a full feature-film into vectors. And that's just for the visuals alone, if you're also not only converting music and sfx into tracker formats but also writing the trackers yourself we're probably talking thousands of hours here (which includes the time it takes to learn how the formats work and how to implement all this stuff).

Especially if you intend to port a standalone text-to-speech solution into the flash as well, something that'll sound pretty bad probably because even the most expensive commercial versions still doesn't sound quite perfect and they use artificial neural network AI that slowly teaches itself how to mimick all our variations in voice. Standalone text-to-speech is actually pretty rare, most programs and games just use APIs that either connect to a server somewhere for the actual audio to be generated or they use what the operating system provides for handicap purposes.

Still, if you decide to make it I would save the shit out of that swf. :D

>>Anonymous  19jul2017(we)07:43  No.51473  OP  P5R4
That's a huge part of the reason it's a daydream and I'll have to wait a few years when I get my own place before I can even begin to practice flash animation on a regular basis, although I do currently live next to a university that have flash cs6 on their lab computers.

The trackers would be a lot of time to implement; however I plan on doing computer science as a career so it might be worth the time to learn how to create custom filetypes that are efficient. Even more work I thought up was an mp3 to tracker converter. Not one that was super accurate, but simply a tool to do the easy legwork.

Text-to-speech is something I haven't honestly looked into at much detail. I was thinking of taking something that works like MS Sam, making it an instrument that can be distorted to make up for stuff like inflections and tone and using an extended alphabet, such as the dictionary symbols ( pronunciation/) to allow any sound to be pronounced correctly. Probably not the best way to go about speech synthesis.

>>Anonymous  19jul2017(we)18:08  No.51491  OP  P6
Speaking of neural networks I was thinking about them regularly after seeing one in action at and some other examples during light research. There was one done with the text of Shakespeare and some others that try to do piano notes to make songs. I was consider downloading a large amount of nonvideo rip flashes and have a neural net attempt to create a flash character by character.
>>Anonymous  20jul2017(th)01:51  No.51505  A  P7R5
Maybe I shouldn't be saying it since I run a flash site but if you're young and are thinking about learning flash for a career I'd advise against it. For a hobby it's very fun but I'm not sure if there are many flash jobs out there these days, probably less in a couple of years. Not even Adobe seems to be interested in flash and they own it. These are the twilight years for the browser swf plugin used by the masses, soon we will be stepping into scene territory (in the same way people still make Amiga programs we will still be making swf files).

Of course you can always code stuff in ActionScript 3 for Adobe Air, it's basically flash but as standalone programs (has the vector graphics of flash too). Can be exported as phone apps. There's still a future in that, again not certain about the jobs though. However if you learn ActionScript 3 you'll almost learn both Java and C# at the same time and there definitely a lot of jobs in those two areas.

There's an open source text-to-speech implementation in Java called "MaryTTS" (online demo over here: that is good, probably the best free TTS around. Definitely better than Microsoft Sam, check out "dfki-spike-hsmm en_GB male hmm" for example. If I were ever going to need standalone TTS in flash I'd port MaryTTS to ActionScript 3, the base voice files are around 1.03 MiB for spike-hsmm when zipped. Would still be quite a project though.

>>Anonymous  20jul2017(th)07:02  No.51518  OP  P8R6
I am planning on doing flash as a hobby. I hope to get into a little more depth with it since my career is hopefully some form of computer science/programming.
Created: 18/7 -2017 18:02:29 Last modified: 21/8 -2017 23:18:11 Server time: 21/08 -2017 23:44:22