FAQ  •  Register  •  Login

Audio out of synch

<<

philtwirl

Serviio newbie

Posts: 6

Joined: Wed Apr 23, 2025 3:52 am

Post Fri Apr 25, 2025 11:40 pm

Audio out of synch

Hi,
I'm very new and know very little... :roll: First off, I'm excited to find out about Serviio, what a great resource!

I have a few issues, some Codec errors, even after running the original file through Handbrake at the recommended setting. Mostly, the problem happens with screen captures made with OBS studio. Settings recommendations?

But even when a file is playing, the audio is out of synch by a few seconds, and it seems to stay that way throughout, so I don't think it's a hardware issue. I searched the board but have not been able to find anything. Maybe I'm using the wrong terminology, but either way, I would love to know how to remedy this.

And finally, Serviio is displaying all episodes of one series with the same name, same plot (of the wrong movie), and the wrong thumbnail (of that same movie, I presume). I don't really care about those errors, but not being able to identify the titles is annoying. Again, any help would be appreciated! Thanks!
<<

atc98092

User avatar

DLNA master

Posts: 5414

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Sat Apr 26, 2025 3:27 am

Re: Audio out of synch

Greetings! The first thing we need to know is what you are using as your player, and the profile Serviio is using for that device.

The next issue would be to identify the contents of your media that is giving you the errors. There's a link in my sig line to help you identify your media contents.

By audio sync I assume you mean the audio is not matching what happens on-screen, such as talking that doesn't match the moving lips, and so on. Those can be tough to figure out, and some players offer a way to adjust the sound either way. But that's player dependent. And I'm assuming you have tried playing these same files differently (such as on a computer) and the audio and video are in sync.

File naming, especially with TV shows, is critical to match the metadata with the correct episode. Sometimes even the folder name can trip up the logic that searches for the correct metadata. It's especially troublesome when the TV show has had multiple versions. For example, Dragnet had a series in 1951 and another in 1967. I added the year to the folder for each version to assist the logic. Hawaii-Five-O is another one that can cause issues. I found that using the number 0 gave me a different version than if I used the capital letter O. Twilight Zone has had three separate versions of the series. Sometimes the only thing that works is to add the IMDB ID number to the folder. I had to do that with Doctor Who, with one folder named Doctor Who (1963) tt0056751 and the other Doctor Who (2005) tt0436992.

Naming of each episode file is also critical. It's best to include the season and episode number, along with the name of the episode. Here's one example: Doctor Who - S00E02 - The Christmas Invasion.mkv. Season 0 is used for specials, and sometime pilots. For Doctor Who, they had many Christmas specials over the years, but it can be tricky to identify the correct episode number. When in doubt, look at themoviedb.com, which is the web site Serviio uses to search for the correct metadata. I realize the name says movie, but it has TV shows as well. For movies, the correct naming format is title and year: Earth vs. The Flying Saucers (1956).mkv.

A word of caution: if you get the year wrong (TV show or movie) the metadata logic might not be able to find a match. Even being off by a single year can mess it up. And I have found different years for the same movie when looking at IMDB and themoviedb. When in doubt, use the year from the latter, because that's the database Serviio is searching.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: AMD Ryzen 5 5600GT, 32 gig ram, Windows 11 Pro, 22 TB hard drive space | Test server: Intel i5-6400, 16 gig ram, Windows 10 Pro

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

philtwirl

Serviio newbie

Posts: 6

Joined: Wed Apr 23, 2025 3:52 am

Post Sat Apr 26, 2025 4:48 am

Re: Audio out of synch

Hi atc98092, and thanks for the warm welcome!

And yes, that is the issue I meant, the audio being a few seconds behind the action on the screen. Which is a long time, and makes it unwatchable.

I use a Roku 4200X connected to a Sharp Aquos TV, and Serviio runs on a Windows10 pc with a 88GB of RAM, Intel Xeon 2.5GHz CPU, NVIDIA Quadro K2000 (2GB).

Does that give you enough information?
Here is the media info of a file that does NOT play, even after running it through Handbrake (I think I used the Roku 1080 30 Surround preset for it):

