Jellyfin Forum
A/V sync issue that only happens in jellyfin - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: A/V sync issue that only happens in jellyfin (/t-a-v-sync-issue-that-only-happens-in-jellyfin)



A/V sync issue that only happens in jellyfin - MentalUproar - 2025-03-14

I have videos that play perfectly fin when I access them from IINA over SMB, but in Jellyfin the audio and video go further and further out of sync the longer the video plays.  I have tried in both Edge and Safari and the problem is still there.  It's not transcoding the video though it is remuxing it.  Where should I look for the problem?


RE: A/V sync issue that only happens in jellyfin - TheDreadPirate - 2025-03-14

Does this happen for every video? Or just specific videos?


RE: A/V sync issue that only happens in jellyfin - MentalUproar - 2025-03-14

Interesting, it doesn't seem to affect all files! I wonder what's different between them since they all read fine directly over smb.


RE: A/V sync issue that only happens in jellyfin - TheDreadPirate - 2025-03-14

The issue is likely with the file itself. We can try remuxing the file with ffmpeg. What OS are you running so I can give you a more specific command. If you are on Linux, how is Jellyfin installed?


RE: A/V sync issue that only happens in jellyfin - MentalUproar - 2025-03-14

I'm on Linux running jellyfin in a podman container. I'm using an intel N100 with hardware acceleration and the low power GuC/HuC stuff enabled.


RE: A/V sync issue that only happens in jellyfin - TheDreadPirate - 2025-03-14

Code:
docker exec -it jellyfin bash
/usr/lib/jellyfin-ffmpeg/ffmpeg -fflags +genpts+igndts -i "/path/to/problem/video.mkv" -map 0 -codec copy -max_muxing_queue_size 2048 -max_interleave_delta 0 -avoid_negative_ts disabled newFile.mkv

This will open a bash shell into the Jellyfin container. Then we are using ffmpeg from within the container to remux. The path for the video will be from the container's reference frame.


RE: A/V sync issue that only happens in jellyfin - MentalUproar - 2025-03-15

Code:
podman exec -it Jellyfin bash
cd /media/TESTING
/usr/lib/jellyfin-ffmpeg/ffmpeg -fflags +genpts+igndts -i "./TEMPY.mkv" -map 0 -codec copy -max_muxing_queue_size 2048 -max_interleave_delta 0 -avoid_negative_ts disabled newFile.mkv

I ran the above.  The remuxed file does not have AV sync issues.  It seems to only happen inside the browser on the jellyfin interface


RE: A/V sync issue that only happens in jellyfin - TheDreadPirate - 2025-03-16

Browsers have limited codec and container support. Additionally, most browsers don't support selecting audio/subtitles tracks other than the first track. So if you select a secondary audio/subtitle track it will trigger a remux. If the original video had some presentation time stamp issues, desync is possible.

The remux command we ran will copy the original video/audio/subs to a new container with proper presentation time stamps (genpts), which can help with desync issues.


RE: A/V sync issue that only happens in jellyfin - MentalUproar - 2025-03-18

There are no subtitles or secondary audio tracks in the source file.