FW 2.4 Prerelease is out!

This is a prerelease of 2.4.

flashywrappers.com/download/?file=FW24

Why “prerelease”?

The most important reasons are Android, 2 new ANE’s and examples.
The new automatic test example app is not 100% ready yet to make it into the release, though it helped us to reveal many bugs which would otherwise likely slip through. But its still mostly “internal” code, not ready for presentation. Secondly, the amount of new code is so high that we first want to get this package through some test cases(there is enough people interested to try it out), which we assume will reveal issues that our tests didn’t.

Android – thats a different story. This platform is pretty complex, and solving issue once doesn’t mean it won’t return again(apparently). Which is precisely what happened after adding audio – it was working fine at one point, just before release it stopped working. We’ll be fixing this as literally the first thing for the next release, unless something more serious appears in the established platforms. The Android in general might and might not work from device to device as well.

Lots of new code – there is one more new ANE than what was promised. Apart from the new OS X ANE, there’s also a new Windows ANE (completely rewritten), which wasn’t supposed to be a part of 2.4. It uses MediaFoundation(Windows own H.264/AAC encoders) so MP4’s should now be free & fully legal on all platforms for commercial use, except Flash. This is of course great from MP4 support standpoint, but creates increased risk for more new bugs than usual. Warning, this new Windows ANE will work only for Windows 7 & up.

The 2.4 prerelase comes with a new API which is mostly not compatible with the 2.3 API (another risk) – but don’t worry, it is again easier to use. Just take a look at the documentation pdf to find out how to use it. It’s one of the main reasons (apart from the 2 new ANE’s) why even this prerelease took so long. Various things have been automated / simplified / made internal so you don’t have to worry about them.

In general, various issues in 2.3 still were / are coming in so we were fixing 2.3 issues while working on new 2.4 issues. But of course, by only fixing nothing would ever get released. So we just had to say stop and make this release, as often the best response we had when someone asked how to fix some kind of 2.3 issue – “wait for 2.4”. And we don’t want to keep anyone waiting any longer – if only for the sake to test the new API.

Here’s the changelog of the 2.4 PR1 (prerelease 1):


