Jump to content

LG Smart TV App is encoding although not necessary


Recommended Posts

Hi,

i bought a new LG TV (LG TV OLED65C7D).

 

This TV is able to play as good as everything (h264,x265,wmv,divx,xvid) without the need of encoding anything.

I managed to adjust the DLNA Profile LG SMART TV so that all content is now played without encoding.

 

BUT... playing the same files via Emby LG Smart TV App the files are still being encoded altough thats not necessary :-/

 

Is there a config file analog to ...\config\dlna\user\LG Smart TV.xml that tells the app whether a file has to be encoded or not?

 

Thx & greetz

 

Edited by nanuk
Link to post
Share on other sites

@@nanuk

 

Can you show us the adjustements you did to edit the C7 dlna profile please? I've got a 55C8. Thx.

 

of course... see my attached LG Smart TV.xml

 

just copy this to your \Emby\programdata\config\dlna\user\ directory and restart emby

 

let me know if this worked for you ;-)

 

greetz

LG Smart TV.xml

Edited by nanuk
Link to post
Share on other sites

Hi there, can we please look at an example? Please attach the information requested in how to report a media playback issue. thanks !

 

Hi Luke,

of course I will put an example like discribed in the topic above BUT...

 

I found out that the LG Smart TV App always starts to encode when choosing an audio stream whitch is not the first/default audio stream.

And the audio format doesn't matter at all... switching the audio stream always starts an ffmpeg.exe process.

 

This might be a general bug in the Emby LG Smart TV App. 

 

Greetz

Link to post
Share on other sites

Hi Luke,

of course I will put an example like discribed in the topic above BUT...

 

I found out that the LG Smart TV App always starts to encode when choosing an audio stream whitch is not the first/default audio stream.

And the audio format doesn't matter at all... switching the audio stream always starts an ffmpeg.exe process.

 

This might be a general bug in the Emby LG Smart TV App. 

 

Greetz

 

This is correct behaviour as the LG player does not support audio channel switching, so any track that is not the first audio track is switched on the server and the file is streamed instead of DirectPlay.  Quality won't be affected, the original format video and audio track is played without any transcoding, the tracks are just streamed in their original format in a new container.  I think the built in DLNA player has functionality (such as audio track switching) which is not available in the app based player.

Edited by SamES
Link to post
Share on other sites

This is correct behaviour as the LG player does not support audio channel switching, so any track that is not the first audio track is switched on the server and the file is streamed instead of DirectPlay.  Quality won't be affected, the original format video and audio track is played without any transcoding, the tracks are just streamed in their original format in a new container.  I think the built in DLNA player has functionality (such as audio track switching) which is not available in the app based player.

"Quality won't be affected" <--  I'm sorry to correct you... after switching the audio track the playback begins to stutter every 5 to 10 seconds, which means it plays, stops, hangs for a second, and plays on...  :-/

switching back to the first audio track and everything is fine again. this bahavior is only when playing 4K HDR content, 1080p is working fine after switching audio tracks

and there is no prob @cpu (10 to 20%) or @@lan capacity (about 60-80 mbit/s @@gigabit LAN) 

So switching the audio track on 4K movies is not possible at the moment (testet with 4K HDR Remuxes from The greatest Showman, Star Wars XIII, Die Hard and the bourne identity) All 4 Remuxes showing the same behavior.

Edited by nanuk
Link to post
Share on other sites

What I mean, if you check stats for nerds, the video track should still be in the original format, the video will be untouched, but it is possible that in the process of streaming it that there is being introduced a problem.

 

Although there could also be something else going on.  If you could provide a log file, that may help.

 

Thanks

Link to post
Share on other sites

If you could provide a log file, that may help.

 

 

No problem to get you a log file... 

 

do you need a part of the "embyserver.txt" or do you need a log(s) naming like this -> "ffmpeg-remux-85984a49-8aa4-4972-bf83-68fa630a85fb.txt"?

Edited by nanuk
Link to post
Share on other sites

Hi Luke,

I restarted emby server (to get a new log) and startet a 4K Remux after about a minute I switched the audio track from DTS German (first/default track) to DTS English

which has been encoded to DD 5.1 and the movie started to stutter as discribed above ;-)

 

I attach the logs ;-)

 

embyserver.txt

ffmpeg-remux-bb7dde7d-f851-4810-92bd-6c9a9470a5ef.txt

ffmpeg-remux-1bc9db74-9fc7-4194-a939-6a83ab096867.txt

Link to post
Share on other sites
Luke

Ok, this is just a remux. It's not transcoding. This is happening due to secondary audio. Although the audio track is supported by the LG video player, there's no way to tell it to switch to that track. At least I don't believe there is as I've looked through their sdk docs. So in order to activate that track we have to use the server to remux and make it the primary track.

Link to post
Share on other sites

I think also it doesn't help that the video track is 70Mbit.  Does it play fine when you select the default track and allow it to DirectPlay without any remuxing?

 

