Jump to content

App 1.0.37 forces h265 to h264 transcoding if audio not supported


Painkiller8818

Recommended Posts

Painkiller8818

Server: 4.7.11.0 WIN

Client 1.0.37
TV: OLED C2

 

Hi,

 

Today i updated to app version 1.0.37 and now i see every movie with an unsupported audio codec like DTS, DTS-HD or TRUEHD is also forcing the Video to transcode to h264 non HDR

 

I disabled subtitles to be sure it is not because of the subs.

image.png.491875b55f480d6311fb9d26f48f1242.png

 

 

ffmpeg-transcode-ac135299-fa18-482d-9219-f91dfd71979c_1.txtembyserver.txt

 

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

EmbyParty

I have the same problem (on lg cx) with emby server on an asustor nas. Please fix this bug.

Edited by EmbyParty
Link to comment
Share on other sites

Painkiller8818
18 minutes ago, Nathanael said:

How so? From the screenshot is looks like you use hardware encoding with more then enough fps for a smooth playback.

 

sure thats not the problem but if an audio codec is not supported, also the vido gets transcoded to h264 NON HDR so no way to get a direct play with HDR

 

Link to comment
Share on other sites

Painkiller8818

my tv does not switch to HDR if the audio codec gets transcoded and as you can see in the screenshot the video gets transcoded to a non HDR instead of direct play

Link to comment
Share on other sites

I also have an LG OLED C2, this issue now prevents me from enjoying HDR content when it has DTS or TrueHD audio, only content with Dolby Digital audio works right now in HDR.

But I have found a workaround using nginx (I am using swag as reverse proxy).
Replace the proxy_pass line

proxy_pass $upstream_proto://$upstream_app:$upstream_port;

with the following code below:

# Fixes force transcoding to h264 on LG WebOS by replacing "VideoCodec=h264&" with "VideoCodec=h264,h265,hevc&" if the User-Agent contains "(Web0S; Linux/SmartTV)"
# Remove this code block once the following issue has been fixed:
# https://emby.media/community/index.php?/topic/115018-app-1037-forces-h265-to-h264-transcoding-if-audio-not-supported/
# Start Workaround
set $newrequest_uri $request_uri;
if ($request_uri ~* ^(.*[?&])VideoCodec=h264&(.*)$) {
    set $replacedrequest_uri $1VideoCodec=h264,h265,hevc&$2;
}
if ($http_user_agent ~* "\(Web0S; Linux\/SmartTV\)") {
    set $newrequest_uri $replacedrequest_uri;
    rewrite ^$request_uri $newrequest_uri last;
}
proxy_pass $upstream_proto://$upstream_app:$upstream_port$newrequest_uri;
#End Workaround
		
# Uncomment when workaround above is removed
# proxy_pass $upstream_proto://$upstream_app:$upstream_port;

 

It works fine on my TV. The audio is not out of sync. Tested with a 4K HEVC HDR10 video and DTS-HD MA audio.

REMEMBER: This is a hacky workaround, don't forget to remove this code again from the reverse proxy when a fix is ready, otherwise it may lead to other problems.

Also, I can't promise that everything works. But it just tells the server that it supports h265 and hevc too, and that should always be the case for the LG TV (webOS).

Link to comment
Share on other sites

Painkiller8818
4 hours ago, JBou said:

I also have an LG OLED C2, this issue now prevents me from enjoying HDR content when it has DTS or TrueHD audio, only content with Dolby Digital audio works right now in HDR.

But I have found a workaround using nginx (I am using swag as reverse proxy).
Replace the proxy_pass line

proxy_pass $upstream_proto://$upstream_app:$upstream_port;

with the following code below:

# Fixes force transcoding to h264 on LG WebOS by replacing "VideoCodec=h264&" with "VideoCodec=h264,h265,hevc&" if the User-Agent contains "(Web0S; Linux/SmartTV)"
# Remove this code block once the following issue has been fixed:
# https://emby.media/community/index.php?/topic/115018-app-1037-forces-h265-to-h264-transcoding-if-audio-not-supported/
# Start Workaround
set $newrequest_uri $request_uri;
if ($request_uri ~* ^(.*[?&])VideoCodec=h264&(.*)$) {
    set $replacedrequest_uri $1VideoCodec=h264,h265,hevc&$2;
}
if ($http_user_agent ~* "\(Web0S; Linux\/SmartTV\)") {
    set $newrequest_uri $replacedrequest_uri;
    rewrite ^$request_uri $newrequest_uri last;
}
proxy_pass $upstream_proto://$upstream_app:$upstream_port$newrequest_uri;
#End Workaround
		
