{"id":1994,"date":"2024-06-05T13:06:44","date_gmt":"2024-06-05T17:06:44","guid":{"rendered":"https:\/\/www.unliterate.net\/?p=1994"},"modified":"2024-06-05T13:06:44","modified_gmt":"2024-06-05T17:06:44","slug":"optimizing-video-2021-honda-odyssey-res","status":"publish","type":"post","link":"https:\/\/www.unliterate.net\/index.php\/2024\/06\/05\/optimizing-video-2021-honda-odyssey-res\/","title":{"rendered":"Optimizing Video: 2021 Honda Odyssey RES"},"content":{"rendered":"\n<p>On April 7, 2024 at about 3am I <em>physically<\/em> beat the poop out of a deer on Interstate 90 crossing into Ohio from Pennsylvania (41.925716, -80.54277). The front bumper being damaged and excrement all along the drivers side of the vehicle does qualify for the &#8220;beat the crap&#8221;-stamp to be applied to the drivers side door.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.unliterate.net\/wp-content\/uploads\/2024\/06\/PXL_20240407_071452211-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/www.unliterate.net\/wp-content\/uploads\/2024\/06\/PXL_20240407_071452211-1024x576.jpg\" alt=\"\" class=\"wp-image-1995\" srcset=\"https:\/\/www.unliterate.net\/wp-content\/uploads\/2024\/06\/PXL_20240407_071452211-1024x576.jpg 1024w, https:\/\/www.unliterate.net\/wp-content\/uploads\/2024\/06\/PXL_20240407_071452211-300x169.jpg 300w, https:\/\/www.unliterate.net\/wp-content\/uploads\/2024\/06\/PXL_20240407_071452211-768x432.jpg 768w, https:\/\/www.unliterate.net\/wp-content\/uploads\/2024\/06\/PXL_20240407_071452211-1536x864.jpg 1536w, https:\/\/www.unliterate.net\/wp-content\/uploads\/2024\/06\/PXL_20240407_071452211-2048x1152.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">All phases of matter that matter: solid, liquid, and fur.<\/figcaption><\/figure>\n\n\n\n<p>Insurance did what insurance does and says that the 2012 is not cost effective to repair so they scrapped the vehicle and wrote a check. With that check the family was able to go place a down payment on a 2021 Honda Odyssey Touring.<\/p>\n\n\n\n<p>One of the biggest improvements from 2012 to the 2021 is that the rear passengers have access to an Entertainment System. I decided one day to figure out what we could do with the USB input.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>Honda&#8217;s website details the following about the <em>Rear Entertainment System<\/em>:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>The Feature:<\/strong><br>Buyers today have a heightened appreciation and desire for entertainment features in their vehicles.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A state-of-the-art, factory-integrated Blu-ray&#x2122; Rear Entertainment System is standard on the Odyssey Touring and Elite models.<\/li>\n\n\n\n<li>Two sets of wireless headphones are supplied with this system.<\/li>\n\n\n\n<li>A 10.2-inch high-resolution WSVGA screen comes on all models.<\/li>\n\n\n\n<li>The DVD player conveniently resides near the bottom of the center stack.<\/li>\n\n\n\n<li>The system features High-Definition Multimedia Interface (HDMI)21 technology for attaching high-definition players, cameras or other hardware.<\/li>\n\n\n\n<li>The 110-volt power outlet eliminates the need for a personally supplied inverter.<\/li>\n\n\n\n<li>The system can accommodate audio- and video-streaming media via a smartphone- or mobile-hotspot hookup with the DA\u2019s Wi-Fi\u00ae30 feature, or through the HondaLink\u00ae Telematics unit.<\/li>\n\n\n\n<li>The system can be operated by a remote control.<\/li>\n\n\n\n<li>A fun, kid-friendly \u201cHow Much Farther?\u00ae\u201d app can use plotted-destination data from the onboard navigation system to help youngsters visualize their trip\u2019s progress; four lighthearted themes can be selected.<\/li>\n<\/ul>\n<cite><a href=\"https:\/\/www.hondainfocenter.com\/2021\/Odyssey\/Feature-Guide\/Interior-Features\/Advanced-Rear-Entertainment-System-RES\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.hondainfocenter.com\/2021\/Odyssey\/Feature-Guide\/Interior-Features\/Advanced-Rear-Entertainment-System-RES\/<\/a><\/cite><\/blockquote>\n\n\n\n<p>Not initially familiar with WSVGA I had to give it a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Display_resolution_standards\" target=\"_blank\" rel=\"noreferrer noopener\">peek of research<\/a> and it appears the resolution would be 1024&#215;576, or a 16:9 display aspect ratio.<\/p>\n\n\n\n<p>I did some preliminary tests with random videos of known resolutions and observed the following with the RES:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The videos do not stretch to fill the display<\/li>\n\n\n\n<li>They automatically letterbox\/pillarbox<\/li>\n\n\n\n<li>They proportionally reduce their resolution to fill the display<\/li>\n<\/ul>\n\n\n\n<p>I decided to fill a USB stick with &#8220;custom&#8221; honda-specific videos for the RES. To help with all this I wrote a script to leverage <a href=\"https:\/\/ffmpeg.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">ffprobe\/ffmpeg<\/a> and <a href=\"https:\/\/mywiki.wooledge.org\/ArithmeticExpression\" target=\"_blank\" rel=\"noreferrer noopener\">bash arithmetic<\/a>.<\/p>\n\n\n\n<p> The script does a basic aspect detection, and if it&#8217;s 16:9 then we just tell ffmpeg to resize the video to the <a href=\"https:\/\/stackoverflow.com\/questions\/8218363\/maintaining-aspect-ratio-with-ffmpeg\" target=\"_blank\" rel=\"noreferrer noopener\">destination resolution<\/a>. If it&#8217;s not then <a href=\"https:\/\/superuser.com\/questions\/547296\/resizing-videos-with-ffmpeg-avconv-to-fit-into-static-sized-player\" target=\"_blank\" rel=\"noreferrer noopener\">we use a filter<\/a> to add letterboxing around.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash\nFFPROBE=\"\/usr\/bin\/ffprobe\";\nFFMPEG=\"\/usr\/bin\/ffmpeg\";\nif &#91; ! -e \"$FFPROBE\" -o ! -e \"$FFMPEG\" ]; then echo \"ffprobe or ffmpeg not present\"; exit; fi\n\nif &#91; \"$1\" == \"\" ]; then echo \"need a filename as a parameter\"; exit; fi\nif &#91; ! -e \"$1\" ]; then echo \"$1 doesn't exist\"; exit; fi\n\nWIDTH=`$FFPROBE -v 0 -show_format -show_streams -print_format ini \"$1\" | grep -P '^width=' | cut -d'=' -f2-`;\nHEIGHT=`$FFPROBE -v 0 -show_format -show_streams -print_format ini \"$1\" | grep -P '^height=' | cut -d'=' -f2-`;\necho \"Input Resolution: $WIDTH x $HEIGHT\";\n\n# Honda display is 1024x576, or 16x9. See if the current works\nRESIZE=\"-s 1024x576\";\nif &#91; ! \"$(($WIDTH\/16))\" == \"$(($HEIGHT\/9))\" ]; then\n  RESIZE=\"-vf scale=1024:576:force_original_aspect_ratio=decrease,pad=1024:576:-1:-1:color=black\";\nfi\n\n# CRF default is 23, sane range 18-28, lower=better\n$FFMPEG -i \"$1\" -c:v libx264 -crf 28 -c:a aac -sn $RESIZE \"$1-honda.mp4\"\n<\/code><\/pre>\n\n\n\n<p>I ran this script across 5 videos, reducing their resolution, add letterboxing when necessary, keeping the original audio quality and suppressing subtitles:<\/p>\n\n\n\n<figure class=\"wp-block-table aligncenter\"><table  class=\" table table-hover\" ><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>Video<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>Original Size<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>Original Res<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>Final Size<\/strong><\/td><td class=\"has-text-align-right\" data-align=\"right\"><strong>% reduced<\/strong><\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/Frozen_(2013_film)\" target=\"_blank\" rel=\"noreferrer noopener\">Frozen<\/a><\/td><td class=\"has-text-align-center\" data-align=\"center\">1,755,005,744<\/td><td class=\"has-text-align-center\" data-align=\"center\">1920&#215;856<\/td><td class=\"has-text-align-center\" data-align=\"center\">459,400,158<\/td><td class=\"has-text-align-right\" data-align=\"right\">26.17%<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/Inside_Out_(2015_film)\" target=\"_blank\" rel=\"noreferrer noopener\">Inside Out<\/a><\/td><td class=\"has-text-align-center\" data-align=\"center\">1,546,943,392<\/td><td class=\"has-text-align-center\" data-align=\"center\">1920&#215;1080<\/td><td class=\"has-text-align-center\" data-align=\"center\">503,091,183<\/td><td class=\"has-text-align-right\" data-align=\"right\">32.52%<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/Moana_(2016_film)\" target=\"_blank\" rel=\"noreferrer noopener\">Moana<\/a><\/td><td class=\"has-text-align-center\" data-align=\"center\">2,900,037,817<\/td><td class=\"has-text-align-center\" data-align=\"center\">1920&#215;808<\/td><td class=\"has-text-align-center\" data-align=\"center\">931,981,950<\/td><td class=\"has-text-align-right\" data-align=\"right\">32.13%<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/UglyDolls\" target=\"_blank\" rel=\"noreferrer noopener\">UglyDolls<\/a><\/td><td class=\"has-text-align-center\" data-align=\"center\">774,008,323<\/td><td class=\"has-text-align-center\" data-align=\"center\">1280&#215;688<\/td><td class=\"has-text-align-center\" data-align=\"center\">431,901,266<\/td><td class=\"has-text-align-right\" data-align=\"right\">55.8%<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/Wreck-It_Ralph\" target=\"_blank\" rel=\"noreferrer noopener\">Wreck-It Ralph<\/a><\/td><td class=\"has-text-align-center\" data-align=\"center\">682,595,922<\/td><td class=\"has-text-align-center\" data-align=\"center\">1280&#215;544<\/td><td class=\"has-text-align-center\" data-align=\"center\">491,145,187<\/td><td class=\"has-text-align-right\" data-align=\"right\">71.95%<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">Total<\/td><td class=\"has-text-align-center\" data-align=\"center\">7,658,591,198<\/td><td class=\"has-text-align-center\" data-align=\"center\">&#8211;<\/td><td class=\"has-text-align-center\" data-align=\"center\">2,817,519,744<\/td><td class=\"has-text-align-right\" data-align=\"right\">36.79%<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\"><em>a number-based chart of numbers<\/em><\/figcaption><\/figure>\n\n\n\n<p>Tl;DR (ironically at the end) Pre-compression of all the movies that I intend to store on a USB drive and keep in the Honda I can get an average of 3x the quantity of movies without sacrificing quality.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On April 7, 2024 at about 3am I physically beat the poop out of a deer on Interstate 90 crossing into Ohio from Pennsylvania (41.925716, -80.54277). The front bumper being damaged and excrement all along the drivers side of the vehicle does qualify for the &#8220;beat the crap&#8221;-stamp to be applied to the drivers side [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,42,43],"tags":[],"class_list":["post-1994","post","type-post","status-publish","format-standard","hentry","category-disney","category-honda","category-odyssey"],"_links":{"self":[{"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/posts\/1994","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/comments?post=1994"}],"version-history":[{"count":8,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/posts\/1994\/revisions"}],"predecessor-version":[{"id":2003,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/posts\/1994\/revisions\/2003"}],"wp:attachment":[{"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/media?parent=1994"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/categories?post=1994"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.unliterate.net\/index.php\/wp-json\/wp\/v2\/tags?post=1994"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}