If I'm reading your post correctly, you started playback with the remuxed track, then you switched to the default track (DirectPlay) then it started to stutter?  Correct

Link to post
Share on other sites

Ok, this is just a remux. It's not transcoding. This is happening due to secondary audio. Although the audio track is supported by the LG video player, there's no way to tell it to switch to that track. At least I don't believe there is as I've looked through their sdk docs. So in order to activate that track we have to use the server to remux and make it the primary track.

 

Hi Luke,

ok, I understand that switching to the secondary audio track causes the emby player to remux to make the secondary the primary track. so far so good... BUT... this isn't the whole truth :-)

switching the the secondary audio track also transcodes the secondary audio track from DTS to Dolby Digital (as shown in the display of my AV-Receiver ;-)) and that shall not happen if you just remux the track order, correct?

 

 

I think also it doesn't help that the video track is 70Mbit.  Does it play fine when you select the default track and allow it to DirectPlay without any remuxing?

 

If I'm reading your post correctly, you started playback with the remuxed track, then you switched to the default track (DirectPlay) then it started to stutter?  Correct

 

No that's not correct! 

I started playback with the primary/default audio track and all plays fine, then I switched to the secondary audio track and after a few seconds the playback began to stutter.

After switching back from the secondary track to primary track the video is playing fine and without probs again.

 

So I think it's clear (tested it with 4 different remuxes and all with the same result)... as soon as I switch to an audio track that isn't the primary/default audio track the video playback begins to stutter and hangs.

Maybe there is a bug somewhere in the emby player, because as I described above the secondary audio seems not just being remuxed but encoded to another format (DTS to Dolby Digital).

 

by the way... using the emby dlna server all works fine just a pity that the interface of dlna is so damn ugly :-)))

Link to post
Share on other sites
Luke

Hi Luke,

ok, I understand that switching to the secondary audio track causes the emby player to remux to make the secondary the primary track. so far so good... BUT... this isn't the whole truth :-)

switching the the secondary audio track also transcodes the secondary audio track from DTS to Dolby Digital (as shown in the display of my AV-Receiver ;-)) and that shall not happen if you just remux the track order, correct?

 

Because anytime we have to remux, we use the HLS protocol, and that doesn't support carrying DTS.

Link to post
Share on other sites
martycirkus

of course... see my attached LG Smart TV.xml

 

just copy this to your \Emby\programdata\config\dlna\user\ directory and restart emby

 

let me know if this worked for you ;-)

 

greetz

Great thx nanuk, I will try it!  ;)

Nice! Works well with a 55C8, 4k HDR etc...

Edited by martycirkus
Link to post
Share on other sites
martycirkus

By the way, is there any interests for me to use Nvidia NVENC in the hardware acceleration transcoding options?

I have a Hackintosh on 10.13.4 with i7 4790, 32go ram, and gtx 1070 (8go ram) with latest nvidia drivers and Cuda drivers.

Edited by martycirkus
Link to post
Share on other sites
Luke

By the way, is there any interests for me to use Nvidia NVENC in the hardware acceleration transcoding options?

I have a Hackintosh on 10.13.4 with i7 4790, 32go ram, and gtx 1070 (8go ram) with latest nvidia drivers and Cuda drivers.

 

Our ffmpeg builds for Mac currently do not include NVENC support but it's something we can look at adding in the future. Thanks.

Link to post
Share on other sites
martycirkus

This is correct behaviour as the LG player does not support audio channel switching, so any track that is not the first audio track is switched on the server and the file is streamed instead of DirectPlay.  Quality won't be affected, the original format video and audio track is played without any transcoding, the tracks are just streamed in their original format in a new container.  I think the built in DLNA player has functionality (such as audio track switching) which is not available in the app based player.

 

I will "repatriate" my other thread: https://emby.media/community/index.php?/topic/58998-4k-content-and-the-emby-lg-app/?p=580379

 

@@Luke

I understand a little bit more now,  but why the 7.1 direct stream stutters a lot more than the 5.1 direct stream? Bitrates?

 

