Jump to content

Audio distortion when playing Dolby Vision mp4 with DD+ Atmos


Ceten
 Share

Recommended Posts

Ceten

Hi, I'm having issues with playing this one file from the Emby app on my LG C7 tv (app version 1.0.24) using the internal speakers. Around 2 minutes in the audio starts to be distorted; On my laptop the file plays with clear audio but to be sure the error wasn't in the file itself I've put it on an usb stick. When opening the file from the thumb drive directly on the tv (in the built in videos app) it played without issues (except for not being able to select the subtitle because the default player only allows selection of the first 8 subtitles).

Media playback is set to only allow transcoding because a lot of my files have true hd as the default track and that's easier than explaining to my girlfriend to select a different audio stream. This way the tv switches to the next available audio stream automatically. In the dashboard the file reports to be direct playing, the playback reporting plugin marks it as direct streaming.
afbeelding.thumb.png.4f1a95786b8d905c9435577e05828c9b.png

Attached is the server log and the full media info for the file. I first tried to play the file around 2021-04-19 13:01 (skipped the playback a bit forward because the audio distortion only starts at around 2 minutes). A bit later I turned on debug logging and tried again.
I also tried to check what happens if opening the file using DLNA, but this results in transcoding.
Last thing I tried was updating the tv to firmware 5.00.60 which I had postponed for a while, but this didn't change anything.

Any idea what might be the problem?

media info.txt embyserver.txt

Link to comment
Share on other sites

SamES

I think I've got this same file but as an mkv, not an mp4.  Did you convert it to mp4, or is that the original format?  My file plays fine

A few questions:

  • Are you trying to play subs?  If so, turn them all off and see if it still has problems
  • Why have you turned off all the transcoding/re-encoding options?  When you do this you are forcing clients to DirectPlay in formats that are generally known not to work correctly.
  • If you turn these options back on, does it still DirectPlay?  If not, can you attach the ffmpeg logs as this will give us a better picture of what's going on.
Link to comment
Share on other sites

Ceten
Posted (edited)

It's the original file, I didn't convert it. As I understood these files are mp4 because they contain Dolby Vision, it was the same for WandaVision and I also have some movies like Wonder Woman 1984 which include both Dolby Vision and (lossy) Dolby Atmos. All of them played without issue so far except for this one.

Regarding turning of the transcoding/re-encoding options, I've done this so I don't need to remind my girlfriend not to select TrueHD audio tracks or edit every file to change the default audio track.
These TrueHD tracks are often the default tracks, but would result in transcoding as the LG oled tv's do not support them.
With the options turned off the tv automatically plays the next audio track which results in the files playing automatically using directplay.
That's fine for our use case as we only really use Emby on the tv and it handles everything I've thrown at it except for TrueHD audio and PGS subs (that's an easy fix as srt's are downloaded automatically and then used by default).
I think I posted a request a while back to automatically select a different track than TrueHD in the LG app but I don't think this was ever implemented.

Anyway I tried playing without subs but this resulted in the same error, then I turned on all the transcoding and re-encoding options, but the file still direct plays with the same audio distortion:
afbeelding.png.58b0d00f14d94d815ed9cd99e3190d6e.png

I've included the new log file and a video of the file playing on the tv. It's not very clear but you can hear the audio falling away regularly. This doesn't occur when playing the file from usb.

embyserver(1).txt

Edited by Ceten
typo
Link to comment
Share on other sites

SamES

OK, that all makes sense.  Thanks for clarifying.

If it is just this file that has the audio issue then I'm not really sure what options we have.  If it is DirectPlaying then the server and client are not really doing anything to the file.  It doesn't look like a really high bitrate file, so I can't see network speed being an issue.

I don't have any ideas, maybe @rbjtech may have some suggestions.  

You could try copying the streams to a new mp4 container, and if that doesn't work, try copying just the video and audio streams (no subs) to a new mp4 container.  I have seen files with lots of subs have playback issues.

 

  • Like 1
Link to comment
Share on other sites

roaku

Have you compared the bitrate for the eac3 audio of this file to the ones that are working correctly?

I know I have to reduce the audio bitrate of my rips to avoid audio dropouts when direct playing, although I use the Roku app.

I think 640 kb/s is the highest I've been able to go with eac3.

Edited by roaku
Link to comment
Share on other sites

rbjtech

So looking at the log - I have noticed something interesting.   

Starting @ 13:59 until 14:12 - the value of SqliteItemRepository: GetItems query time (slow) slowly increases from approx 1 second to 2.6 seconds.  If you look at the polling interval of these requests, they are every 2-3 seconds - the same time the audio stutters...

Any delay beyond a few hundred microseconds may be delaying the buffering process somewhere ?

Could this be related ?  I'm not 100% sure what this log entry is even doing - but as it repeats consistently, it's having a big system impact.

Have you tried disabling the DLNA features in emby ?  What plugins do you have loaded ?

