1. Attachments are working again! Check out this thread for more details and to report any other bugs.

USB Media Specifications

Discussion in 'Gen 4 Prius Audio and Electronics' started by Justice Guyoono, Jan 15, 2023.

  1. Justice Guyoono

    Justice Guyoono Junior Member

    Joined:
    Jan 15, 2023
    3
    2
    5
    Location:
    USA
    Vehicle:
    2022 Prius
    Model:
    XLE AWD-e
    I have seen a lot of incorrect and incomplete information posted on this forum about getting media on a USB drive to play on the Gen 4's stereo system. As a disclaimer I have a 2022 XLE so my system might be different than yours (no CD player, yes Sirius XM).

    The manual for the infotainment system is available on the techinfo site for free. You can find it by going to the TIS site, clicking on "manuals", and dialing in your Prius.

    Starting with the USB media itself, it needs an MSDOS partition table and a partition that is formatted FAT32. This means that the largest size of a file that you can put on it is 4GB, and the largest drive that you can plug in is 2TB. If you need to carry more than 2TB of infotainment with you then you should get a second disk.

    For audio, the following formats are supported:

    • MP3
    • WMA
    • AAC
    • WAV
    • FLAC
    • ALAC
    • OGG Vorbis
    You can only have up to 2 audio channels. Nothing can be surround, no 5.1. The exact manual for my stereo (OM47F14U) contains this info on page 95 (embedded page number, not page number of the PDF). Some formats only support stereo. Some formats support stereo and mono. Just use stereo.

    I have seen some people on this site saying that the unit does not support FLAC, but that is not accurate. It plays my FLAC files without complaint.

    Video is slightly more complicated. According to the manual, the supported formatting for videos is:

    • MP4 container
      • Video codec H264 or MPEG4
      • Audio codec AAC or MP3
    • AVI container
      • Video codec H264, MPEG4, WMV9
      • Audio codec AAC, MP3, or WMA9.2
    • WMV container
      • Video codec WMV9
      • Audio codec WMA9.2
    The maximum resolution for all video formats is 1920x1080. The maximum framerate for all video formats is 60i/30p.

    There are many options and many ways to mess this up. I decided to focus on MP4 containers with H264 video and either AAC or MP3 audio for my video content, since that is what a large chunk of my library is already in. During my troubleshooting, I found some issues that will hopefully save someone else from pitfalls.

    Some videos were not displayed at all on the infotainment selection screen. This is because they used the h264 (High 10) encoding profile. The Prius does not support this encoding. It only supports up to h264 (High). If you are using Linux then this is shown on the line that displays the encoding for the video stream in the file. If you need to re-encode an otherwise fine file to the high profile, you can do it with this ffmpeg command:

    ffmpeg -i input_file.mp4 -c:v h264 -profile:v high -pix_fmt yuv420p -c:a copy output_file.mp4
    Setting the pixel format was important for me, since the High 10 profile meant that a different pixel format was being used and ffmpeg refused to re-encode the video without also changing the pixel format. The default profile when re-encoding to h264 is already High so it is doubtful that you will run into this unless something forces ffmpeg's hand.


    Some videos displayed on the system screen but when selected did not play. The screen looked like it would try to load them for a couple of seconds and then just move on to the next file. For me this was because they had audio streams with 5.1 channels instead of 2. To re-encode otherwise fine files with this problem, I did:
    ffmpeg -i input_file.mp4 -c:v copy -c:a mp3 -ac 2 output_file.mp4
    And then I was able to play the files.


    Lastly, I found some of my files were MKV but with h264 and MP3, so to re-encode those extremely quickly from MKV to MP4 containers, all I had to do was:
    ffmpeg -i input_file.mkv -c:v copy -c:a copy output_file.mp4
    Which saved a lot of time, especially on an anemic laptop.


    I have not done any looking in to the other video container formats but I assume that they would have similar issues as described above.

    I let OpenPilot drive my Prius on the Interstate for hours on end, combined with the Beat-Sonic STN7028, the information in this post has resulted in a significant improvement to my quality of life. I hope that it helps someone else too.
     
    bisco and prius16 like this.
  2. bisco

    bisco cookie crumbler

    Joined:
    May 11, 2005
    110,129
    50,045
    0
    Location:
    boston
    Vehicle:
    2012 Prius Plug-in
    Model:
    Plug-in Base
    Thank you!
     
  3. Justice Guyoono

    Justice Guyoono Junior Member

    Joined:
    Jan 15, 2023
    3
    2
    5
    Location:
    USA
    Vehicle:
    2022 Prius
    Model:
    XLE AWD-e
    Just an update on this, I found another option that can cause files not to be listed. If your video has too high of a video bitrate, it will not show up on the infotainment screen when you go to browse videos. I am not sure what the exact acceptable bitrate range is, absolutely no mention is made in the manual or anywhere else that I can find. I can personally confirm that 3937kb/s is too high and 1834kb/s is low enough. When re-encoding with ffmpeg, it doesn't give you the exact bitrate that you ask for (I would link documentation but I am not allowed to on this forum yet, just Google for "Limiting the output bitrate ffmpeg" and it should be the first result), so I'm not sure what the magic maximum number for average bitrate is.

    I can verify that this worked:

    ffmpeg -i input_file.mkv -map_metadata -1 -map_chapters -1 -c:v h264 -profile:v high -pix_fmt yuv420p -map 0:0 -map 0:1 -c:a aac -ac 2 -b:v 1000k output_file.mp4

    If you are not using Linux then you will need to find some other way to do this conversion. Maybe you can get ffmpeg running on Mac or Windows. Soon(ish) I will have a desktop computer with a GPU and I can test a bunch of different encoding options to see exactly what the limitations of the system are. I'll update this thread when that happens.

    As an aside, the manual specifically names a couple of different resolutions that are accepted by the system. At least on my model, this is totally false. I have been able to play all sorts of wonky resolutions with no problem as long as they are less than or equal to 1920x1080.