Convert video for Uconnect USB playback
Uconnect head units in Chrysler, Jeep, Dodge and Ram vehicles play MP4 files from a USB stick, but only 8-bit H.264 at 720p or smaller with AAC stereo sound. carify checks each stream against that line, re-encodes only what's over it, and copies the result onto a stick labelled MOVIES.
curl -fsSL https://raw.githubusercontent.com/Real-Fruit-Snacks/carify/main/install.sh | shirm https://raw.githubusercontent.com/Real-Fruit-Snacks/carify/main/install.ps1 | iexNeeds ffmpeg on your PATH: winget install Gyan.FFmpeg, sudo apt install ffmpeg, sudo dnf install ffmpeg or brew install ffmpeg. Then carify movie.mkv.
Frame height
720from 1080Fitsh264 8-bit
carify 1.1.2Recorded run · Ubuntu 24.04 · ffmpeg 6.1.1
$ carify road-trip.mkvprobe video hevc/yuv420p10le/Main 10 1920x1080 audio ac3 6chvideo re-encode to H.264 High 8-bit, fits 1280x720 (slow)audio re-encode to AAC stereo 160kframe= 720 fps=106 q=-1.0 Lsize= 8706kB time=00:00:29.99 bitrate=2377.8kbits/s speed=4.43xwrote ./road-trip-car.mp4 (8 MB)usb copying to /media/runner/MOVIESusb done; safe to remove the stickUSB waitingcopyingsafe to remove
Audio channels
2from 6Fitsaac stereo
Replays of real runs, at the speed they ran: carify 1.1.2 on 30-second test clips, recorded on GitHub's Ubuntu 24.04 runner with ffmpeg 6.1.1 (how). The redlines are carify's limits: 720 pixels high, or --max-height, and 2 audio channels.
Why it exists
Anything outside that format shows up on the head unit as an unsupported file, or plays with no sound. I wrote carify so I could stop re-learning the ffmpeg flags for it: one command per file, and the stick is ready.
A file that already fits is copied, not re-encoded, so it takes about as long as reading it: dashcam.mp4 above took 0.4 s. A re-encode runs as fast as libx264 manages on your machine. road-trip.mkv, 30 s of 1080p HEVC, took 7.5 s on GitHub's runner.
Where the line is
ffprobe reads the first video stream (cover art is skipped) and the first audio stream. A stream is copied when it's inside every line in its rows, and re-encoded when it isn't.
These limits are the common denominator that has worked across Uconnect generations, not a published spec.
| Stream | Copied if it's | Otherwise carify |
|---|---|---|
| Video | H.264 | Re-encodes it with libx264 -preset veryfast -crf 20, High profile, level 4.1 |
8-bit 4:2:0 (yuv420p) | ||
| Baseline, Main or High, level 4.1 or lower | ||
Inside 1280×720. --max-height moves the line; the width limit is height × 16/9. | Re-encodes it, scaled down to fit with the aspect ratio kept. Nothing is scaled up. | |
| Audio | AAC, two channels or fewer | Re-encodes it to AAC stereo at 160 kbps |
| A file with no audio track is converted silent, with a warning. | ||
| The rest | Subtitles, attachments and extra audio tracks are dropped. | |
| File | An MP4 written with +faststart to a hidden .part file and renamed when ffmpeg finishes, so a cancelled run leaves nothing half-written. | |
| Stick | If a stick labelled MOVIES is mounted, the file is copied onto it. Rename your stick once and you never drag files again. | |
The four test runs
The clips are 30 seconds of ffmpeg's testsrc2 picture with a sine tone, made to fail in the four ways that matter. CI records these runs again on every push and fails if carify's output changes.
| Clip | Came in as | carify | Took | Went out as |
|---|---|---|---|---|
road-trip.mkv | hevc Main 10, 1920×1080, ac3 5.1 | Video re-encoded, audio re-encoded | 7.5 s (4.43x) | h264 High 4.1, 1280×720, aac stereo, 8 MB |
cartoons.mkv | h264 High, 1280×720, ac3 5.1 | Video copied, audio re-encoded | 1 s (41.7x) | h264 High 3.1, 1280×720, aac stereo, 9 MB |
phone-video.mp4 | h264 High, 1080×1920, aac stereo | Video re-encoded, audio copied | 3.8 s (8.79x) | h264 High 4.1, 406×720, aac stereo, 2 MB |
dashcam.mp4 | h264 Main, 1280×720, aac stereo | Video copied, audio copied | 0.4 s (957x) | h264 Main 3.1, 1280×720, aac stereo, 10 MB |
Usage
bash 3.2 or later: Linux, macOS, WSL
carify movie.mkv # writes movie-car.mp4 next to it
carify movie.mkv ~/out.mp4 # explicit output path
carify --force movie.mkv # overwrite an existing output
carify --max-height 1080 movie.mkv
carify --no-usb movie.mkv # don't copy to the stick
for f in *.mkv; do carify "$f"; done
Windows PowerShell 5.1 and PowerShell 7
carify.ps1 movie.mkv
carify.ps1 movie.mkv D:\out.mp4 -Force
carify.ps1 movie.mkv -MaxHeight 1080
carify.ps1 movie.mkv -NoUsb
Get-Help carify.ps1 -Full
Get-ChildItem *.mkv | ForEach-Object { carify.ps1 $_.FullName }
Settings
One file per run. The installers also read CARIFY_BIN (the install folder) and CARIFY_REF (a tag such as v1.1.2 instead of main).
| Setting | Default | Does |
|---|---|---|
--max-height-MaxHeight | 720 | Largest frame height; the width limit is height × 16/9. Try 1080 if your unit plays it. |
CARIFY_USB_DIR | unset | Copy to this folder instead of looking for a MOVIES stick |
CARIFY_THEME | nightshift | dayshift for light terminal backgrounds |
NO_COLOR | unset | Any value turns colour off |
Tested on
- Ubuntu 24.04, bash 5.2, ffmpeg 6.1.1: all 40 checks in
tests/run.sh. - CI on every push: Ubuntu (bash, PowerShell 7), macOS (bash 5 and the system
/bin/bash3.2), Windows (PowerShell 7 and Windows PowerShell 5.1). - Not tested: a list of head units by model year. If a file played or failed on your car, an issue saying which model year and head unit is the data this project is short of.
Known issues
- HDR sources (HDR10, HLG) are not tone-mapped. carify warns, and the result looks washed out.
- Only the first audio track is kept. If that's commentary or the wrong language, pick the track with ffmpeg yourself.
- Subtitles are dropped, not burned in.
- FAT32 sticks can't hold files over 4 GB. carify says so when the copy fails; format the stick as exFAT or use a lower
--max-height.