GetItems query time (slow): 2575ms. Query: select A.type,A.data,A.Id,A.StartDate,A.EndDate,A.IsMovie,A.IsSeries,A.IsRepeat,A.CommunityRating,A.CustomRating,A.IndexNumber,A.IsLocked,A.PreferredMetadataLanguage,A.PreferredMetadataCountryCode,A.Width,A.Height,A.DateLastRefreshed,A.Name,A.Path,A.PremiereDate,A.Overview,A.ParentIndexNumber,A.ProductionYear,A.OfficialRating,A.ForcedSortName,A.RunTimeTicks,A.Size,A.Container,A.DateCreated,A.DateModified,A.guid,A.Genres,A.ParentId,A.IsInMixedFolder,A.DateLastSaved,A.LockedFields,A.Studios,A.Tags,A.OriginalTitle,A.CriticRating,A.IsVirtualItem,A.SeriesName,A.Album,A.AlbumId,A.SeriesId,A.PresentationUniqueKey,A.InheritedParentalRatingValue,A.Tagline,A.ProviderIds,A.Images,A.ProductionLocations,A.TotalBitrate,A.Artists,A.AlbumArtists,A.ExternalId,A.SeriesPresentationUniqueKey,A.Status,A.DisplayOrder,A.ThreeDFormat,UserDatas.Rating,UserDatas.IsFavorite,UserDatas.Played,UserDatas.PlayCount,UserDatas.PlaybackPositionTicks,UserDatas.LastPlayedDateInt,UserDatas.AudioStreamIndex,UserDatas.SubtitleStreamIndex from MediaItems A left join UserDatas on A.UserDataKeyId=UserDatas.UserDataKeyId And (UserDatas.UserId=@UserId) where IsFolder=@IsFolder AND IsVirtualItem=@IsVirtualItem AND MediaType=@MediaTypes AND TopParentId in (8,5,6,4,7) Group by PresentationUniqueKey ORDER BY SortName collate NATURALSORT ASC LIMIT 30 OFFSET 11280

This is the query which gets run every 2-3 seconds - what is it doing ?!

edit - also noticed this is being reported as a 24fps file, as opposed to a 23.976fps.  Are the other files that play ok also 24fps ?

Edited by rbjtech
  • Like 1
Link to comment
Share on other sites

Luke

Try removing these plugins:

	Addic7ed 1.0.8.0
	Statistics 2.0.19.0

Then restart the server and see if performance improves.

Link to comment
Share on other sites

Ceten

These are all the plugins I had installed:

  • Addic7ed: 1.0.8.0
  • Auto Box Sets: 1.2.5.0
  • Auto Organize: 1.5.9.0
  • Bluray Folder Support: 1.0.0.0
  • Cinema Intros: 1.0.35.0
  • Dlna: 1.0.39.0
  • Dvd Folder Support: 1.0.0.0
  • Fanart.tv: 1.0.10.0
  • IMVDb: 1.0.9.0
  • MovieDb: 1.3.8.0
  • MusicBrainz: 1.0.13.0
  • Nfo Metadata: 1.0.34.0
  • OMDb: 1.0.12.0
  • Open Subtitles: 1.0.27.0
  • Playback Reporting: 1.7.0.3
  • Port Mapper: 1.0.4.0
  • Reports: 1.0.44.0
  • Server Configuration Backup: 1.4.5.0
  • Statistics: 2.0.19.0
  • Studio Images: 1.0.3.0
  • TheAudioDb: 1.0.11.0
  • TheTVDB: 1.0.36.0
  • Webhooks: 1.0.14.0

I've uninstalled the Addic7ed, Statistics and Playback Reporting plugins, disabled DLNA and restarted the server but the file still had the audio distortion when played from Emby. It took a bit of time to figure out how to extract the streams and copy them to a new mp4 whilst retaining the Dolby Vision but I eventually managed to do it with mp4demuxer (https://github.com/DolbyLaboratories/dlb_mp4demux) and mp4muxer (https://github.com/DolbyLaboratories/dlb_mp4base).
I haven't found a way to include the subs in the new mp4 again but the file seems to play without issues now.


Must have been something really strange with the original file as it only had the distortion when played via the Emby app.
Thanks for all the input everyone!

  • Like 1
Link to comment
Share on other sites

rbjtech

Nice - well done. 👍

Post removing those plugins - It would be interesting to see if your system is no longer being hammered every couple of seconds - if you are ok with it - can you post another log playing the same content (with the non remux'd file) - you may have deleted the file  .. 🤪 

 

Link to comment
Share on other sites

  • 1 month later...
Ceten
On 4/23/2021 at 5:43 PM, rbjtech said:

Nice - well done. 👍

Post removing those plugins - It would be interesting to see if your system is no longer being hammered every couple of seconds - if you are ok with it - can you post another log playing the same content (with the non remux'd file) - you may have deleted the file  .. 🤪 

 

Hi sorry for the long delay, I've been busy with work and studying the past month, I didn't even get to actually finish this first episode of the falcon and the winter soldier🤪 I no longer have the original file but I remember looking into it at the time and I think this was coming from the Playback Reporting plugin but didn't occur again when testing the original file after your reply (and before removing the plugin) so I'm guessing it might have been caused by repeatedly starting and stopping the same episode to test it.

Link to comment
Share on other sites

  • 2 weeks later...
Luke
On 5/25/2021 at 5:23 AM, Ceten said:

Hi sorry for the long delay, I've been busy with work and studying the past month, I didn't even get to actually finish this first episode of the falcon and the winter soldier🤪 I no longer have the original file but I remember looking into it at the time and I think this was coming from the Playback Reporting plugin but didn't occur again when testing the original file after your reply (and before removing the plugin) so I'm guessing it might have been caused by repeatedly starting and stopping the same episode to test it.

So you haven't' seen it with any other files?

Link to comment
Share on other sites

Ceten

I just went through all logfiles on the server and found only 1 occurence in the log for yesterday evening. After rechecking I'm not sure it's related to the PlaybackReporting plugin?
I think that plugin only uses the PlaybackActivity table?

embyserver-63758793600.txt

Link to comment
Share on other sites

Luke
On 6/9/2021 at 10:31 AM, Ceten said:

I just went through all logfiles on the server and found only 1 occurence in the log for yesterday evening. After rechecking I'm not sure it's related to the PlaybackReporting plugin?
I think that plugin only uses the PlaybackActivity table?

embyserver-63758793600.txt 1.57 MB · 0 downloads

Hi @Ceten, for starters I would update to 4.6.2, and then I would reenable all of the options that you disabled in the first post. Please let us know if this helps. Thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...