Youtube HDR not working on 2016 LG OLEDs - workaround tutorial - Windows 10 x64 - AVS Forum | Home Theater Discussions And Reviews
Forum Jump: 
 9Likes
  • 5 Post By Jorgeminator
  • 3 Post By Reda
  • 1 Post By Reda
 
Thread Tools
post #1 of 16 Old 04-18-2017, 03:35 PM - Thread Starter
Newbie
 
Join Date: Apr 2017
Location: Finland
Posts: 9
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 2 Post(s)
Liked: 5
Youtube HDR not working on LG B6/C6/E6 OLEDs - workaround tutorial - Windows 10 x64

If you are reading this you probably know that the B6/C6/E6-series currently lack support for Youtube HDR through the native Youtube app. This is due to the fact that these TVs only support 8-bit VP9 decoding (LGs website: "VP9 Decoder 4K@60fps, 8bit"), while Youtube HDR requires 10-bit VP9 (VP9 Profile 2) decoding support, which among the 2016 models can only be found on the G6.

The easiest way to get around this problem would be to grab a Chromecast Ultra which decodes the stream and presents it in a compatible format, but most of us who bought an expensive B6/C6/E6 OLED HDR TV would have expected it to also support Youtube HDR without having to buy extra equipment.

In this step-by-step guide I will show you how to download the Youtube streams and encode them in a B6/C6/E6 compatible format. Luckily, since the lack of VP9 Profile 2 is the only obstacle for viewing Youtube in HDR, we can encode the stream into the HEVC format while preserving the HDR metadata. After that you can play the file from a USB drive, stream it through your home network etc.




Step 1: Downloading the Youtube stream

Create a working directory, I've put mine on the desktop for quick access.

Download the latest youtube-dl.exe from https://github.com/rg3/youtube-dl/releases and place it in your working directory. This will be used to download the Youtube streams to your PC.

Navigate to the working directory, do a Shift+RightClick, and choose Open PowerShell window here.



To view the formats available for a specific Youtube video, enter
Code:
youtube-dl -F https://www.youtube.com/watch?v=tO01J-M3g0U
and press Enter. Change the link to your specific video.



