google-code-export / red5

Automatically exported from code.google.com/p/red5
0 stars 0 forks source link

1.0.2 creating multiple flv.ser files #408

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Flex built application records multiple audio/video files
2. Code to record stream (edited for brevity)
nsPublish = new NetStream(nc.getConnection());
nsPublish.attachAudio(mic);
nsPublish.attachCamera(cam);
nsPublish.publish("LS" + hostCallCount,"record");
3. Stop recording (start/stop multiple times in session)
if (nsPublish) {
nsPublish.close();
nsPublish.attachCamera(null);
nsPublish.attachAudio(null); 
}

What is the expected output? What do you see instead?
Expected to see all recorded files as .flv's but half of the recorded .flv's 
are 0 bytes long and have matching flv.ser files.

What version of the product are you using? On what operating system?

Red5 1.0.2 snapshot
Windows Server 2008 
Flex Builder 4.6

Please provide any additional information below.
Same Flex program is used on many other servers with Red5 1.0 Final without the 
issues.

Original issue reported on code.google.com by veloce...@gmail.com on 20 Jun 2013 at 11:34

GoogleCodeExporter commented 9 years ago
A couple suggestions:
1. call "nsPublish.publish(false)" when you are done publishing
2. on NetStream.Unpublish.Success do your close routine
3. always detach the mic / cam before you call close

Original comment by mondain on 25 Aug 2013 at 5:06

GoogleCodeExporter commented 9 years ago
Another mod of your procedure:

if (nsPublish) {
nsPublish.attachCamera(null);
nsPublish.attachAudio(null); 
}

Don't call nsPublish.close() until you get the UnPublish.Success

Original comment by mondain on 3 Sep 2013 at 5:52