{"id":352,"date":"2010-05-27T21:13:29","date_gmt":"2010-05-28T05:13:29","guid":{"rendered":"http:\/\/www.outflux.net\/blog\/?p=352"},"modified":"2010-05-27T21:27:14","modified_gmt":"2010-05-28T05:27:14","slug":"too-lazy-to-recompile","status":"publish","type":"post","link":"https:\/\/outflux.net\/blog\/archives\/2010\/05\/27\/too-lazy-to-recompile\/","title":{"rendered":"too lazy to recompile"},"content":{"rendered":"<p>I have a camera that takes .MP4 files.  MythTV&#8217;s Gallery plugin has a static list of extensions it recognizes.  MP4 is <a href=\"http:\/\/www.gossamer-threads.com\/lists\/mythtv\/users\/418393?page=last\">not one of them<\/a>.  I can rename all my files (which is wrong &#8212; they&#8217;re MP4s not something else), or I can <a href=\"http:\/\/cvs.mythtv.org\/trac\/browser\/trunk\/mythplugins\/mythgallery\/mythgallery\/galleryutil.cpp#L70\">edit the source<\/a> and recompile.<\/p>\n<p>Or, since I want to watch them RIGHT NOW, I can binary-edit the shared library and replace something I&#8217;ll not have any of (WMV) with MP4.<\/p>\n<pre class=\"brush:shell\">\r\n# strings -a \/usr\/lib\/mythtv\/plugins\/libmythgallery.so | grep WMV \r\n*.WMV\r\n# sed -i -e 's\/\\.WMV\/.MP4\/' \/usr\/lib\/mythtv\/plugins\/libmythgallery.so\r\n<\/pre>\n<p>Ta-da.  Just need to make sure I don&#8217;t change the size of the binary.  :)<\/p>\n<p>(Oddly, I&#8217;m not too lazy to open <a href=\"http:\/\/cvs.mythtv.org\/trac\/ticket\/8503\">a bug and propose a patch<\/a>.)<\/p>\n<p style='text-align:left'>&copy; 2010, <a href=\"https:\/\/outflux.net\/blog\/\">Kees Cook<\/a>. This work is licensed under a <a rel=\"license\" href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/\">Creative Commons Attribution-ShareAlike 4.0 License<\/a>.<br \/><a rel=\"license\" href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/\"><img decoding=\"async\" alt=\"CC BY-SA 4.0\" style=\"border-width:0\" src=\"https:\/\/i.creativecommons.org\/l\/by-sa\/4.0\/88x31.png\" \/><\/a> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have a camera that takes .MP4 files. MythTV&#8217;s Gallery plugin has a static list of extensions it recognizes. MP4 is not one of them. I can rename all my files (which is wrong &#8212; they&#8217;re MP4s not something else), or I can edit the source and recompile. Or, since I want to watch them [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,18,4,14],"tags":[],"_links":{"self":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts\/352"}],"collection":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/comments?post=352"}],"version-history":[{"count":5,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts\/352\/revisions"}],"predecessor-version":[{"id":356,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts\/352\/revisions\/356"}],"wp:attachment":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/media?parent=352"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/categories?post=352"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/tags?post=352"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}