DLNA audio sync - audio is ahead of video - 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: DLNA audio sync - audio is ahead of video (/t-dlna-audio-sync-audio-is-ahead-of-video) |
DLNA audio sync - audio is ahead of video - mattb - 2024-11-30 Hi, I'm Matt and I'm running a synology ds1821+, previously running synology's video station. I moved over to Jellyfin about 4-6 months ago, which I'm running in a container. Running latest Jellyfin 10.10.3 and DLNA 5.0.0 I'm having an issue where the audio is ahead of the actual movie, but only when streaming via DLNA to a Samsung TV. If I run on laptop or phone, I see no delay. This is happening across every movie/tv show I've attempted to stream to a TV. Looking for guidance on how to get this resolved, this didn't happen when I initially moved over to Jellyfin. RE: DLNA audio sync - audio is ahead of video - mattb - 2024-11-30 [2024-11-30 14:40:29.152 +00:00] [INF] [66] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.4.35" closed [2024-11-30 14:40:37.694 +00:00] [INF] [37] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.4.35" request [2024-11-30 14:41:01.547 +00:00] [INF] [66] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Jellyfin Android" "2.6.2" playing "The Janitor’s Boy". Stopped at "807512" ms [2024-11-30 14:42:26.973 +00:00] [INF] [15] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -probesize 1G -i file:\"/movies/13 Hours The Secret Soldiers of Benghazi 2016.mp4\" -map 0:0 -map 0:1 -map -0:s -codec:v:0 libx264 -force_key_frames \"expr:gte(t,n_forced*5)\" -vf \"setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(1920\,1080*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(1920/a\,1080))/2)*2,format=yuv420p\" -preset veryfast -crf 23 -maxrate 6667653 -bufsize 13335306 -level 41 -x264opts:0 subme=0:me_range=16:rc_lookahead=10:me=hexpen_gop=0 -map_metadata -1 -map_chapters -1 -threads 0 -codec:a:0 ac3 -ac 6 -ab 224000 -y \"/cache/transcodes/32d5dec8786e42543cb3e2ed06b56c48.ts\"" [2024-11-30 14:44:37.719 +00:00] [INF] [60] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets. [2024-11-30 14:47:25.719 +00:00] [INF] [42] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets. [2024-11-30 14:50:13.719 +00:00] [INF] [37] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets. [2024-11-30 14:50:27.013 +00:00] [INF] [80] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "DLNA" "10.10.3" playing "13 Hours". Stopped at "470108" ms [2024-11-30 14:50:36.883 +00:00] [INF] [37] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: Transcoding kill timer stopped for JobId "b245d5f39b024ea7a671fe02d4b9f869" PlaySessionId null. Killing transcoding [2024-11-30 14:50:36.883 +00:00] [INF] [37] MediaBrowser.Controller.MediaEncoding.TranscodingJob: Stopping ffmpeg process with q command for "/cache/transcodes/32d5dec8786e42543cb3e2ed06b56c48.ts" [2024-11-30 14:50:37.339 +00:00] [INF] [37] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: FFmpeg exited with code 0 [2024-11-30 14:50:37.339 +00:00] [INF] [37] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: Deleting partial stream file(s) "/cache/transcodes/32d5dec8786e42543cb3e2ed06b56c48.ts" [2024-11-30 14:53:37.719 +00:00] [INF] [44] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets. [2024-11-30 14:56:25.720 +00:00] [INF] [29] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets. [2024-11-30 14:59:13.719 +00:00] [INF] [23] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets. {"Protocol":0,"Id":"ec6c1ec0e59c981e2c664335677833ae","Path":"/movies/13 Hours The Secret Soldiers of Benghazi 2016.mp4","EncoderPath":null,"EncoderProtocol":null,"Type":0,"Container":"mov,mp4,m4a,3gp,3g2,mj2","Size":2416123213,"Name":"13 Hours The Secret Soldiers of Benghazi 2016","IsRemote":false,"ETag":"d25a766ef061f617f35dc8515bc9ade5","RunTimeTicks":86695680000,"ReadAtNativeFramerate":false,"IgnoreDts":false,"IgnoreIndex":false,"GenPtsInput":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"UseMostCompatibleTranscodingProfile":false,"RequiresOpening":false,"OpenToken":null,"RequiresClosing":false,"LiveStreamId":null,"BufferMs":null,"RequiresLooping":false,"SupportsProbing":true,"VideoType":0,"IsoType":null,"Video3DFormat":null,"MediaStreams":[{"Codec":"hevc","CodecTag":"hev1","Language":"und","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Rotation":null,"Comment":null,"TimeBase":"1/1200000","CodecTimeBase":null,"Title":null,"VideoRange":1,"VideoRangeType":1,"VideoDoViTitle":null,"AudioSpatialFormat":0,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"LocalizedHearingImpaired":null,"DisplayTitle":"1080p HEVC SDR","NalLengthSize":null,"IsInterlaced":false,"IsAVC":false,"ChannelLayout":null,"BitRate":2000296,"BitDepth":10,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":true,"IsForced":false,"IsHearingImpaired":false,"Height":800,"Width":1920,"AverageFrameRate":23.976215,"RealFrameRate":23.976025,"ReferenceFrameRate":23.976215,"Profile":"Main 10","Type":1,"AspectRatio":"2.40:1","Index":0,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuv420p10le","Level":120,"IsAnamorphic":false},{"Codec":"aac","CodecTag":"mp4a","Language":"und","ColorRange":null,"ColorSpace":null,"ColorTransfer":null,"ColorPrimaries":null,"DvVersionMajor":null,"DvVersionMinor":null,"DvProfile":null,"DvLevel":null,"RpuPresentFlag":null,"ElPresentFlag":null,"BlPresentFlag":null,"DvBlSignalCompatibilityId":null,"Rotation":null,"Comment":null,"TimeBase":"1/48000","CodecTimeBase":null,"Title":null,"VideoRange":0,"VideoRangeType":0,"VideoDoViTitle":null,"AudioSpatialFormat":0,"LocalizedUndefined":null,"LocalizedDefault":"Default","LocalizedForced":null,"LocalizedExternal":"External","LocalizedHearingImpaired":null,"DisplayTitle":"AAC - 5.1 - Default","NalLengthSize":null,"IsInterlaced":false,"IsAVC":false,"ChannelLayout":"5.1","BitRate":224000,"BitDepth":null,"RefFrames":null,"PacketLength":null,"Channels":6,"SampleRate":48000,"IsDefault":true,"IsForced":false,"IsHearingImpaired":false,"Height":null,"Width":null,"AverageFrameRate":null,"RealFrameRate":null,"ReferenceFrameRate":null,"Profile":"LC","Type":0,"AspectRatio":null,"Index":1,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":null,"Level":0,"IsAnamorphic":null}],"MediaAttachments":[],"Formats":[],"Bitrate":2229521,"FallbackMaxStreamingBitrate":null,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":0,"TranscodingContainer":null,"AnalyzeDurationMs":null,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null,"HasSegments":false} /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -i file:"/movies/13 Hours The Secret Soldiers of Benghazi 2016.mp4" -map 0:0 -map 0:1 -map -0:s -codec:v:0 libx264 -force_key_frames "expr:gte(t,n_forced*5)" -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(1920\,1080*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(1920/a\,1080))/2)*2,format=yuv420p" -preset veryfast -crf 23 -maxrate 6667653 -bufsize 13335306 -level 41 -x264opts:0 subme=0:me_range=16:rc_lookahead=10:me=hexpen_gop=0 -map_metadata -1 -map_chapters -1 -threads 0 -codec:a:0 ac3 -ac 6 -ab 224000 -y "/cache/transcodes/32d5dec8786e42543cb3e2ed06b56c48.ts" ffmpeg version 7.0.2-Jellyfin Copyright © 2000-2024 the FFmpeg developers built with gcc 12 (Debian 12.2.0-14) configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto=auto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libxml2 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libharfbuzz --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc libavutil 59. 8.100 / 59. 8.100 libavcodec 61. 3.100 / 61. 3.100 libavformat 61. 1.100 / 61. 1.100 libavdevice 61. 1.100 / 61. 1.100 libavfilter 10. 1.100 / 10. 1.100 libswscale 8. 1.100 / 8. 1.100 libswresample 5. 1.100 / 5. 1.100 libpostproc 58. 1.100 / 58. 1.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'filemovies/13 Hours The Secret Soldiers of Benghazi 2016.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 creation_time : 2020-04-29T13:38:00.000000Z title : 13.Hours.The.Secret.Soldiers.of.Benghazi.2016.1080p.BluRay.x265-RARBG encoder : Lavf58.20.100 comment : 13.Hours.The.Secret.Soldiers.of.Benghazi.2016.1080p.BluRay.x265-RARBG Duration: 02:24:29.57, start: 0.000000, bitrate: 2229 kb/s Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 / 0x3176656, yuv420p10le(tv), 1920x800 [SAR 1:1 DAR 12:5], 2000 kb/s, 23.98 fps, 23.98 tbr, 1200k tbn (default) Metadata: creation_time : 2020-04-29T13:38:00.000000Z handler_name : VideoHandler vendor_id : [0][0][0][0] Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 224 kb/s (default) Metadata: creation_time : 2020-04-29T13:38:00.000000Z handler_name : SoundHandler vendor_id : [0][0][0][0] Stream mapping: Stream #0:0 -> #0:0 (hevc (native) -> h264 (libx264)) Stream #0:1 -> #0:1 (aac (native) -> ac3 (native)) Press [q] to stop, [?] for help [libx264 @ 0x558e7d092800] using SAR=1/1 [libx264 @ 0x558e7d092800] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 [libx264 @ 0x558e7d092800] profile High, level 4.1, 4:2:0, 8-bit Output #0, mpegts, to '/cache/transcodes/32d5dec8786e42543cb3e2ed06b56c48.ts': Metadata: encoder : Lavf61.1.100 Stream #0:0: Video: h264, yuv420p(tv, bt709, progressive), 1920x800 [SAR 1:1 DAR 12:5], q=2-31, 23.98 fps, 90k tbn (default) Metadata: encoder : Lavc61.3.100 libx264 Side data: cpb: bitrate max/min/avg: 6667000/0/0 buffer size: 13335000 vbv_delay: N/A Stream #0:1: Audio: ac3, 48000 Hz, 5.1(side), fltp, 224 kb/s (default) Metadata: encoder : Lavc61.3.100 ac3 frame= 49 fps=0.0 q=28.0 size= 72KiB time=00:00:02.08 bitrate= 284.2kbits/s speed=4.17x frame= 121 fps=121 q=28.0 size= 256KiB time=00:00:05.04 bitrate= 415.5kbits/s speed=5.05x frame= 157 fps=105 q=25.0 size= 512KiB time=00:00:06.58 bitrate= 636.5kbits/s speed=4.39x frame= 192 fps= 96 q=28.0 size= 1024KiB time=00:00:08.00 bitrate=1047.5kbits/s speed= 4x frame= 224 fps= 90 q=28.0 size= 1792KiB time=00:00:09.34 bitrate=1571.3kbits/s speed=3.74x RE: DLNA audio sync - audio is ahead of video - TheDreadPirate - 2024-11-30 Does it transcode on your other clients? Or just the TV? RE: DLNA audio sync - audio is ahead of video - mattb - 2024-11-30 Also worth mentioning. Jellyfin runs on an M2 SSD (Samsung 990 Pro 1TB mirrored), while the media is on a separate volume. laptop web client /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -fflags +genpts -i file:"/tv/The Day of the Jackal/S01/The Day of the Jackal S01E08.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 copy -tag:v:0 hvc1 -bsf:v hevc_mp4toannexb -start_at_zero -codec:a:0 libfdk_aac -ac 2 -ab 256000 -af "volume=2" -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 6 -hls_segment_type fmp4 -hls_fmp4_init_filename "4f22728d1495142e29d2ef66ca0dfeaf-1.mp4" -start_number 0 -hls_segment_filename "/cache/transcodes/4f22728d1495142e29d2ef66ca0dfeaf%d.mp4" -hls_playlist_type vod -hls_list_size 0 -y "/cache/transcodes/4f22728d1495142e29d2ef66ca0dfeaf.m3u8" phone (Samsung ultra s24) /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -ss 00:02:33.000 -noaccurate_seek -i file:"/tv/The Day of the Jackal/S01/The Day of the Jackal S01E08.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 libx264 -preset veryfast -crf 23 -maxrate 8320620 -bufsize 16641240 -profile:v:0 high -level 41 -x264opts:0 subme=0:me_range=16:rc_lookahead=10:me=hexpen_gop=0 -force_key_frames:0 "expr:gte(t,n_forced*3)" -sc_threshold:v:0 0 -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(1920\,1080*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(1920/a\,1080))/2)*2,format=yuv420p" -codec:a:0 libfdk_aac -ac 2 -ab 256000 -af "volume=2" -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type fmp4 -hls_fmp4_init_filename "b5ed9e17548680bd041213daff1819c5-1.mp4" -start_number 51 -hls_segment_filename "/cache/transcodes/b5ed9e17548680bd041213daff1819c5%d.mp4" -hls_playlist_type vod -hls_list_size 0 -y "/cache/transcodes/b5ed9e17548680bd041213daff1819c5.m3u8" phone streaming to tv /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -i file:"/tv/The Day of the Jackal/S01/The Day of the Jackal S01E08.mkv" -map 0:0 -map 0:1 -map -0:s -codec:v:0 libx264 -force_key_frames "expr:gte(t,n_forced*5)" -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(1920\,1080*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(1920/a\,1080))/2)*2,format=yuv420p" -preset veryfast -crf 23 -maxrate 8320620 -bufsize 16641240 -level 41 -x264opts:0 subme=0:me_range=16:rc_lookahead=10:me=hexpen_gop=0 -map_metadata -1 -map_chapters -1 -threads 0 -codec:a:0 copy -y "/cache/transcodes/c27668d50539ad63cb1eac51191dafcc.ts" RE: DLNA audio sync - audio is ahead of video - TheDreadPirate - 2024-11-30 I'm thinking that the TV isn't capable of decoding the video fast enough, resulting in desync. You can try adjusting the DLNA profile to send 720P video instead of 1080P video. RE: DLNA audio sync - audio is ahead of video - mattb - 2024-11-30 Is that located --> Profile / Playback / Video Quality / Maximum Allowed Video Transcoding Resolution / 720p? I tried this and it still misaligned, previously this was Auto. RE: DLNA audio sync - audio is ahead of video - TheDreadPirate - 2024-11-30 No. You have to change the DLNA profile your TV is using (the device profile name is in the log). Container path /config/plugins/DLNA_5.0.0.0/profiles/ |