10/9/2009 4:28:45 AM
Title:
FLV files - missing metadata
I use FMS 3.5 to record audio from the microphone. It produce a .flv file in my server.
When i use onMetaData to read the metadata of this file, this is the output:
creationdate Fri Oct 09 16:25:55 2009
createdby FMS 3.5
canSeekToEnd false
audiocodecid 0
videocodecid 0
duration 0
The duration shown here is 0, but actually the duration of this file is 2 sec long.
May I know how come I'm getting this error and how can I resolve it??
Thanks
10/9/2009 5:08:25 AM
FMS keep some kb of File in memory and dump it on hard disk after it exceeds some certain size or when the session is unloaded or FMS restarted .So try unloading the session and see if the file is written.
10/9/2009 5:18:05 AM
If you are using default silence level for Microphone then if your mic is faulty or you are speaking at low pitch there will be no data sent to file . So the file will be empty. You can also set silence level to 0 so that data is added to file whether mic works or it detects silence.
Like this:
var mic:Microphone = Microphone.getMicrophone();
mic.setSilenceLevel(0);
10/9/2009 5:44:31 AM
Burg..
I've added mic.setSilenceLevel(0) already.. but this error still happens..
however, it is not that frequent though..
10/9/2009 6:01:29 AM
Are you recording for just 2 sec only ? For such small time its possible that you stopped publishing before the publish start event occurred which generally takes around 1-2 sec depending upon network condition. Longer files say more than 30 -60 sec should not be empty.
Also verify the hard disk space of on fms is enough to save data. Once I came across this prob also.
Have you checked after unloading session from fms server as Redni said?
10/9/2009 6:14:35 AM
I see.. so the duration cannot be too short so as to prevent this error.
When I record for 10 seconds or more, this error does not occur at all. :D
I've tried Redni's method but the error still occurs.
10/9/2009 8:08:09 AM
You can definitely record short streams also. To do that ensure that you stop the recording stream only after "NetStream.Publish.Start" event has occurred. Say you just published stream the "NetStream.Publish.Start" will be received after some time , now from this event handler you can use setinterval to stop stream after 2 sec like this
setInterval(stopStream,2000);