General
Complete name : S1 E5 - The Grim Barbarity Of Optics And Design - Severance-1.mp4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42 (mp42/iso2/mp41)
File size : 309 MiB
Duration : 42 min 30 s
Overall bit rate : 1 016 kb/s
Frame rate : 60.000 FPS
Encoded date : 2025-04-22 05:47:11 UTC
Tagged date : 2025-04-22 05:47:11 UTC
Writing application : HandBrake 1.8.2 2024081000

Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L4.1@Main
Codec ID : hvc1
Codec ID/Info : High Efficiency Video Coding
Duration : 42 min 30 s
Bit rate : 648 kb/s
Width : 1 680 pixels
Height : 702 pixels
Display aspect ratio : 2.39:1
Frame rate mode : Constant
Frame rate : 60.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0 (Type 0)
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.009
Stream size : 197 MiB (64%)
Writing library : x265 3.6+1-aa7f602f7:[Windows][GCC 13.2.0][64 bit] 10bit
Encoding settings : cpuid=1049583 / frame-threads=4 / numa-pools=24 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=1680x702 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=4 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-eob / no-eos / no-hrd / info / hash=0 / temporal-layers=0 / open-gop / min-keyint=60 / keyint=600 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=25 / lookahead-slices=0 / scenecut=40 / no-hist-scenecut / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=1 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / no-strong-intra-smoothing / max-merge=3 / limit-refs=3 / limit-modes / me=3 / subme=3 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / sao / no-sao-non-deblock / rd=4 / selective-sao=4 / no-early-skip / rskip / rskip-edge-threshold=0.050000 / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=0.75 / psy-rdoq=4.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=24.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=1 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=1 / transfer=1 / colormatrix=1 / chromaloc=1 / chromaloc-top=0 / chromaloc-bottom=0 / display-window=0 / cll=0,0 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / no-hdr10 / no-hdr10-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=0 / analysis-save-reuse-level=0 / analysis-load-reuse-level=0 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / no-field / qp-adaptation-range=1.00 / scenecut-aware-qp=0conformance-window-offsets / right=0 / bottom=0 / decoder-max-rate=0 / no-vbv-live-multi-pass / no-mcstf / no-sbrc
Encoded date : 2025-04-22 05:47:11 UTC
Tagged date : 2025-04-22 05:47:11 UTC
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Codec configuration box : hvcC

Audio #1
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : 2 / 40 / mp4a-40-2
Duration : 42 min 30 s
Source duration : 42 min 30 s
Bit rate mode : Constant
Bit rate : 160 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 48.7 MiB (16%)
Source stream size : 48.7 MiB (16%)
Title : Stereo / Stereo
Default : Yes
Alternate group : 1
Encoded date : 2025-04-22 05:47:11 UTC
Tagged date : 2025-04-22 05:47:11 UTC

Audio #2
ID : 3
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : 2 / 40 / mp4a-40-2
Duration : 42 min 30 s
Source duration : 42 min 29 s
Bit rate mode : Constant
Nominal bit rate : 192 kb/s
Maximum bit rate : 192 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Source stream size : 58.4 MiB (19%)
Title : Stereo / Stereo
Default : No
Alternate group : 1
Encoded date : 2025-04-22 05:47:11 UTC
Tagged date : 2025-04-22 05:47:11 UTC


And here of a file that has the audio synch issue:

General
Complete name : S1 E1 - Good News About Hell - Severance.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/avc1/mp41)
File size : 626 MiB
Duration : 57 min 13 s
Overall bit rate mode : Variable
Overall bit rate : 1 529 kb/s
Frame rate : 60.000 FPS
Writing application : Lavf58.76.100

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.2
Format settings : CABAC / 2 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 2 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 57 min 13 s
Source duration : 57 min 13 s
Bit rate mode : Variable
Maximum bit rate : 40.0 Mb/s
Width : 1 680 pixels
Height : 1 050 pixels
Display aspect ratio : 16:10
Frame rate mode : Constant
Frame rate : 60.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Source stream size : 543 MiB (87%)
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
mdhd_Duration : 3433350
Codec configuration box : avcC

Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : 2 / 40 / mp4a-40-2
Duration : 57 min 13 s
Source duration : 57 min 13 s
Source_Duration_LastFrame : -11 ms
Bit rate mode : Constant
Nominal bit rate : 191 kb/s
Maximum bit rate : 191 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Source stream size : 78.4 MiB (13%)
Default : Yes
Alternate group : 1
mdhd_Duration : 3433361
<<

atc98092

User avatar

DLNA master

Posts: 5414

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Sat Apr 26, 2025 5:07 am

Re: Audio out of synch

Perfect info, thanks! Are you using the default Roku profile? I'm the author of the Roku profiles, and Serviio does not select the best profile by default, you must select the proper profile. For your Roku, it's the profile labeled "Roku 1080 Media Player". And if you're using the default basic Roku profile, it's also chopping the max bitrate for the video to 12 Mbps, about the limit for most of the older devices.