FlashyWrappers 2.4 Prerelease 1 (unofficial)
--------------------------------------------
- All platforms: All the SWF's / SWC's now assume Flash Player 15.0 as minimum target to work 100% correctly, instead of 11.5. With 11.5 it will still work, except grabbing Stage3D using FW's capture method(you can still supply BitmapData captured from Stage3D).
- !! NEW PLATFORM ADDED: Mac - The iOS ANE has been ported to Mac. The FFmpeg based Mac ANE was removed, so OGV videos are no longer supported on Mac. The Mac ANE is powered by AVFoundation so the MP4's produced have no licensing strings attached.
- !! NEW PLATFORM ADDED: Windows - Brand new Windows ANE for encoding mp4's based on MediaFoundation (Windows native library). The FFmpeg based OGV Windows ANE was removed, so OGV videos are no longer supported on Windows. The new ANE works on Windows 7 and up. The MP4's have no licensing strings attached.
- iOS: Rebuilt against iOS SDK 8.3
- Android(HW): Audio encoding & muxing added - you can record audio now, using FWSoundMixer or by sending raw audio packets to the encoder, same as on other platforms. This has negative effect on FPS currently, we'll be working on fixing this in the future releases for Android.
NOTE: In Prerelase 1 this was working on and off(originally it was, now it isn't) with video / webcam. We'll be looking at it for Prerelease 2 - there was no time to fix this properly till the release.
- All platforms: FW is now working in two basic modes - "realtime" and "non-realtime". Couple of important things work differently, so make sure to read the manual to understand when to use which mode (it should be pretty intuitive though - realtime is for webcam, games etc., non-realtime for anything you can post-process or record at low fps).
- All platforms: Important API changes(simplifications and some paradigm changes):
- All platforms: microphone recording is now automatic / internal if AUDIO_MICROPHONE is used! You do not need to supply audio frames from microphone manually anymore. If you do that, erase the code when using 2.4, instead keep using AUDIO_MICROPHONE. If you insist, you can still do this manually in AUDIO_MONO mode. When using microphone, you can ask for microphone permissions sooner with myEncoder.askMicrophonePermission().
- All platforms: in "realtime" mode, the frames are automatically dropped in case your stage fps is greater than the video fps (for example stage fps = 60, video fps = 20, only every 3nd frame is saved). This was only working for iOS before, so *make sure to remove any framedrop code you might have in your app* - otherwise you'll be dropping too many frames.
- All platforms: in "realtime" mode, the audio and video timestamps(pts) are now based on system time. In "non-realtime" mode, they are still based on constant counters. This fixes audio / video syncing as it could cause "drifting" of video and audio tracks. Especially in cases where your app fps was < target video fps(even having slight drops under that) would cause broken sync and other strange effects (video "speeding up" and being shorter than the audio track for example).
- All platforms: Number of extra checks added to avoid crashes, for example FW won't attemp OpenGL on Android / iOS in case you've published your app in CPU renderMode.
- All platforms if captureStage3D was used: fixed a small memory leak in init, where temp bitmap for context3D was not disposed on each init.
- API change: "encodeIt" removed(!) / replaced by "finish".
- API change: "init" renamed to "start".
- API change: FW Captures fullscreen by default now - in case you want to capture fullscreen, you basically call start(), capture() on ENTER_FRAME and finish(), with no arguments on all platforms.
- API change: Start sets width & height based on stage dimensions by default. If you override width & height and try to capture Stage3D or DisplayObject (including the whole stage) larger than the video width & height, FW will try to scale the captured frames down to fit to video.
- API change: The dimensions can be set separately also with myEncoder.setDimensions(w, h) - this improves the code readability avoiding long list of parameters in start.
- API change: As a logical consequence of the above, "frameScale" was removed from init as the scaling is now handled automatically (so if your captured movieclip is larger than the target video dimensions, it is scaled down).
- API change: "XXX_captureFullscreen", "captureMC" and "captureStage3D" are all beign deprecated. They are still working but FW is moving towards a single method called "capture". With no arguments specified, this tries to capture the whole stage(using OpenGL acceleration where possible, recommended on mobile). If DisplayObject is used as parameter, it works like former captureMC, where available. If Context3D is used as parameter, it works like former captureStage3D.
- API change: "audio" was removed from init, it was replaced by audio recording modes. The modes are called FWVideoEncoder.AUDIO_MICROPHONE, FWVideoEncoder.AUDIO_MONO, FWVideoEncoder.AUDIO_STEREO, FWVideoEncoder.AUDIO_OFF.
- API change: "multithreaded" was removed from init and basically replaced by "realtime" argument. This doesn't explicitely set multithreading on or off but tries to optimize FW for recording in realtime(or non-realtime), but you don't care anymore whenever MT is used or not, its up to the library.
- API change: "tryFinish" was removed. You don't need to check anymore on every frame if all threads finished - this is done internally now. Just call "finish" and then wait for "encoded" status event (see manual for updated code example).
- Flash: Compiled with the latest Crossbridge community. Improves performance, for example reduces the total lag at "start" by about 1/3.
- Flash: Fixed a bug with ENTER_FRAME stage listener not being removed (this was added only at extension constructor so at maximum there was 1 extra ENTER_FRAME listener in the app)
- Flash: Fixed a non-fatal bug in Encoder (null error) displaying in trace / Flash log after end of encoding when using multithreading
- Flash: Added worker communication for sending traces / messages out into main thread if needed (for debugging)
- Flash: Moved the thread (Worker) initialization into "start" instead of starting it at ~1 second into the recording. This moved the slight lag connected with thread initialization at better place and doesn't interfere with the recording at around 1 second.
- Flash: Fixed a bug in FFmpeg based FlashyWrappers - when changing the resolution the frames would keep the previous resolution, causing in either green areas and only part of the frame being saved or crashes.

Leave a Reply

Your email address will not be published. Required fields are marked *