Record flv broken red5

I am using red5 server 1.0.6

Some of my recorded files are broken, I read in some articles that if the stream is closed before the bufferLength stream is greater than 0 , the recorded file will be broken. This is my code for saving and closing a stream.

 @Override public void streamPublishStart(IBroadcastStream stream) { try { /* My script to save started stream details in database */ stream.saveAs("audio/"+username, true); } catch (Exception e) { e.printStackTrace(); } } @Override public void streamBroadcastClose(IBroadcastStream stream) { /* My script to save closed stream details in database */ stream.close(); } 

Is the reason stream.close() causing a write violation? What happens if I do not close the stream?

+6
source share

All Articles