But, here's your issue. You have the Roku 4200, which is the Roku 3 from March 2013. Yes, it's 12 years old. It does not support 4K, which means it doesn't support H.265 video. Only the 4K Roku players support H.265. Assuming you are using the default Roku profile in Serviio, your computer is working overtime to convert the video to H.264. Even with the PC specs you have, it's really working hard to transcode that video. Depending on the number of cores your Xeon CPU has, it might simply be maxed out.

Basically, your player is simply too old. I can't say if replacing it with a newer model will solve your audio sync issue, but chances are good it will. I have a few MP4 files that have no issue with audio sync. Also, just so you are aware. Roku has not provided any support for Roku Media Player (their video player app) in about four years. It has some issues with playback that haven't been addressed in years. It's a shame, and even though I'm a beta tester for Roku I have not been able to get them to address the existing issues or make any improvements in the app. That is one (of many) reasons Roku is no longer my go-to for watching my personal media server. It's great for online streaming (although I use my Shield for YouTube since I have an app that blocks all of the ads) but just can't hold a candle for streaming my ripped discs. No support for lossless audio, no support for image based captions, no Gigabit Ethernet for my 4K media (the average bitrate of my 4K ripped movies is about 75 Mbps, but the peaks easily exceed 150 Mbps, way beyond Fast Ethernet speeds).
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: AMD Ryzen 5 5600GT, 32 gig ram, Windows 11 Pro, 22 TB hard drive space | Test server: Intel i5-6400, 16 gig ram, Windows 10 Pro

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

philtwirl

Serviio newbie

Posts: 6

Joined: Wed Apr 23, 2025 3:52 am

Post Sat Apr 26, 2025 12:52 pm

Re: Audio out of synch

Thanks for getting back to me so quickly, and answering so extensively.

I find myself with a few questions nonetheless:

1) Is there a way to to convert my files to a lower quality that my Roku 4200 would be able to "digest" and display better, i.e. with Handbrake?
Understanding that the quality might become a lot lower, I might still want to do that. My TV is not that big, and I would love to be able to playback my files on it rather than watching on the PC monitor.

2) Which Roku model can you recommend - I really prefer to keep it hooked up via ethernet, not wifi, which is why I chose my current model.
Or is there an entirely different device that you can recommend? (Again, ethernet is my preference).

3) Since I watch a decent amount of YouTube, what is this Shield you mention? Is it simply an ad-blocker?

TIA!
<<

atc98092

User avatar

DLNA master

Posts: 5414

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Sat Apr 26, 2025 8:03 pm

Re: Audio out of synch

Yes, Handbrake could convert your video to lower quality. They have a number of presets for 720/30 or even down to 480/30 (DVD quality). But that would take time. Honestly, a new Roku or other player would be more effective since you could just play what you have.

For a Roku, I prefer either the Ultra (the most expensive, of course) or the Express 4K+. The Ultra is the only one with wired Ethernet, although it's "only" 100Mbps. I get almost 300 Mbps with WiFi on my Ultra 4850. However, Roku is discontinuing several players and replacing them with new versions of the Stick. There will still be an Ultra, and perhaps someday they will actually make something that can match the Shield.

The app I use on the Shield that blocks the ads is called Smart Tube. It is not in the Google Play store, but has to be "side loaded". But that's a pretty simple thing to do on an Android TV/Google TV box. The Fire TV is Android based, so it can be sideloaded there as well. But it is only available for the Android OS, so no version for Apple TV or Roku devices. One reasonably decent and also inexpensive Android TV box is the Onn 4K Media Player (Onn is a Walmart house brand). I have an older one, and it does almost everything my Shield does, except passthrough the lossless audio codecs. But using Kodi on it works almost as well as the Shield.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: AMD Ryzen 5 5600GT, 32 gig ram, Windows 11 Pro, 22 TB hard drive space | Test server: Intel i5-6400, 16 gig ram, Windows 10 Pro

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

philtwirl

Serviio newbie

Posts: 6

Joined: Wed Apr 23, 2025 3:52 am

Post Wed Apr 30, 2025 1:38 am

Re: Audio out of synch

Wow, thanks Dan!

Lots to think about. Who knew...I certainly had no idea. Will the Shield or onn players have just as many apps/channels as the Roku, or are there some notable that are not compatible?

How much worse are the lesser Roku Ultras, such as the 4800 or even the 4660?

Sorry to keep asking more and more. ;)
<<

atc98092

User avatar

DLNA master

Posts: 5414

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Wed Apr 30, 2025 2:34 am

Re: Audio out of synch

As far as the Roku players, I prefer any that use a recent Realtek chip. For the Ultra that started with the 4800. Basically any Roku released since fall 2021, with the exception of the Streambars. You can see more hardware details on their wiki page: https://en.wikipedia.org/wiki/Roku#Feature_comparison

