Skip to main content
Participant
July 13, 2010
Question

live streaming h.264 not showing video

  • July 13, 2010
  • 1 reply
  • 1210 views

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" 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_f  lash_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.

    This topic has been closed for replies.

    1 reply

    pwillener
    Legend
    July 14, 2010
    Please note that this  forum category is for help with the Flash Player and  NOT for users seeking assistance with  programming Flash and/or Flex. If you are seeking assistance with programming,   click here and choose the  proper category to post in.
    Participant
    July 14, 2010

    This is the link to the question in the correct category, just in case someone is having the same issue.

    http://forums.adobe.com/thread/679626