# Uncomment when workaround above is removed
# proxy_pass $upstream_proto://$upstream_app:$upstream_port;

 

It works fine on my TV. The audio is not out of sync. Tested with a 4K HEVC HDR10 video and DTS-HD MA audio.

REMEMBER: This is a hacky workaround, don't forget to remove this code again from the reverse proxy when a fix is ready, otherwise it may lead to other problems.

Also, I can't promise that everything works. But it just tells the server that it supports h265 and hevc too, and that should always be the case for the LG TV (webOS).

thanks for the workaround, but i am using emby internally and i don't wanna set up nginx to workaround something the emby team should fix :)

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

caaptusss

@Luke It's a very big problem with this last update.

All content with HEVC/H265 (HDR or not) is transcoded if the audio codec is not supported by the LG hardware.

And, on LG, the DTS, DTSMA, DTS-HD and others DTS codecs are not played by LG. Before your update, the content was played with only the audio in transcoding mode. The video was directly play by the LG Hardware.

Now, all content, Video+audio are transcoded by the Emby Server. And, as i didn't have any GPU on the server for the moment, the decoding is made by the CPU. The capacity of this CPU is not enougt to permit a good playing (~15 FPS max).

So, with the new update, about 50% of my 4K movies are not playable on LG TV. And for me, it's a very big problem because it's my standard since i'm using Emby, i bought a LG TV for that !

Please, can you propose a urgent update on the server side to force the video to be play directly by the LG hardware ? I know than LG did not validate any update before a long time.

Thanks,

Edited by caaptusss
faute
  • Like 2
  • Agree 1
Link to comment
Share on other sites

I solved this Problem by:

Updating to the latest beta server version of Synology (i think 4.0.8.21).

Then go to your User Settings (On Android,Web,Windows)

Go to your User that you want to play on your LG Tv. 

Look for the Playback Settings and unmark Video Transcoding.

Now it will transcode the DTS, DTS-HD, TrueHD etc. And subtitles. But the Video is untouched (direct Play,) WITH HDR.

This only works for your Home Network (lan)

Otherwise it says no compatible streams etc. If you want to play over (WAN,Internet) you need to check the video transcoding again.

Or you create an User only for the LG App

 

Cheers

Edited by DerFox
  • Thanks 2
Link to comment
Share on other sites

dachsonaut

Thank you very much DerFox for this hint!! - I can confirm this working with QNAP Server Version 4.7.11.0 and actual LG Client Version (1.0.37, via LAN/local) too!

BR

Edited by dachsonaut
Link to comment
Share on other sites

EmbyParty

Yep, works, cool. Thanks!👍

 

(first I got the wrong emoji, apologize)

Edited by EmbyParty
Link to comment
Share on other sites

Uhm is this the reason why 4K HDR content suddenly gets some minor freezings/stuttering when playing?

 

Stats for nerds says directplay though.

Link to comment
Share on other sites

2 hours ago, Utini said:

Uhm is this the reason why 4K HDR content suddenly gets some minor freezings/stuttering when playing?

 

Stats for nerds says directplay though.

@Utini 

 

Hi there, let's look at an example. Please attach the information requested in how to report a media playback issue. Thanks!

 

Link to comment
Share on other sites

tobimai

Just wanted to chime in, I have the same problem. I am 100% sure it worked fine before, but I can't really say when. When disabling video transcoding HEVC works fine but AV1 HDR fails with "no compatible stream"

Edited by tobimai
Link to comment
Share on other sites

On 1/9/2023 at 12:34 AM, Luke said:

@Utini 

 

Hi there, let's look at an example. Please attach the information requested in how to report a media playback issue. Thanks!

 

Hi there,

I just played the file exactly until a freeze happened. Once the freeze was over I stopped and opened the log file.

log file + mediainfo of the video file are attached.

mediainfo.txt embyserver.txt

  • Thanks 1
Link to comment
Share on other sites

On 1/11/2023 at 5:13 PM, caaptusss said:

Any news about this problem please ?

Hi, we are looking into it. Thanks.

Link to comment
Share on other sites

KodiTV72

Is this a client issue or server side issue?

A few things changed for me in December around the time I was making some changes. Synology update, LG app update (LG C9).

Now a lot of 4K with high audio codecs cause transcoding that my Synology cannot cope with. Content that previously worked no longer does. It also seems to be causing issues with my Chromecast with Google TV 4k. (but I only just installed Emby on this, I have never previously had the Chromecast working).

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