When I use the LG Player and DLNA (with the nanuk's lg profile) I can see 4 audio tracks and can toggle between them. The same with a Serviio DLNA server.

For both DLNA I can direct play but with too much stuttering... Unwatchable...

Link to post
Share on other sites

Is it possible the bitrate is just too high, similar to when direct playing?

 

I think what martycirkus describes the bitrate may really too high for direct playback. Maybe he has a wlan connection or just a 100mbit LAN?!?

 

In my case wether the LAN connection nor the CPU is too slow for direct playback as all is played nice and smooth via DLNA Direct Stream and via Emby Direct Stream (with first/default audio track selected)

Link to post
Share on other sites
martycirkus

I think what martycirkus describes the bitrate may really too high for direct playback. Maybe he has a wlan connection or just a 100mbit LAN?!?

 

In my case wether the LAN connection nor the CPU is too slow for direct playback as all is played nice and smooth via DLNA Direct Stream and via Emby Direct Stream (with first/default audio track selected)

It's strange because I have an up to 860 Mbps  (optical fiber) lan connection (lg tv plugged to the internet box)...

Direct play stutters/buffers too much with every audio tracks.

Direct stream does the same with the 7.1 track, but with the 5.1 track everything is (nearly) smooth...

post-307492-0-91796300-1527031681_thumb.png

Link to post
Share on other sites
  • 3 weeks later...

Hijacking this because i have exactly the same issue and its keeping me from using emby, which i prefer over Plex for several reasons.

I have a Synology DS918+ and a LG C7 Oled and everytime i play 4K mkv movies and change from the default audio track emby goes from direct play to direct streaming. There seems to be no transcoding what so ever, it only remuxes it.

The issue is, the direct streaming causes my 4K HEVC Movies (The Revenant for example has 56mbit/s) to lag every minute or so and the 918+ gets crazy loud. The odd thing is, it seems to be fast enough, the red direct stream progress bar is far ahead of the green and the cpu is only at 25% with 3 Cores activated (tried without and with VA hardware-acceleration).

Forcing it to direct play makes the non-default audio unavailable, its shown but the audio track doesnt change.

 

Plex and LG DLNA both dont have this issue. They cause zero increased CPU demand and work like they should be with Plex showing direct play with the non-default audio track. That is the reason im stuck with Plex right now, since i only watch in English myself, but German with my friends and family.

 

Does anybody here know a workaround for this issue or if i might be doing something wrong? Im farely new to this with only basic knownledge about it. It seems to be technically possible, otherwise Plex wouldnt be able to do it, but i cant get it to work.

Thank you in advance

Link to post
Share on other sites

Hijacking this because i have exactly the same issue and its keeping me from using emby, which i prefer over Plex for several reasons.

I have a Synology DS918+ and a LG C7 Oled and everytime i play 4K mkv movies and change from the default audio track emby goes from direct play to direct streaming. There seems to be no transcoding what so ever, it only remuxes it.

The issue is, the direct streaming causes my 4K HEVC Movies (The Revenant for example has 56mbit/s) to lag every minute or so and the 918+ gets crazy loud. The odd thing is, it seems to be fast enough, the red direct stream progress bar is far ahead of the green and the cpu is only at 25% with 3 Cores activated (tried without and with VA hardware-acceleration).

Forcing it to direct play makes the non-default audio unavailable, its shown but the audio track doesnt change.

 

Plex and LG DLNA both dont have this issue. They cause zero increased CPU demand and work like they should be with Plex showing direct play with the non-default audio track. That is the reason im stuck with Plex right now, since i only watch in English myself, but German with my friends and family.

 

Does anybody here know a workaround for this issue or if i might be doing something wrong? Im farely new to this with only basic knownledge about it. It seems to be technically possible, otherwise Plex wouldnt be able to do it, but i cant get it to work.

Thank you in advance

 

Hi there, let's look at an example. Please see how to report a media playback issue. thanks !

Link to post
Share on other sites

I hope i provided what you need, i attached the logs and additional images to show what i see.

 

I tested 2 movie cases here:

 

First Drive 1080p, DTS 5.1 both audio tracks and second Blade Runner 4K, Dolby Digital 5.1 both audio tracks, both movies are HEVC.

 

 

1. Drive 1080p HEVC, non-default audio track (English DTS 5.1), direct stream:

Starts up with no problems, emby uses direct streaming and audio and video is smooth to the point around when the red buffer hits 100 percent and then strangly the video and audio starts to have lags every few seconds. At that point unwatchable.

 

2. Drive 1080pHEVC, default audio track (German DTS 5.1), direct play:

Plays like how it should be. No lags no buffering no nothing.

 

3. Blade Runner 4K HEVC, non-default audio track (English Dolby Digital 5.1), direct stream:

Black Screen for like 10 Seconds until movie starts. Then no problems playing until it hits minute 4:30 or so, then lags every few seconds. The red direct streaming buffer is maybe at 35 percent.

 

4. Blade Runner 4K HEVC, default audio track (GermanDolby Digital 5.1), direct play:

Plays like how it should be. No lags no buffering no nothing.

 

Subtitles seem to trigger transcoding, so no subtitles on on both movies.

Thanks for looking into it, if you need more information or clarification please ask.

server_log.txt

ffmpeg-remux-drive.txt

ffmpeg_remux-blade_runner.txt

post-321947-0-64053200-1528827591_thumb.png

post-321947-0-17159800-1528827599_thumb.png

post-321947-0-36990300-1528827607_thumb.png

post-321947-0-25478900-1528827614_thumb.png

post-321947-0-66080300-1528827631_thumb.png

post-321947-0-96875400-1528827691_thumb.png

post-321947-0-30025400-1528827715_thumb.png

post-321947-0-93909700-1528827734_thumb.png

Link to post
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...