How to add a MOOV atom in a mp4 video file

前端 未结 8 1561
礼貌的吻别
礼貌的吻别 2020-12-24 06:04

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

8条回答
  •  忘掉有多难
    2020-12-24 06:40

    You got a problem. The 'moov' box is a kind of table of contents. If not all content is there you can't have a complete table of contents. Ouch!

    If you want to stick with MP4 and if you are writing the file by yourself you could write the file as so called fragmented MP4 file. A fragmented MP4 file contains multiple self-contained small pieces of the video - each with its own table of contents. It would enable you to play the file before the complete recording has finished.

    If you don't need to stick with MP4 an option would be to write the raw h264 stream to the server. Then you don't have that kind of table of content. VLC can play raw h264 streams.

提交回复
热议问题