To download the HDR stream, look for a stream with vp9.2 in the note field. Find the stream with the best resolution (likely 3840x2160) and take note of the format number of that stream, in my example 337. Notice that the streams are split into video only and audio only, so you also need to take note of the audio format number. Find the stream with the Vorbis codec (Opus won't work on the TV) and remember the format number. Now, enter the following into PowerShell and swap the numbers and link to those of your video:
Code:
youtube-dl -f 337,171 -o %(title)s.f%(format_id)s.%(ext)s https://www.youtube.com/watch?v=tO01J-M3g0U
The video and audio files should start downloading.



You should now have two separate files (video and audio) in your working directory.



Step 2: Encoding the video with ffmpeg

Download my precompiled version of ffmpeg with x265 10-bit support from here: https://mega.nz/#!eZZ20BIa!djktsb7Q6...JJqSmZYwmlUhp4

Unzip the content somewhere.

Go to Control Panel -> System and Security -> System -> Advanced system settings -> Environment Variables
Under System variables, double-click the Path variable, click New, then browse. Mark the ffmpeg folder and press OK. Press OK a few more times until you have closed the remaining windows.

From your working directory, open up another PowerShell instance the same way as in Step 1, or use the old one.

Enter the following (including the quotes), just swap the video name in the beginning to the name of your downloaded video file, enter your preferred output name at the end, and press Enter:
Code:
ffmpeg -i '.\The World in HDR in 4K (ULTRA HD).f337.webm' -c:v libx265 -x265-params "colorprim=bt2020:transfer=smpte-st-2084:colormatrix=bt2020nc:master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,10):max-cll=0,0" -crf 16 '.\The World in HDR in 4K (ULTRA HD).hevc'


Ffmpeg should start encoding your video to the HEVC format, it's a heavy process and it will take some time for it to finish, so go grab a cup of coffee while you wait. The CRF value can be changed, but since we're encoding a video that has been encoded once before it should be pretty low to preserve the picture quality. I would strongly advise against going below CRF 16, though, since output files with CRF 14 weren't recognized on my B6.



Step 3: Mux the HEVC-encoded video with the audio

Download MKVToolNix from here: https://mkvtoolnix.download/downloads.html#windows, then install it.

Open MKVToolNix and click Add source files. Select your .hevc file you just encoded with ffmpeg and the .webm audio file you downloaded earlier. Choose an output location for the destination file and edit the name of the output file to your liking. Then press Start multiplexing. The process should take only a few seconds with an SSD, slightly more on an HDD.




And there you have it, your file is now ready to be viewed on your LG OLED TV. If everything went correctly, the TV should automatically switch to HDR mode when playing the file.

Last edited by Jorgeminator; 05-03-2017 at 11:17 AM.
Jorgeminator is offline  
Sponsored Links
Advertisement
 
post #2 of 16 Old 04-18-2017, 04:04 PM
AVS Forum Special Member
 
JonW747's Avatar
 
Join Date: Jan 2007
Posts: 1,083
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 131 Post(s)
Liked: 65
Thanks for the work-around, but personally it's a feature I'm looking for in a UHD Player as that market matures.
JonW747 is offline  
post #3 of 16 Old 04-19-2017, 01:55 AM
Newbie
 
Reda's Avatar
 
Join Date: Jul 2009
Posts: 9
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 5 Post(s)
Liked: 4
It's a shame LG haven't updated their 2016 OLED TVs yet. They were the first to demo Youtube HDR on CES 2016.
Samsung already released an update for all 2016 UHD and SUHD TVs.
Reda is offline  
 
post #4 of 16 Old 04-19-2017, 03:08 AM - Thread Starter
Newbie
 
Join Date: Apr 2017
Location: Finland
Posts: 9
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 2 Post(s)
Liked: 5
Quote:
Originally Posted by Reda View Post
It's a shame LG haven't updated their 2016 OLED TVs yet. They were the first to demo Youtube HDR on CES 2016.
Samsung already released an update for all 2016 UHD and SUHD TVs.
From what I've heard the VP9 Profile 2 needs to be supported in the hardware, apparently only the G6 has hardware support for VP9 Profile 2. I wouldn't hold my breath waiting for a firmware supporting VP9 Profile 2, since the limited support seems to be a hardware limitation. Don't take my word for it, though. I could be wrong.
Didn't the C6/E6/G6 all use the same SoC, btw? Seems weird that the G6 would be getting Youtube HDR, even though it has the same chip as the C6/E6...

Last edited by Jorgeminator; 04-19-2017 at 03:12 AM.
Jorgeminator is offline  
post #5 of 16 Old 04-19-2017, 04:43 AM
Newbie
 
Reda's Avatar
 
Join Date: Jul 2009
Posts: 9
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 5 Post(s)
Liked: 4
Quote:
Originally Posted by Jorgeminator View Post
From what I've heard the VP9 Profile 2 needs to be supported in the hardware, apparently only the G6 has hardware support for VP9 Profile 2. I wouldn't hold my breath waiting for a firmware supporting VP9 Profile 2, since the limited support seems to be a hardware limitation. Don't take my word for it, though. I could be wrong.
Didn't the C6/E6/G6 all use the same SoC, btw? Seems weird that the G6 would be getting Youtube HDR, even though it has the same chip as the C6/E6...
I doubt it's a hardware limitation.

The G6 uses an in-houe chip called H15. It can be found on some older 2015 TVs like the EF950, which also lack VP9.2 support.

The E6 and C6 both use a more recent in-house chip called M16 (which probably wasn't ready for the G6). I don't think they would have dropped VP9.2 support making a more recent chip.

Even the Realtek chip which equips the entry-model B6 seems to have VP9.2 support:
Quote:
The Realtek RTD2999 Smart 4K TV System-On-Chip (SoC) is the world’s first TV single-chip controller to integrate Dolby HDR (High Dynamic Range) technology, and greatly increases Video Pixel Quality enhancement to present a vivid entertainment experience with detailed pixel contrast processing. The RTD2999 features a built-in quad-core 64-bit ARM CPU and high-performance 3D GPU. It supports the latest H.265 (HEVC) 4k60p 10-bit and VP9 4k60p 10-bit decoding. The versatile I/O device interfaces include HDMI-2.0/HDCP-2.2, Gigabit Ethernet, and USB 3.0/2.0, providing multiple and flexible extension applications.

Last edited by Reda; 04-19-2017 at 04:47 AM.
Reda is offline  
post #6 of 16 Old 04-19-2017, 05:55 AM - Thread Starter
Newbie
 
Join Date: Apr 2017
Location: Finland
Posts: 9
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 2 Post(s)
Liked: 5
Quote:
Originally Posted by Reda View Post
I doubt it's a hardware limitation.

The G6 uses an in-houe chip called H15. It can be found on some older 2015 TVs like the EF950, which also lack VP9.2 support.

The E6 and C6 both use a more recent in-house chip called M16 (which probably wasn't ready for the G6). I don't think they would have dropped VP9.2 support making a more recent chip.

Even the Realtek chip which equips the entry-model B6 seems to have VP9.2 support:
Thank you, I didn't know which specific chipset the different models incorporated



Strange that they left out the 10-bit part from the VP9 codec.
Jorgeminator is offline  
post #7 of 16 Old 04-19-2017, 06:37 AM
Senior Member
 
mttpalmer's Avatar
 
Join Date: Mar 2006
Location: New England
Posts: 320
Mentioned: 0 Post(s)
Tagged: 1 Thread(s)
Quoted: 186 Post(s)
Liked: 103
Quote:
Originally Posted by Reda View Post
The G6 uses an in-houe chip called H15. It can be found on some older 2015 TVs like the EF950, which also lack VP9.2 support.

The E6 and C6 both use a more recent in-house chip called M16 (which probably wasn't ready for the G6). I don't think they would have dropped VP9.2 support making a more recent chip.
The G6 uses the LG1210 as its SOC. The C6 and E6 use the LG1312 as the SOC, the C7/E7 (2017 models) use the M16P you mention above. G7 still unknown.

Source: http://www.displayspecifications.com/en/brand/a1025

OLED55E6P 609, XB1S, Comcast, Roku 2 (4210 build)
mttpalmer is online now  
post #8 of 16 Old 04-19-2017, 07:36 AM
Newbie
 
Reda's Avatar
 
Join Date: Jul 2009
Posts: 9
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 5 Post(s)
Liked: 4
Quote:
Originally Posted by mttpalmer View Post
The G6 uses the LG1210 as its SOC. The C6 and E6 use the LG1312 as the SOC, the C7/E7 (2017 models) use the M16P you mention above. G7 still unknown
LG1210 = H15
LG1312 = M16

M16P or M16+ (aka M17 in the firmware source code) is not the same chip as the M16.
All 2017 models use the same M16+ chip, including G7.

I downloaded source code files of different device firmwares from opensource(dot)lge(dot)com and compared them.

If you own an LG TV, you can also confirm this by having a look at the device info in the settings menu of Youtube app.
mttpalmer likes this.
Reda is offline  
post #9 of 16 Old 04-19-2017, 07:53 AM
Newbie
 
Reda's Avatar
 
Join Date: Jul 2009
Posts: 9
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 5 Post(s)
Liked: 4
Quote:
Originally Posted by Jorgeminator View Post
Thank you, I didn't know which specific chipset the different models incorporated



Strange that they left out the 10-bit part from the VP9 codec.

That's stange indeed.

I found another press article where they mention HEVC/VP9 4K60p 10 bits video decoding:

http://www.realtek.com.tw/press/news...PFid=1&Level=1

Unfortunately I couldn't find an official spec sheet.
Reda is offline  
post #10 of 16 Old 04-23-2017, 03:13 PM
Newbie
 
Join Date: Apr 2017
Posts: 6
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 5 Post(s)
Liked: 3
@Jorgeminator
LG B6 TV is using RTD2999 SoC, which SUPPORTS VP9 4K60p 10-bit video (VP9.2) format. First of all here you will find a screenshoot which shows a chip type (RTD2999):
http://www.hdtvtest.co.uk/news/oled5...1611044381.htm
A manufacturer of the RTD2999 claims that:

"The award-winning Realtek RTD2999 4K TV SoC integrates HDR (High Dynamic Range) into a single-chip full-featured TV SoC solution. The RTD2999 provides a multi-core 64-bit ARM CPU and high-performance 3D GPU. It supports the Android-5.1 platform and the HEVC/VP9 4K60p 10 bits video decoding standard."

"he RTD2999 features a built-in quad-core 64-bit ARM CPU and high-performance 3D GPU. It supports the latest H.265 (HEVC) 4k60p 10-bit and VP9 4k60p 10-bit decoding."

http://www.realtek.com.tw/press/news...PFid=1&Level=1
http://www.sipa.gov.tw/english/home....o=201512090001

LG claims of course something different: "VP9 Decoder 4K@60fps, 8bit"
http://www.lg.com/levant_en/tvs/lg-OLED55B6V

Why LG wrote this ? I don't know. Maybe there's a mistake on LG site, maybe there was some issues with VP9.2 or maybe LG didn't wanted to introduce VP9.2 decoding on B6.
Subman9 is offline  
post #11 of 16 Old 04-24-2017, 07:41 AM
AVS Forum Special Member
 
JonW747's Avatar
 
Join Date: Jan 2007
Posts: 1,083
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 131 Post(s)
Liked: 65
Quote:
Originally Posted by Subman9 View Post
@Jorgeminator
LG B6 TV is using RTD2999 SoC, which SUPPORTS VP9 4K60p 10-bit video (VP9.2) format. First of all here you will find a screenshoot which shows a chip type (RTD2999):
http://www.hdtvtest.co.uk/news/oled5...1611044381.htm
A manufacturer of the RTD2999 claims that:

"The award-winning Realtek RTD2999 4K TV SoC integrates HDR (High Dynamic Range) into a single-chip full-featured TV SoC solution. The RTD2999 provides a multi-core 64-bit ARM CPU and high-performance 3D GPU. It supports the Android-5.1 platform and the HEVC/VP9 4K60p 10 bits video decoding standard."

"he RTD2999 features a built-in quad-core 64-bit ARM CPU and high-performance 3D GPU. It supports the latest H.265 (HEVC) 4k60p 10-bit and VP9 4k60p 10-bit decoding."

http://www.realtek.com.tw/press/news...PFid=1&Level=1
http://www.sipa.gov.tw/english/home....o=201512090001

LG claims of course something different: "VP9 Decoder 4K@60fps, 8bit"
http://www.lg.com/levant_en/tvs/lg-OLED55B6V

Why LG wrote this ? I don't know. Maybe there's a mistake on LG site, maybe there was some issues with VP9.2 or maybe LG didn't wanted to introduce VP9.2 decoding on B6.
Pretty much no complex silicon product is shipped without numerous errata/bugs, and/or hard trade-offs that may not all be apparent until you dig deeply in to design.

We'd need to know which revision of the chip was shipped in the LG TVs as well as additional technical information that may not be available to the public.
JonW747 is offline  
post #12 of 16 Old 04-28-2017, 11:11 AM
Newbie
 
frankiepoon's Avatar
 
Join Date: Jul 2009
Posts: 1
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 1 Post(s)
Liked: 0
The dropbox link for ffmpeg is dead. Can you upload it again?
frankiepoon is offline  
post #13 of 16 Old 05-03-2017, 11:20 AM - Thread Starter
Newbie
 
Join Date: Apr 2017
Location: Finland
Posts: 9
Mentioned: 1 Post(s)
Tagged: 0 Thread(s)
Quoted: 2 Post(s)
Liked: 5
Quote:
Originally Posted by frankiepoon View Post
The dropbox link for ffmpeg is dead. Can you upload it again?
Sorry for that, I hit my Dropbox limit. I have uploaded the package to MEGA instead and the link has been updated.
Jorgeminator is offline  
post #14 of 16 Old 05-04-2017, 08:44 AM
Newbie
 
dzygmunt's Avatar
 
Join Date: Dec 2007
Posts: 4
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I'm not a big fan of re-coding again and again to change to compatible formats. Most of the files were probably in HDR HEVC format to begin with and Youtube converted them to VP9.

I downloaded best quality video VP9 and Vorbis audio following steps in the first post. This could be a single line process using youtube-dl with help of ffmpeg that downloads it on the fly into MP9 .webm video and Vorbis .webm audio saving into .MKV container. My OLED E6 plays the file directly but the output is the same as using build in YouTube app. 4K good quality but no HDR
It plays VP9 codec directly but no HDR tag and not sure about 10 bit.
dzygmunt is offline  
post #15 of 16 Old Yesterday, 11:12 PM
Newbie
 
Join Date: May 2017
Posts: 2
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 0
So, great workaround OP! Been trying to accomplish this for the past few days on a MAC, and have been able to get all the way to the encoding part flawlessly. It is here, using iffmpeg, that the file gets encoded but also compressed down to 86mb. Tried it through a usb stick on my B6 and the hdr metadata is lost and no "HDR" logo pops up. Anyone know why iffmpeg is compressing the file so much? Could this be the reason I am not seeing the hdr metadata pulling over? Is there a setting in iffmpeg I am missing to be able to not lose quality when encoding? The encoding process took a couple of hours (piece of crap mac), so I thought it was working, but was let down :-(
pdawg09 is online now  
post #16 of 16 Old Today, 06:54 AM
Newbie
 
Join Date: May 2017
Posts: 2
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 0
Quote:
Originally Posted by pdawg09 View Post
So, great workaround OP! Been trying to accomplish this for the past few days on a MAC, and have been able to get all the way to the encoding part flawlessly. It is here, using iffmpeg, that the file gets encoded but also compressed down to 86mb. Tried it through a usb stick on my B6 and the hdr metadata is lost and no "HDR" logo pops up. Anyone know why iffmpeg is compressing the file so much? Could this be the reason I am not seeing the hdr metadata pulling over? Is there a setting in iffmpeg I am missing to be able to not lose quality when encoding? The encoding process took a couple of hours (piece of crap mac), so I thought it was working, but was let down :-(
Actually installed ffmpeg via homebrew on the MAC, and it all works now! Followed your instructions exactly, except for some minor syntax differences (MAC vs. Windows), and viola! Thanks for the workaround...now hopefully there is still a glimpse of hope that my B6 will get an update eventually. Or PS4 Pro would do the trick as well.


Thanks again! can't believe this thread is not more popular actually!
pdawg09 is online now  
Sponsored Links
Advertisement
 
Reply OLED Technology and Flat Panels General



Forum Jump: 

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off