rainbowcreatures / FlashyWrappers

AIR / Flash video recording SDK
17 stars 10 forks source link

Audio input selection #41

Closed ROBERT-MCDOWELL closed 6 years ago

ROBERT-MCDOWELL commented 6 years ago

Hi Pavel, is there any option to select audio input? also:

rainbowcreatures commented 6 years ago

Hey Robert, thats good to know Flash still works :) Quite surprising it can do anything on core2 duo-

As for selecting audio input, I think these sort of things need to be done on the Flash side. The important part is to get to the raw audio frames(if you can) - then you would need to send them "manually" to FW with addAudioFrame using ByteArrays with PCM (http://flashywrappers.com/asdoc/com/rainbowcreatures/FWVideoEncoder.html) - also be careful to set the correct endian for that ByteArray (not the default one).

FW itself doesn't really capture anything more than Flash allows.

As for codec, for Flash you can select between ogv and mp4 by loading a different swc, both of them are provided. In theory FW could be built with any codec that ffmpeg supports (I've done that in the past), but that needs building from source and there might be other issues / changes in code needed. 95% of people need mp4's anyway, so I dropped that route.

You can set samplerate in start, though I recommend keeping it at the defaults:

start(fps:int = 20, _recordAudio:String = audioOff, _realtime:Boolean = true, w:Number = 0, h:Number = 0, bitrate:int = 1000000, **audio_sample_rate**:int = 44100, audio_bit_rate:int, keyframe_freq:Number = 0, frameOffset:Point = null):void
ROBERT-MCDOWELL commented 6 years ago

Great to know the options on start(); concerning the codecs I was talking about audio codecs but as it's captured as raw so it's irrelevant. Have another question but better to open another thread

rainbowcreatures commented 6 years ago

Right, the audio codecs are locked, only way to change is to rebuild FW from source (thats for Flash, for other platforms those are not based on ffmpeg so I"m not supporting that at all).