snowfrogdev
snowfrogdev

Reputation: 6873

How to fix Media Source Extension error: Initialization segment misses expected aac track

I have captured my Tello drone camera footage using the following:

ffmpeg -i udp://0.0.0.0:11111 -c:a copy -c:v copy -probesize 32 -reset_timestamps 1 -movflags frag_keyframe+empty_moov+default_base_moof output.mp4

I am using the MediaSource and SourceBuffer API to play the video in a element in the browser. I have done this successfully with a webm format video, so I know that my transport pipeline is fine.

When looking at the media-internals log in the Chrome browser, I noticed the following error:

Initialization segment misses expected aac track.

How can I fix this and get the video to play?

Upvotes: 1

Views: 989

Answers (1)

user1390208
user1390208

Reputation: 2096

What is your "mimeType" parameter that you are passing to addSourceBuffer method? If this parameter contains audio codec info, then the SourceBuffer will expect an audio track in mp4. Only Chrome does that, other browsers don't care about that parameter. For video-only mp4 segments, you would pass something like: "video/mp4; codecs="avc1.42E01E""

Upvotes: 1

Related Questions