Jump to content

Audio Direct Play


Recommended Posts

Adam Pessach
Posted

Hello again.

I've noticed another problem affecting the sound quality of some of my files. The problem is affecting video files that need to go through transcoding, so basically whenever I play a video with image-based subtitles (ASS\PGS), the audio file output is being transcoded as well. I've played some files with EAC3 audio tracks that should be played directly, only to see that media output is PCM stereo instead of Dolby Digital Plus. I own a SONOS soundbar, so I can see which type of audio format I'm receiving through its compatible app. I've also tried to play the same file without the subtitles and had no issues—both tracks were played directly. The odd thing is that on the website it says that the audio track is played directly—different than in reality.

Thank you for your time, and I hope you'll be able to solve this issue.

Posted

ASS shouldn't normally be causing transcoding, maybe you have changed a setting to cause transcode.

According to the logs, the file is being transcoded with EAC3 audio (DirectCopy).  Maybe the TV is doing something to it when it's in a transcoded container.

Adam Pessach
Posted

ASS and PGS always cause transcoding to the video while the "allow subtitle extraction on the fly" option is not checked. The problem I'm dealing with is that the audio track is converted to a different codec, although it can be played directly. I have even shown that when the ASS subtitles are disabled, the audio track is played directly with no problem whatsoever.

Posted
58 minutes ago, Adam Pessach said:

ASS and PGS always cause transcoding to the video while the "allow subtitle extraction on the fly" option is not checked.

Yes, that's why I suggested that you must have something changed as normally transcoding for ASS wouldn't normally be the case.  if you avoid transcoding ASS then you will also avoid the container change will prevent the PCM issue you are seeing.  It isn't a fix for the audio problem, but it avoids the issue that is causing the audio problem.

1 hour ago, Adam Pessach said:

The problem I'm dealing with is that the audio track is converted to a different codec, although it can be played directly

But this is not something that Emby is doing, it is something the TV is doing between it and the soundbar.  The log file shows that EAC3 audio is the only one being sent and it is a direct copy.

21:38:13.660   Stream #0:1 -> #0:1 (copy)

21:38:14.215   Stream #0:1(jpn): Audio: eac3, 48000 Hz, stereo, fltp, 224 kb/s (default)

 

Adam Pessach
Posted

I understand what you're saying. In the web client, it also points out that the audio is played directly, but this is definitely not a problem between the TV and the soundbar as the problem only occurs during transcoding, which happens from the PC\Emby. This is the reason why I bothered to show that in the soundbar's app the codec is different on those two occasions. I also suspected that in the log files it must show the same thing as in the web client (that the audio track is played directly). Needless to say, I'm not going to change my preferred settings, as it doesn't really solve the issue but ignores it.

Posted
6 hours ago, Adam Pessach said:

but this is definitely not a problem between the TV and the soundbar as the problem only occurs during transcoding, which happens from the PC\Emby. This is the reason why I bothered to show that in the soundbar's app the codec is different on those two occasions.

It probably is though, as Emby is delivering the file differently to the TV when the video is being transcoded, and so the TV/SoundBar appears to be handling it differently resulting it what appears to be PCM playback.

The only audio stream in your sample is EAC3, and that is being copied and sent as is, the server isn't touching the audio stream.  The Emby client cannot convert the EAC3 to PCM, but the TV can.

What setting do you have for Audio Output settings set to on the TV?

Adam Pessach
Posted

Digital Sound Output: Pass Through

DTV Audio Setting: Dolby Digital Plus

eARC Support: Checked

Posted

Can you try turning the eARC option off and see what happens?

Posted

And also try Auto instead of Pass through

Adam Pessach
Posted

I've tried all possible audio output settings on my TV, and the problem repeats itself only while transcoding. If what you suggest that the problem is not in the web client\PC is right, then perhaps the Emby TV app has a problem in seperating the audio track from the video track. I don't really know how the procedure works on a deeper level, but it is quite obvious to me that the problem must be on the Emby side, as the TV and soundbar are capable of outputing the right codec in the right circumstances. 

Posted

There is only one audio track in your source file and all Emby does when it transcodes the video is to chop up the audio into short segments and sends it with the matching video segments.

Aside from what the app says, how does it sound compared to DirectPlay when the app says DD Plus 2.0?  Keep in mind that your original source is only 2 channel stereo, so it's most likely that the way it is being delivered might be confusing the app, but it is probably playing exactly the same sound.

There appear to be many posts on Sonos and other forums with the Sonos App reporting unusual formats.

 

Adam Pessach
Posted

First of all, there is a significant difference in the sound when transcoding; it sounds much less clear and even lower compared to the video with no transcoding.

I am aware, of course, of the Sonos app problems, but usually after closing the Emby app and reopening it, it shows the right codec in the Sonos app. The Emby app has no problem with the fact that the audio track is 2 channels while it's not transcoding the file as I've shown in the attachments.

I also noticed a significant decline in video quality while transcoding.

