Skip to main content
Participant
March 3, 2009
Question

H.264 recording in FMIS/FMDS 3.5

  • March 3, 2009
  • 5 replies
  • 1670 views
Hi,

have you succeeded recording H.264 encoded stream with FMIS/FMDS 3.5? We can get the record to start and produce a file but it has only sound, no video. Live streaming works though. I'm wondering whether this has something to do with the codec, although the encoding is done on the same machine with FMLE.

--
nnynas
    This topic has been closed for replies.

    5 replies

    nnynasAuthor
    Participant
    March 20, 2009
    Hi,

    thanks for your responses. We've been able to get it work. Unfortunately, you always have to convert the produced f4v files with the f4vpp tool to get them work in flv players.

    EDIT: just adding that the problem was the missing "mp4:" prefix from the stream name.
    --
    nnynas
    March 17, 2009
    I think you're looking at an old version of the Server-Side ActionScript Language Reference. The Stream.get() entry for FMS 3.5 reads:

    You can publish and record streams in FLV (default) or F4V formats. You determine the format in the name parameter you pass to the Stream.get() method. To publish in FLV format, specify only the stream name, for example, Stream.get("footballGame"). To publish in F4V format, prefix the stream name with mp4:. You can optionally specify the file extension, for example, the following code is all legal:

    Stream.get("mp4:footballGame.f4v")
    Stream.get("mp4:footballGame.mp4")
    Stream.get("mp4:footballGame")

    You can check it out here:
    http://help.adobe.com/en_US/FlashMediaServer/3.5_SS_ASD/WS5b3ccc516d4fbf351e63e3d11a11afc95e-7e42.html#WS5b3ccc516d4fbf351e63e3d11a11afc95e-7f39

    HTH,
    Jody
    March 17, 2009
    Im sorry, but how to understand this information then:
    "You can publish streams only in FLV format; mp3:, mp4:, and id3: are not supported in the stream name for the Stream.get() method." ?
    SSLR.pdf, FMS3.5 docs
    Participating Frequently
    March 13, 2009
    I suspect you are running into same problem that many people run into. So let me guess what you are doing and suugest correction:
    I am assuming you are using FMLE which is not DVR enabled and using your own code for server-side record. In that case you are either doing following:
    1. You publish with stream name "hello" with H.264 format and record using following server-side code:
    application.onPublish = function(myClient,myStream){

    myStream.record();

    }

    OR

    2. You publish with stream name "foo" with H.264 format and record using following server-side code:

    var myServerStream;

    application.onPublish = function(myClient,myStream){

    myServerStream = Stream.get("hello");

    myServerStream.record();
    myServerStream.play(myStream.name);
    }

    In both case you will get an flv file named hello.flv with only sound recorded in it and no video. Cause for this you are by mistake trying to record H.264 data in flv file which is not supported. You can only record H.264 data into f4v or mp4 file.

    So in order to correct your problem you just need to do simple thing :
    Publish with stream name as "mp4:hello.f4v" with format as H.264 data and use below server-side code:
    application.onPublish = function(myClient,myStream){

    myStream.record();

    }

    This wil create hello.f4v file on server which will have both audio and video.

    Alternatively if you can do following also:Publish with stream name as "foo" with format as H.264 data and use below server-side code:
    var myServerStream;

    application.onPublish = function(myClient,myStream){

    myServerStream = Stream.get("mp4:hello.f4v");

    myServerStream.record();
    myServerStream.play(myStream.name);
    }


    Janaki Lakshmikanthan
    Adobe Employee
    Adobe Employee
    March 3, 2009
    Hi nnynas,
    Is your publisher FMLE? If so which version of FMLE are you using?
    What is the audio and video encoding format that you have set while publishing the stream in FMLE to FMS?
    Also how are you recording the stream? What code are you using at the server side application?
    I can help you if you could provide me with the above details.

    Thanks,
    Janaki L