[Libav-user] Fragmented mp4 with audio stream issue

Michael IV explomaster at gmail.com
Sun Dec 10 17:32:10 EET 2017


I am streaming fragmented MP4 into browser video tag via
websocket.On the browser side I use  MSE to accept and process fragments.

Now,as long as I stream only video,without adding AAC audio stream,it works
fine.

But it doesn;t work with audio at all.No video and and the sound playback
gets played only for the first second or two.

I was originally using :

 "empty_moov+frag_custom"  flags and flushed the fragment
to the stream with :

 av_write_frame(mOutputFormatContext, NULL);

Then I also tried

 "empty_moov+frag_keyframe"

But this one also doesn't help. if I write the whole stream not to the
socket,but to
a file,it plays fine both video and audio.So what could be the difference
when using byte stream intead?Is it related still to a sync between audio
and video packets?But if it was
the case,the fragmented mp4 that I write into file would also be screwed

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20171210/0c806c6f/attachment.html>


More information about the Libav-user mailing list