1 person found this helpful
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/flash/net/NetStream.htm l
Is there a description of the values?
Awesome! Thanks bma!!! Adobe - sorry for my rant
i got "2048" ... what does it mean?
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; outgoingStream.addEventListener(NetStatusEvent.NET_STATUS, outputNetStatusHandler); outgoingStream.addEventListener(NetDataEvent.MEDIA_TYPE_DATA, outputNetDataHandler); outgoingStream.attachCamera(camera); var h264Settings:H264VideoStreamSettings = new H264VideoStreamSettings(); h264Settings.setProfileLevel(H264Profile.BASELINE, H264Level.LEVEL_3_1); outgoingStream.videoStreamSettings = h264Settings; trace("outgoingStream.videoStreamSettings=" + outgoingStream.videoStreamSettings + " " + describeType(outgoingStream.videoStreamSettings)); outgoingStream.publish("test");