Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Recording audio and/or video

I'm unfamiliar with AIR support for recording audio and video, other than the basic "raw" sound sampling that you can do with the flash.media.Sound class.

 

Does anyone know if it will/should be possible on the PlayBook (using AIR) to record audio and have it encoded as MP3, or some other standard, directly?

 

And similarly for video, what codec(s) will be available for recording (as opposed to playback)?  

 

I'm pretty sure the video camera function won't simply record frame-by-frame in some primitive fashion... would it be reasonable to expect it to do MPEG4 or something natively?

 

The general thrust of the question here is what formats we'll have to work with if an app was to allow voice/audio or video snippets, in addition to still images.  This may or may not be answered by reference to general AIR support for such things, if they exist... I'm out of my depth in this area.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Recording audio and/or video

Here is a link for the microphone recording that you test out in AIR.  Sould work in PB once we have a device:

 

http://cookbooks.adobe.com/post_SimpleAudioRecorder___Microphone_Access_API_AIR_2_-16746.html

 

I dont know enough about video streaming to help there.

 

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Recording audio and/or video

Thanks John.  That's just using a third-party (well, Adobe) library for writing in WAV format.  The header comment for WAVWriter.as does suggest it will write compressed, which is a nice plus.  I guess that would be usable for voice, provided playback is supported fully on the PB.

 

I'm hoping for native codecs, available on all PlayBooks and to all apps, for the real formats that people expect, such as MP3 for audio or whatever the popular kids use for video.  If I have an app saving snippets of sound, I'd like the user to be able to do things like attach them to an email and send to anyone without having to worry about conversions, or to play them back in some other app without any concern for compatibility.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Recording audio and/or video

The best bet is to Google away to find "codec, audio, stream, adobe, air" and alike key words to see if something has been done. 

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Recording audio and/or video

Yep, I'm in the middle of all that.  What I really want, however, is PlayBook-specific info... 

 

I'm getting the impression that as MP3 is patented, it's not going to get bundled into every PlayBook.  If nothing else, folks like Adobe may want to preserve their ability to sell expensive media servers which are capable of encoding things like that.  Not that this directly relates to what RIM chooses to do with the PlayBook...

 

I think there will be a WAV library built in, presumably one that can compress smaller than the raw PCM data would be.

 

I'm most curious now about video... what format would the native video be recorded in?

 

MP3 audio is something like 1/10 the size of the uncompressed formats.  With video it's way worse... there's just no way the video camera will record raw frames one at a time as the native format.  (Right?)


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Recording audio and/or video

For audio, there does appear to be an Ogg Vorbis encoder available in AS3, though I can't quite tell yet whether it's "pure" AS3, or somehow includes some native code, or what.  Anyone know if that will work on the PlayBook?

 

I'm pretty sure that at least in an AIR app, Vorbis playback would be supported.  Not sure, nor do I have a clue if it is likely to be available to all apps (e.g. Java and native) as well.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Recording audio and/or video

Looking forward to see your audio app... what ever it might be.