I am working on live device to server streaming in android. I am able to send data in bytes on server but when i play that file during recording on server VLC
There is a tool untrunc which claims to repair unfinished (truncated) mp4, m4v, mov, 3gp video. I haven't tested it myself but it may be worth a try.