Posted
On 22/11/2024 at 03:59, Adam Pessach said:

First of all, there is a significant difference in the sound when transcoding; it sounds much less clear and even lower compared to the video with no transcoding.

I am aware, of course, of the Sonos app problems, but usually after closing the Emby app and reopening it, it shows the right codec in the Sonos app. The Emby app has no problem with the fact that the audio track is 2 channels while it's not transcoding the file as I've shown in the attachments.

I also noticed a significant decline in video quality while transcoding.

It's still something the TV or Soundbar is doing.  The Emby client can't change the audio quality, and the server is sending the original audio track.

This sounds like a similar issue (it is an LG TV, not Samsung as he initially mentions) https://en.community.sonos.com/home-theater-229129/sonos-surround-set-up-stereo-pcm-6882237

Adam Pessach
Posted

It does, but it is slightly different.

I searched a bit, changed some TV audio settings, and restarted the entire system, and it didn't solve the issue.

I'll try to contact Sonos on the matter.

 

I thank you for your support. 🙂

Posted
6 hours ago, Adam Pessach said:

It does, but it is slightly different.

I searched a bit, changed some TV audio settings, and restarted the entire system, and it didn't solve the issue.

I'll try to contact Sonos on the matter.

 

I thank you for your support. 🙂

Hi, please let us know what they say. Thanks.

Adam Pessach
Posted

This is what I said: 

Hey, I own a Beam (Gen 2) and a Sub Mini that are connected via HDMI ARC to my LG TV (43UR80006LJ) and tackled a problem lately that I hope you can shed some light on.

 

I stream most of my media through my PC via a server that is connected to an app named ‘Emby’.

While using the SONOS app, I almost always check the type of the audio format, and it works great, but on specific occasions I get the Stereo PCM mark. 

This happens only when streaming movies or TV shows that have image-based subtitles (PGS\ASS) through the TV Emby app.

I use only EAC3 audio tracks in my Emby library, and whenever I enable the subtitles, I see the PCM mark.

Needless to say, this causes a drastic decrease in the quality of audio.

I’ve tried to ask if it’s a problem from the Emby client’s side, but it turns out that the audio file is a direct copy of the original EAC3 2.0 and should show the Dolby Digital Plus 2.0 mark instead, but it does not.

 

At the moment I’m having difficulties tracking where this problem comes from and tried to change several TV settings from tips you’ve given to people who suffer similar issues.

My TV settings are:

HDMI Input Audio Format: Bitstream

Digital Sound Out: Pass Through

DTV Audio Setting: Dolby Digital Plus

eARC Support: ✅

Adam Pessach
Posted

This is the response:

The Beam will decode and play whatever format the LG sends to it over the eArc connection. If it is reporting Stereo PCM then it suggests something before the beam is decoding the Dolby Digital 2.0 to PCM.

 

If the Emby server is embedding the Dolby digital 2.0 as is rather than as stereo pcm when it adds the subtitles to the video, then it suggests either the Emby Client or the LG TV is decoding the 2.0 Dolby digital audio to stereo PCM before sending it, so the Beam receives PCM rather that the encoded Dolby Digital.

 

If the audio is in sync, then whether the Beam, the TV or the PC/Client decodes to 2.0 shouldn’t matter as they should all decode the same.

Posted

During playback, go to the transcoding temp folder on the server and grab one of the .ts segments and check its format with mediainfo.  

Adam Pessach
Posted

I've checked one of the .ts segments manually (opened the file with MPC-HC), and the audio track is a direct copy as you suggested. Additionally, I tried extracting the same subtitles and playing the file with them, but the subtitles lost their fonts, looked different, and had a significant delay.

Adam Pessach
Posted

I wanted to add that when I play the file with the extracted subtitles, the audio is transferred correctly.

I also did a test and copied and pasted one of the .ts segment files to see if there was a problem with the sound, and the audio was transferred correctly as well.

I suspect that the problem occurs somewhere between the Emby PC client and the LG Emby app, causing the TV/Soundbar to change the audio codec. 

Posted
46 minutes ago, Adam Pessach said:

I wanted to add that when I play the file with the extracted subtitles, the audio is transferred correctly.

I also did a test and copied and pasted one of the .ts segment files to see if there was a problem with the sound, and the audio was transferred correctly as well.

I suspect that the problem occurs somewhere between the Emby PC client and the LG Emby app, causing the TV/Soundbar to change the audio codec. 

Pretty certain it's the TV doing it.  

Adam Pessach
Posted

I noticed that the PCM stereo issue also occurs when playing FLAC audio tracks. FLAC is not a supported format by LG, so it makes sense that the TV is doing it.

The question is if perhaps there is a way to choose which encode type the video transcodes into. I saw that the .ts segment is of a different encode than the original file, and it could be the problem.

The .ts segment encoder: h264 L4.0, yuv420p, 1920x1080

The original encoder: hevc main 10, yuv420p10le, 1920x1080

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
×
×
  • Create New...