Skip navigation
sdsdfsdwefdcgdgcvedb
Currently Being Moderated

H264 stream is not encoded properly in AIR 3.2

Mar 31, 2012 5:59 PM

Tags: #air #adobe #h264 #codec #useless #air3.2 #claims

Hi all,

 

I'm running latest AIR runtime on my desktop: 3.2.0.2070

My air appliation is compiled with latest air sdk also: 3.2.0.2070

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();

     h264Settings.setProfileLevel(H264Profile.MAIN, H264Level.LEVEL_3_2);

     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?

 

Thanks,

Sd.

 

 

An update:

 

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?

 
Replies
  • Currently Being Moderated
    Apr 1, 2012 4:58 PM   in reply to sdsdfsdwefdcgdgcvedb

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 3, 2012 12:03 PM   in reply to sdsdfsdwefdcgdgcvedb

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 3, 2012 2:09 PM   in reply to sdsdfsdwefdcgdgcvedb

    http://download.macromedia.com/f4v/video_file_format_spec_v10_1.pdf

     

    On page 72 it shows the available codec id.  7 is avc.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 4, 2012 3:19 PM   in reply to bmai209

    stream.videoCodec.toString();

     

    i got "2048" ... what does it mean?

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 19, 2012 10:41 AM   in reply to frankygpointer

    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");
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points