views:

61

answers:

1

I'm using FMLE 3.1 to stream live video encoded with H.264 format with FMS 3 and Flash player 10 + AS 3 to connect to the stream.

When I connect to the stream, just the audio is played. I'm able even to get the metadata information about the video, but I just receive the audio.

I already tried some stuff like

  1. "Flash 10 won't play live stream H.264 after iTunes install" http://forums.adobe.com/thread/505620. I tested it in a complete different environment than mine, but the same result.

  2. I've tried some format to play method, but this is just to play files

    ns.play("mp4:saple.f4v");
    ns.play("mp4:sample");
    
  3. Also read "How do you watch and record a live h.264" at "http://www.flashcomguru.co.uk/forum/forum_posts.asp?TID=4649", but I don't get even to play the stream at first place.

This is the code I'm using

import flash.media.Video;

var video:Video = new Video(720, 480);
var ncVideo = new NetConnection();
this.ncVideo.addEventListener(NetStatusEvent.NET_STATUS,  onNetStatus);
this.ncVideo.connect("rtmp://localhost/livecast", "user");

var customClient:Object = new Object();
customClient.onMetaData = metaDataHandler;

function onNetStatus(e:NetStatusEvent) {
    if (e.info.code == "NetConnection.Connect.Success")
        createNetStream();
}

function createNetStream(){
    var ns = new NetStream(this.ncVideo);
    ns.client = customClient;
    ns.addEventListener(NetStatusE vent.NET_STATUS, onNsStatus);

    ns.play("livestream", -1);
    this.video.attachNetStream(ns) ;
    this.addChild(video);
}

function onNsStatus(e) {
    trace("onNsStatus " + e.info.code);
}

function metaDataHandler(infoObject:Object):void {
    trace(infoObject.width + " - " + infoObject.height);
}

Another detail is that when I record the video to a file for instance "sample.f4v", I put this video in the FMS but when I connect to this stream I receive the "FileStructureInvalid" error message.

I went from changing the extension to .flv "http://www.adobe.com/devnet/flashplayer/articles/hd_video_flash_player_04.html" to the solution to flatten the files "http://www.flashcomguru.com/forum/forum_posts.asp?TID=4006" but this is not the case because I'm using FMS to stream the recorded video.

A: 

SE_0208 answered: "Can you upgrade to 3.0.5 and try your scenario - there were quite a few H.264 bugs were fixed in dot releases - its free update " and that was the solution.

In the release notes there is not something specific related with my context, but maybe that was a group of things.

1628134: Recording H.264 content on the server is not supported in this version.

1656058: The server behavior is not guaranteed when streaming corrupted files, especially those containing H.264/AAC content, and may result in issues ranging from severe performance degradation, excessive memory usage and possibly server process crashes. Please use FLVCheck tool to ensure content integrity before it is deployed.

1630621: Very low frame rate H264 videos may take a long time to start if the buffer is set too short.

Jason Carmona