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 !
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!
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:
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, s16Here's the ffmpeg output from a video created on the same system, but using h.264 and fp11:Metadata:major_brand : f4vminor_version : 0compatible_brands: isommp42m4vDuration: 00:00:53.35, start: 0.000000, bitrate: 53 kb/sStream #0.0(eng): Video: h264, yuv420p, 320x240 [PAR 1:1 DAR 4:3], 23.81 fps, 12 tbr, 1k tbn, 24 tbcStream #0.1(eng): Audio: spex / 0x78657073, 16000 Hz, 1 channelsStream #0.2(eng): Data: amf0 / 0x30666D61The "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
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!
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");
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 !
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();
_netStream.videoStreamSettings = h264Settings;
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.