{"id":841,"date":"2009-02-18T00:12:23","date_gmt":"2009-02-17T22:12:23","guid":{"rendered":"https:\/\/alax.info\/blog\/?p=841"},"modified":"2009-02-18T00:15:27","modified_gmt":"2009-02-17T22:15:27","slug":"yet-another-time-about-ffdshow","status":"publish","type":"post","link":"https:\/\/alax.info\/blog\/841","title":{"rendered":"Yet another time about FFDShow"},"content":{"rendered":"<p>While new <a href=\"https:\/\/alax.info\/blog\/ntfslinks\">NTFS Links<\/a> propery page is looking for contained junction points, it shows an animated picture to indicate opertation in progress. The picture is a stock resource and is taken from <em>shell32.dll<\/em> resource type &#8220;AVI&#8221; name 150. It is an <a href=\"http:\/\/en.wikipedia.org\/wiki\/Audio_Video_Interleave\">Audio Video Interleave (AVI)<\/a> file embedded into binary resources as is.<\/p>\n<p><a href=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/02\/17-image011.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-842\" title=\"Alax.Info NTFS Links Junction Points Property Page in Operation\" src=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/02\/17-image011-219x300.png\" alt=\"Alax.Info NTFS Links Junction Points Property Page in Operation\" width=\"219\" height=\"300\" srcset=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/02\/17-image011-219x300.png 219w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/02\/17-image011.png 368w\" sizes=\"auto, (max-width: 219px) 100vw, 219px\" \/><\/a><\/p>\n<p>What is however interesting is that being saved as a file and double-clicked, it appeared to be crashing the player process. What might go wrong with a stock resource, is it <a href=\"http:\/\/sourceforge.net\/projects\/ffdshow\">FFDShow<\/a> again? This was the first guess and yes, it was FFDShow again. This is a &#8220;video only&#8221; file with video encoded with MS-RLE compression, FOURCC &#8216;RLE &#8216;. Microsoft provides a <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms713467(VS.85).aspx\">VCM<\/a> codec for the format through <em>msrle32.dll<\/em>.<\/p>\n<p>However, as already discovered, <a href=\"http:\/\/sourceforge.net\/projects\/ffdshow\">FFDShow<\/a> register itself under extremely high merit and for this reason is preferred as a video decoder and attempts to handle the decompression itself. But it fails, and miserably enough to crash the hosting process.<\/p>\n<p><a href=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/02\/17-image012.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-843\" title=\"FFDShow Crash\" src=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/02\/17-image012-300x179.png\" alt=\"FFDShow Crash\" width=\"300\" height=\"179\" srcset=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/02\/17-image012-300x179.png 300w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/02\/17-image012-1024x613.png 1024w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/02\/17-image012.png 1322w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The registration under unfairly high merit defeats the purpose of DirectShow&#8217;s powerful <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/dd390342(VS.85).aspx\">Intelligent Connect<\/a> approach. &#8220;Why do you need a video decoder? You have <a href=\"http:\/\/sourceforge.net\/projects\/ffdshow\">FFDShow<\/a> Video Decoder, forget about the others. Oops, sorry, I don&#8217;t like your file.&#8221;<\/p>\n<p>Is there any way to stop the villain? Of course, there is.<\/p>\n<p><!--more-->To start, I tried to disable the decoder through <a href=\"http:\/\/sourceforge.net\/projects\/ffdshow\">FFDShow<\/a> Video Decoder native interface and give it a last chance. Video decoder offers decoding properties to choose from, and it looked as if it can stop serving as decoder for the mentioned video format.<\/p>\n<p><a href=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/02\/17-image013.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-844\" title=\"FFDShow Video Decoder Properties\" src=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/02\/17-image013-300x251.png\" alt=\"FFDShow Video Decoder Properties\" width=\"300\" height=\"251\" srcset=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/02\/17-image013-300x251.png 300w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/02\/17-image013.png 558w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Still with the disabled settings, it kept unsuccessful attempts to decode and process crashes. So another workaround, and it is in fact a proper one, which should be done from the start (and I would also prefer that it was done by FFDShow itself), is to lower decoder&#8217;s merit to a level at which it would honor specialized decoders so that <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/dd390342(VS.85).aspx\">Intelligent Connect<\/a> could fall back to <a href=\"http:\/\/sourceforge.net\/projects\/ffdshow\">FFDShow<\/a> in case there is no bettter alternative. <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/dd388793(VS.85).aspx\">MERIT_UNLIKELY<\/a> seems to be a good one for this codec:<\/p>\n<p><a href=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/02\/17-image014.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-845\" title=\"Updated FFDShow Video Decoder Merit\" src=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/02\/17-image014-300x188.png\" alt=\"Updated FFDShow Video Decoder Merit\" width=\"300\" height=\"188\" srcset=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/02\/17-image014-300x188.png 300w, https:\/\/alax.info\/blog\/wp-content\/uploads\/2009\/02\/17-image014.png 857w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>This fixes the issue by letting <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/dd375454(VS.85).aspx\">DirectShow<\/a> choose stock video decoder for MS RLE video encoding.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While new NTFS Links propery page is looking for contained junction points, it shows an animated picture to indicate opertation in progress. The picture is a stock resource and is taken from shell32.dll resource type &#8220;AVI&#8221; name 150. It is an Audio Video Interleave (AVI) file embedded into binary resources as is. What is however&hellip; <\/p>\n<p><a class=\"moretag\" href=\"https:\/\/alax.info\/blog\/841\">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":[12,10],"tags":[97,98,79,166,187,168,486],"class_list":["post-841","post","type-post","status-publish","format-standard","hentry","category-technology","category-video","tag-avi","tag-confuse","tag-ffdshow","tag-resource","tag-rle","tag-shell","tag-video"],"_links":{"self":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/841","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=841"}],"version-history":[{"count":0,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/841\/revisions"}],"wp:attachment":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/media?parent=841"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/categories?post=841"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/tags?post=841"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}