Quantcast
Channel: Media Foundation Development for Windows Desktop forum
Viewing all articles
Browse latest Browse all 1079

Media Foundation and MP4 files with multiple avc1 entries in stsd.

$
0
0

Does media foundation and windows media player support mp4 files with multiple avc1 entries in the stsd box? I am doing a custom muxer, and this is one scenario where a hand written media foundation player and windows media player fails while all others like VLC, QuickTime and ffmpeg work fine.

I have an RTSP stream which disconnects time to time and each time the new stream has a different sps/pps (while the resolution stays the same). So I assumed I should be able to mux such a video stream in a single track using multiple avc1 entries, and grouping the video samples into chunks, where I switch chunk on each sps/pps change to use the next sample descriptor.

I hope that maybe someone from with knowledge of the internals of medai foundation can comment on this. If I try to open this file via IMFSourceResolver::CreateObjectFromURL I get the HRESULT 0xc00d36c4. If I mux the same video stream up to the point where the sps/pps changes it works fine, the bad behaviour seems to be introduced by the swtich.

Moreover, I tried to reverse engineer this scenario and write an MP4 file using media foundation - set the MF_MT_MPEG4_SAMPLE_DESCRIPTION to the stsd box with two avc1 entries and even write only one sample, but the output file is again not played by windows media player, but opens fine in VLC, ffmpeg and QuickTime. 

If it helps in any way I can provide the original video file and any other data.

Any help is appreciated:)


Viewing all articles
Browse latest Browse all 1079

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>