I'm running latest AIR runtime on my desktop: 188.8.131.520
My air appliation is compiled with latest air sdk also: 184.108.40.2060
Platform is Windows XP.
The application is aka Cirrus Video Phone Lab app, where streaming is done to another instance of the AIR application.
I do use this code to enable H264 encoding on the outgoing stream:
var h264Settings:H264VideoStreamSettings = new H264VideoStreamSettings();
outgoingStream.videoStreamSettings = h264Settings;
Once my app is running i do check the VideoStreamSettings.codec on both outgoing and incoming streams:
trace("outStream codec: "+outgoingStream.videoStreamSettings.codec+"\n");
trace("inStream codec: "+incomingStream.videoStreamSettings.codec+"\n");
Here is the output:
outStream codec: H264Avc
inStream codec: Sorenson
So it appears that incomingStream is using Sorenson?! How is this possible to encode in H264 and decode using Sorenson and see the video?
Or really it is Sorenson which is used for encoing irrelevant of what videoStreamSettings is set to? How about Adobe's claim they support H264 on the Air web page?
Or am I missing something completely?
I've recompiled my test project to use web application and run it on a standalone flashplayer11_2r202_228_win_sa_debug_32bit.exe
Result is the same: outgoing stream prints H264Avc, while incoming does Sorenson.
So, I'm not really sure what's the deal about Adobe's claim about H264 support in AIR3 and FP 11.2? There are no H264 support in both. Period.
Too bad Adobe, too bad... Sorenson has been since FP6 right? It's year 2012 now. I just want to remind you if you forgot about this.
I undersdtand making creative art on the web page with useless claims (http://www.adobe.com/products/air/features.html) is much easier then making
a product which stands for them, but with bugs like that it's better to keep the mouth shut then claim non-existent "features". Please also explain to us
how are we suppose building that "cutting-edge" application running on "billions" of devices? Anyone?
netStream.videoStreamSettings is a control for the encoder/publishing side. the ActionScript documentation doesn't indicate that it is filled in with any information on a subscribing stream. however, there's a strong implication ("When no camera is attached to your system, null is returned") that it's only defined and used for encoding.
Thanks for shedding a light on that, Michael!
You maybe right here. I actually tested streaming mp4 file from FMS via NetStream and indeed netStream.videoStreamSettings.codec prints Sorenson.
So, seems like this is just set by deafult in all cases for playing streams. But, then if we are suppose to ignore codec property on subscribing stream,
what is best method to verify what codec is used for decoding?
Michael is correct in that NetStream.videoStreamingSettings is a control for the encoder/publishing side. To get the codec property for the incoming stream you would use NetStream.videoCodec.
I'm getting 7 as videoCodec, but I can't find videoCodec as a property or getter in the doc: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fla sh/net/NetStream.html
Is there a description of the values?
On page 72 it shows the available codec id. 7 is avc.
When I try this on a MacBook I observe incomingStream.videoCodec=2048. What does 2048 mean? It's not in the referenced document.
When I try this on iOS and Android, assigning a value to outgoingStream.videoStreamSettings does not work. The value of outgoingStream.videoStreamSettings is null after assignment. When I look at the value of incomingStream.videoCodec on the decoding side I see a value of 2 which I understand to mean Sorenson H.263. So it doesn't look like H264 encoding works on iOS or Android. My code is simple.
|outgoingStream = new NetStream(connection);|
|outgoingStream.client = this;|
|var h264Settings:H264VideoStreamSettings = new H264VideoStreamSettings();|
|outgoingStream.videoStreamSettings = h264Settings;|
|trace("outgoingStream.videoStreamSettings=" + outgoingStream.videoStreamSettings + " " + describeType(outgoingStream.videoStreamSettings));|