Skip to main content
Known Participant
August 18, 2011
Answered

FMS won't save h.264 video from flash player 11?

  • August 18, 2011
  • 1 reply
  • 3659 views

Hi,

I'm using the fp11 beta to stream h.264 video live between two machines. I'm also recording this live interaction. However, it appears as though FMS does not understand how to save the h.264 video? My set for the netstream looks like:

_netStream = new NetStream(_netConnection);

_netStream.client = customClient;

var h264Settings:H264VideoStreamSettings = new H264VideoStreamSettings();

h264Settings.setProfileLevel(H264Profile.BASELINE, H264Level.LEVEL_2);

_netStream.videoStreamSettings = h264Settings;

The resulting video has an audio stream, but no video stream. Is there some specific profile required for FMS to understand how to store h.264? Or, is this simply a feature that is yet to be implemented?

Thanks,

Ben

    This topic has been closed for replies.
    Correct answer Nikhil_Kalyan

    Hi,


    Thanks for trying FMS and H264 streaming.

    Are you not able to save the file or not able to stream at all ?

    You need to use netstream.record() API to initiate the recording on the server from the client , and alternatively use stream.record() to inititate the recording on the server side.

    H264 is supported on FMS and it can be both streamed and recorded. Use mp4 / f4v file format (giving the prefix and the extension for streaming and recording), to use the H264 content.

    Hope the information helps. Thank you !

    1 reply

    Nikhil_Kalyan
    Nikhil_KalyanCorrect answer
    Participating Frequently
    August 18, 2011

    Hi,


    Thanks for trying FMS and H264 streaming.

    Are you not able to save the file or not able to stream at all ?

    You need to use netstream.record() API to initiate the recording on the server from the client , and alternatively use stream.record() to inititate the recording on the server side.

    H264 is supported on FMS and it can be both streamed and recorded. Use mp4 / f4v file format (giving the prefix and the extension for streaming and recording), to use the H264 content.

    Hope the information helps. Thank you !

    Known Participant
    August 18, 2011

    Thank you for the quick reply!

    I did not think to check the publish or play documentation - indeed, setting publish("mp4:stream.mp4", "record") does the trick!

    Really excited about 264 encoding. Thanks again!

    Known Participant
    August 18, 2011

    Now that I've got that working, another issue I've come across - the way speex is saved in mp4/f4v format using fp11 seems to be very different from the speex that was used previously. Here's the ffmpeg output from a spark-encoded .flv file:

    Metadata:

        duration        : 297

        videocodecid    : 2

        audiocodecid    : 11

        canSeekToEnd    : false

        createdby       : FMS 4.0

        creationdate    : Thu Aug 18 22:13:01 2011

    Duration: 00:04:56.76, start: 0.000000, bitrate: N/A

        Stream #0.0: Video: flv, yuv420p, 320x240, 1k tbr, 1k tbn, 1k tbc

        Stream #0.1: Audio: libspeex, 16000 Hz, 1 channels, s16

    Here's the ffmpeg output from a video created on the same system, but using h.264 and fp11:
    Metadata:
        major_brand     : f4v
        minor_version   : 0
        compatible_brands: isommp42m4v
      Duration: 00:00:53.35, start: 0.000000, bitrate: 53 kb/s
        Stream #0.0(eng): Video: h264, yuv420p, 320x240 [PAR 1:1 DAR 4:3], 23.81 fps, 12 tbr, 1k tbn, 24 tbc
        Stream #0.1(eng): Audio: spex / 0x78657073, 16000 Hz, 1 channels
        Stream #0.2(eng): Data: amf0 / 0x30666D61
    The "Stream #0.1" in the second video looks to be a strange format - 'spex'? Any idea if there is some way I can get this back to the normal libspeex format, or what may have changed about the audio codec between fp10 and fp11?

    Edit - formatting