{"id":1907,"date":"2019-02-12T16:01:13","date_gmt":"2019-02-12T14:01:13","guid":{"rendered":"https:\/\/alax.info\/blog\/?p=1907"},"modified":"2019-02-12T16:02:03","modified_gmt":"2019-02-12T14:02:03","slug":"media-foundation-mp4-media-source-gets-a-bit-too-tired-when-doing-too-much-work","status":"publish","type":"post","link":"https:\/\/alax.info\/blog\/1907","title":{"rendered":"Media Foundation MP4 Media Source gets a bit too tired when doing too much work"},"content":{"rendered":"\n<p>It appears there is a sort of a limitation (read: &#8220;a bug&#8221;) in Media Foundation <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/desktop\/medfound\/mpeg-4-file-source\">MPEG-4 File Source<\/a> implementation when it comes to reading long fragmented MP4 files.  <\/p>\n\n\n\n<p>When respective media source is used to read a file (for which, by the way, it does not offer seeking), the source issues a <code>MF_SOURCE_READERF_ENDOFSTREAM<\/code> before reaching actual end of file. <\/p>\n\n\n\n<p>When some software sees a full hour of video in the file&#8230;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"761\" height=\"600\" src=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2019\/02\/Clipbrd1-761x600.png\" alt=\"\" class=\"wp-image-1908\" srcset=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2019\/02\/Clipbrd1-761x600.png 761w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2019\/02\/Clipbrd1-320x252.png 320w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2019\/02\/Clipbrd1-768x605.png 768w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2019\/02\/Clipbrd1-600x473.png 600w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2019\/02\/Clipbrd1.png 962w\" sizes=\"auto, (max-width: 761px) 100vw, 761px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"501\" height=\"600\" src=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2019\/02\/Clipbrd2-501x600.png\" alt=\"\" class=\"wp-image-1909\" srcset=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2019\/02\/Clipbrd2-501x600.png 501w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2019\/02\/Clipbrd2-267x320.png 267w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2019\/02\/Clipbrd2-600x718.png 600w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2019\/02\/Clipbrd2.png 615w\" sizes=\"auto, (max-width: 501px) 100vw, 501px\" \/><\/figure>\n\n\n\n<p>\u00e2\u20ac\u00a6 Media Foundation primitive, after reading frame <code>00:58:35.1833333<\/code>,  issues &#8220;oh gimme a break&#8221; event and reports end of stream. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>It appears there is a sort of a limitation (read: &#8220;a bug&#8221;) in Media Foundation MPEG-4 File Source implementation when it comes to reading long fragmented MP4 files. When respective media source is used to read a file (for which, by the way, it does not offer seeking), the source issues a MF_SOURCE_READERF_ENDOFSTREAM before reaching&hellip; <\/p>\n<p><a class=\"moretag\" href=\"https:\/\/alax.info\/blog\/1907\">Read the full article<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[63,379,424,470,486],"class_list":["post-1907","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-bug","tag-h-264","tag-media-foundation","tag-mp4","tag-video"],"_links":{"self":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/1907","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/comments?post=1907"}],"version-history":[{"count":0,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/1907\/revisions"}],"wp:attachment":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/media?parent=1907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/categories?post=1907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/tags?post=1907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}