As far as the apps available on Android devices, you can check them out in the Google Play Store (play.google.com). If you are logged into a Google account and have an Android device linked to that account, the play store will tell you if a specific app is available for your device. If you don't have any linked, I can't say for certain if it provides any idea what the app might work in. Mostly it's when an app is designed for a phone that it might not be available for a media player. In some respects there's probably far more apps available for Android compared to Roku, but many of those apps have nothing to do with media playback so the absolute numbers might not be that meaningful.

Happy to answer your questions. I think I failed to mention before, but I'm the author of the profiles included with Serviio for all Roku devices. I made some assumptions when I wrote them, mostly that the players would be connected to an AVR for audio support, and the TVs needed all audio to be transcoded to AC3 if it wasn't already in that codec. It's probably time I streamlined them down, as so few people are using those pre-2016 devices that had such a limitation on their video bitrate support. I could probably trim it back to four profiles: 1080 and 4K TV, 1080 and 4K player.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: AMD Ryzen 5 5600GT, 32 gig ram, Windows 11 Pro, 22 TB hard drive space | Test server: Intel i5-6400, 16 gig ram, Windows 10 Pro

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

philtwirl

Serviio newbie

Posts: 6

Joined: Wed Apr 23, 2025 3:52 am

Post Fri May 02, 2025 7:02 pm

Re: Audio out of synch

Hi Dan,
Thanks for getting back to me.

My question re: Android devices was more about availability of channels than anything else, and other apps pertaining to AV streaming, as you mention, and you're right, I can just check it out in the Google Play store.

But do you think that generally speaking an Android media player like the Onn has more to offer than the Roku players, or does it still just come down to personal preference?

Thanks,
Phil
<<

atc98092

User avatar

DLNA master

Posts: 5414

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Fri May 02, 2025 7:56 pm

Re: Audio out of synch

It's tough to say if Android devices have more apps available than Roku, because Roku has so, so many available. Once you start considering the quality of the apps, then I really doubt there's much difference between Roku and Android for overall apps. If you're looking for media playback from Serviio, then Android has Roku beat hands down, as there's dozens of apps available there that can play from DLNA servers. On Roku, there's only one: Roku Media Player. RMP hasn't been updated in over four years in any meaningful way and has several bugs with video playback, mostly with TS/M2TS containers. If you have any media on your Serviio server, then Android is the only way you can bitstream the audio to an AVR.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: AMD Ryzen 5 5600GT, 32 gig ram, Windows 11 Pro, 22 TB hard drive space | Test server: Intel i5-6400, 16 gig ram, Windows 10 Pro

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

philtwirl

Serviio newbie

Posts: 6

Joined: Wed Apr 23, 2025 3:52 am

Post Fri May 09, 2025 1:23 pm

Re: Audio out of synch

Thanks, Dan!

And, as always, I have some follow-up questions:

1) What Android devices can you recommend? I don't have an extensive media library on my pc, so I'd like to get one that is around $30. Also, an ethernet connection is important to me.
I know about the Onn, but there are also some off-brand looking boxes that promise many things...Or what about the Onn 4k Pro? If there's a good reason to get something in that price range, that could work also.

2) What app (media player) for Android can you recommend?

I know this is lazy on my part, but even if I did my own research, my level of knowledge will still be way below yours, so thank you in advance for sharing your expertise again! ;)
<<

atc98092

User avatar

DLNA master

Posts: 5414

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Fri May 09, 2025 2:22 pm

Re: Audio out of synch

For Android devices, I only have experience with the Onn and Shield. The Onn doesn't have Ethernet (unless they added it to the newest version, which I haven't seen). As far as the off brands that you can find on Amazon, I have no specific suggestions. But Amazon's return policy provides some comfort level if you get something that's worthless. :)

As for player apps, my preference is Kodi. It's free and plays almost anything. VLC is a great player with a lousy user interface. MrMC is a Kodi clone (I believe they are both forks from a previous app) but doesn't seem to have as much user support. There's a couple of negatives about Kodi: it's more complicated to configure, and when you're playing a video and hit the Back button on the remote the video continues playing in the background. That can be changed with a key editor plug-in, but again a bit complicated. VLC will simply work without making any setting changes, but again not a very good UI.

I'm sure there's other apps available, but once I found Kodi I haven't bothers with any of the others.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: AMD Ryzen 5 5600GT, 32 gig ram, Windows 11 Pro, 22 TB hard drive space | Test server: Intel i5-6400, 16 gig ram, Windows 10 Pro

HOWTO: Enable debug logging HOWTO: Identify media file contents

Return to User experiences

Who is online

Users browsing this forum: No registered users and 11 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.