Optimizing Video: 2021 Honda Odyssey RES

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 “beat the crap”-stamp to be applied to the drivers side door.

All phases of matter that matter: solid, liquid, and fur.

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.

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.

Honda’s website details the following about the Rear Entertainment System:

The Feature:
Buyers today have a heightened appreciation and desire for entertainment features in their vehicles.

  • A state-of-the-art, factory-integrated Blu-ray™ Rear Entertainment System is standard on the Odyssey Touring and Elite models.
  • Two sets of wireless headphones are supplied with this system.
  • A 10.2-inch high-resolution WSVGA screen comes on all models.
  • The DVD player conveniently resides near the bottom of the center stack.
  • The system features High-Definition Multimedia Interface (HDMI)21 technology for attaching high-definition players, cameras or other hardware.
  • The 110-volt power outlet eliminates the need for a personally supplied inverter.
  • The system can accommodate audio- and video-streaming media via a smartphone- or mobile-hotspot hookup with the DA’s Wi-Fi®30 feature, or through the HondaLink® Telematics unit.
  • The system can be operated by a remote control.
  • A fun, kid-friendly “How Much Farther?®” app can use plotted-destination data from the onboard navigation system to help youngsters visualize their trip’s progress; four lighthearted themes can be selected.
https://www.hondainfocenter.com/2021/Odyssey/Feature-Guide/Interior-Features/Advanced-Rear-Entertainment-System-RES/

Not initially familiar with WSVGA I had to give it a peek of research and it appears the resolution would be 1024×576, or a 16:9 display aspect ratio.

I did some preliminary tests with random videos of known resolutions and observed the following with the RES:

  • The videos do not stretch to fill the display
  • They automatically letterbox/pillarbox
  • They proportionally reduce their resolution to fill the display

I decided to fill a USB stick with “custom” honda-specific videos for the RES. To help with all this I wrote a script to leverage ffprobe/ffmpeg and bash arithmetic.

The script does a basic aspect detection, and if it’s 16:9 then we just tell ffmpeg to resize the video to the destination resolution. If it’s not then we use a filter to add letterboxing around.

#!/bin/bash
FFPROBE="/usr/bin/ffprobe";
FFMPEG="/usr/bin/ffmpeg";
if [ ! -e "$FFPROBE" -o ! -e "$FFMPEG" ]; then echo "ffprobe or ffmpeg not present"; exit; fi

if [ "$1" == "" ]; then echo "need a filename as a parameter"; exit; fi
if [ ! -e "$1" ]; then echo "$1 doesn't exist"; exit; fi

WIDTH=`$FFPROBE -v 0 -show_format -show_streams -print_format ini "$1" | grep -P '^width=' | cut -d'=' -f2-`;
HEIGHT=`$FFPROBE -v 0 -show_format -show_streams -print_format ini "$1" | grep -P '^height=' | cut -d'=' -f2-`;
echo "Input Resolution: $WIDTH x $HEIGHT";

# Honda display is 1024x576, or 16x9. See if the current works
RESIZE="-s 1024x576";
if [ ! "$(($WIDTH/16))" == "$(($HEIGHT/9))" ]; then
  RESIZE="-vf scale=1024:576:force_original_aspect_ratio=decrease,pad=1024:576:-1:-1:color=black";
fi

# CRF default is 23, sane range 18-28, lower=better
$FFMPEG -i "$1" -c:v libx264 -crf 28 -c:a aac -sn $RESIZE "$1-honda.mp4"

I ran this script across 5 videos, reducing their resolution, add letterboxing when necessary, keeping the original audio quality and suppressing subtitles:

VideoOriginal SizeOriginal ResFinal Size% reduced
Frozen1,755,005,7441920×856459,400,15826.17%
Inside Out1,546,943,3921920×1080503,091,18332.52%
Moana2,900,037,8171920×808931,981,95032.13%
UglyDolls774,008,3231280×688431,901,26655.8%
Wreck-It Ralph682,595,9221280×544491,145,18771.95%
Total7,658,591,1982,817,519,74436.79%
a number-based chart of numbers

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.

Leave a Reply