# Proxmox-Host Audio Remux for Jellyfin

Work-alike recipe from a live session: a 9.0 GiB HEVC HDR movie with EAC3/Atmos audio played silently in the Jellyfin Mac app because the client cannot decode EAC3. Video direct-played fine.

Solution: remux the audio track to AAC on the Proxmox host (where the media bind mount lives), atomically replace the file, and refresh Jellyfin metadata.

## Environment

- Proxmox host: `imac-proxmox`
- Jellyfin LXC container: VMID `102`
- Container mount: `mp0: /mnt/pve/hdd-data/media,mp=/mnt/media`
- Movie path inside container: `/mnt/media/movies/Project-Hail-Mary_(2026).mkv`
- Movie path on host: `/mnt/pve/hdd-data/media/movies/Project-Hail-Mary_(2026).mkv`
- Original audio: EAC3 5.1 / Dolby Digital Plus + Dolby Atmos
- Target audio: AAC 5.1 384 kbps

## Steps

### 1. Identify the host path of the media

```bash
pct config 102 | grep mp
```

Output:

```text
mp0: /mnt/pve/hdd-data/media,mp=/mnt/media
mp1: /mnt/pve/hdd-data/uploads,mp=/mnt/uploads
```

So `/mnt/media` inside the container is `/mnt/pve/hdd-data/media` on the host.

### 2. Verify file and install ffmpeg on the host

```bash
HOST_FILE="/mnt/pve/hdd-data/media/movies/Project-Hail-Mary_(2026).mkv"
ls -lh "$HOST_FILE"
which ffmpeg || apt update && apt install -y ffmpeg
```

### 3. Remux audio only

```bash
HOST_FILE="/mnt/pve/hdd-data/media/movies/Project-Hail-Mary_(2026).mkv"
AAC_FILE="${HOST_FILE}.aac-remux.mkv"

ffmpeg -y -i "$HOST_FILE" \
  -map 0:v -c:v copy \
  -map 0:a:0 -c:a aac -b:a 384k \
  -map 0:s? -c:s copy \
  -metadata title="Project Hail Mary" \
  "$AAC_FILE"
```

This ran at ~18-19x real time on the host CPU and took a few minutes.

### 4. Verify output

```bash
ffprobe -v error -show_streams -select_streams a "$AAC_FILE" \
  | grep -E '^(codec_name|channels|sample_rate)'
```

Expected:

```text
codec_name=aac
sample_rate=48000
channels=6
```

Video should still be `hevc` at 1920x1080 10-bit HDR:

```bash
ffprobe -v error -show_streams -select_streams v "$AAC_FILE" \
  | grep -E '^(codec_name|width|height|pix_fmt|color_transfer)'
```

### 5. Atomically replace the original

```bash
HOST_FILE="/mnt/pve/hdd-data/media/movies/Project-Hail-Mary_(2026).mkv"
AAC_FILE="${HOST_FILE}.aac-remux.mkv"

mv "$HOST_FILE" "${HOST_FILE}.original-eac3"
mv "$AAC_FILE" "$HOST_FILE"
```

Result: new active file has AAC audio and is ~3% smaller (8.7 GiB vs 9.0 GiB) because AAC at 384 kbps is smaller than the original 768 kbps EAC3 stream.

### 6. Refresh Jellyfin metadata

- In Jellyfin web UI or Mac app, go to the movie.
- Three dots → **Refresh Metadata**.
- Check Media Info again; Audio should now show `AAC`.

## Notes

- Running `ffmpeg` on the host avoids LXC bind-mount overhead and uses the host's I/O.
- Keep the `.original-eac3` backup until you confirm the new file plays correctly everywhere.
- This same pattern works for other problematic codecs (TrueHD, DTS) that the target client cannot decode.
- Subtitle tracks (`-map 0:s? -c:s copy`) are preserved unchanged.
