7 Replies Latest reply: Feb 15, 2012 4:05 AM by Arvind Mehta RSS

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

    aintnosleeves

      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

        • 1. Re: FMS won't save h.264 video from flash player 11?
          Nikhil Pavan Kalyan Community Member

          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 !

          • 2. Re: FMS won't save h.264 video from flash player 11?
            aintnosleeves Community Member

            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!

            • 3. Re: FMS won't save h.264 video from flash player 11?
              aintnosleeves Community Member

              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

              • 4. Re: FMS won't save h.264 video from flash player 11?
                aintnosleeves Community Member

                I should be clear - this is probably not your issue. Looks like 'spex' is the fourCC code for libspeex. My issues are probably not FMS-related. Thanks!

                • 5. Re: FMS won't save h.264 video from flash player 11?
                  maria_fish Community Member

                  hi,

                    

                    I use FMLE to publish h264 video to FMS , my server side code (main.asc):

                   

                  application.onPublish = function (client, stream)

                  {

                      var streamName = stream.name ;

                      trace("onPublish stream: "+ streamName);

                      stream = Stream.get("mp4:"+ streamName +".f4v");

                      if(stream){

                             stream.record("append");

                             stream.play(streamName);

                      }

                  };

                   

                  I can save the H264 stream on the server,but less than 3 minites,the storage stops,How did this happen? please help me ! thank you !

                   

                  maria

                  • 6. Re: FMS won't save h.264 video from flash player 11?
                    ImAStreamer Community Member

                    I have the same issue I discussed in this thread: http://forums.adobe.com/thread/921502 Make sure you vote for the bug I submitted down toward the bottom of the thread.

                    • 7. Re: FMS won't save h.264 video from flash player 11?
                      Arvind Mehta Community Member

                      Hi,

                           I am creating audio-Video chat application, I'm using the FP11  to stream h.264 video and Speex for audio.

                           I'm also recording for this live stream for future use.  below is the code

                       

                      _netStream = new NetStream(_netConnection);

                            _netStream.client = customClient;

                       

                      var h264Settings:H264VideoStreamSettings = new H264VideoStreamSettings();

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

                      _netStream.videoStreamSettings = h264Settings;

                       

                      _netStream.publish("mp4:record.f4v","record");

                      netStream.addEventListener(NetStatusEvent.NET_STATUS, streamNetStatHandler);

                       

                      It is working fine when publishing and receiving live stream.

                       

                      Issue is that :

                                     file is recorded with f4v format at desired folder and file size also dispalyed, but not played in any media player.

                       

                      Then I converted it into mp4  by using Adobe F4V Post Processor

                      then video is played but audio is totally missing.

                       

                      Plz reply.