Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should I transcode all my media or leave it as it is? #332

Open
muhrizali opened this issue Oct 14, 2021 · 7 comments
Open

Should I transcode all my media or leave it as it is? #332

muhrizali opened this issue Oct 14, 2021 · 7 comments
Assignees
Labels

Comments

@muhrizali
Copy link

Hey Don

I have been using your transcoding tools for my Plex and Emby server and is absolutely loving it. But I want a little help in deciding something.

Actually, the media I have is expertly encoded (you know like maintaining bitrates, debanding, denoising, color correction, deinterlace etc.) by it's uploaders. The files are quite large, usually between 1.5 - 2.8 GB per episode. Also they are all 10bit videos (Japanese anime are usually 10bit 2D animation). I usually watch them on my mobile or TV.

So my question is, should I transcode my media at all? Would there be a significant loss in quality converting HDR to SDR?

@martinpickett
Copy link

I am sure Don will be along soon, but in the meantime I will try answering.

I would not transcode these videos. The main issue is that they are already HDR. With the current version of other-transcode you cannot transcode HDR video and retain the HDR-ness. This leaves you converting to SDR which the current version of other-transcode does not fully support. So if you are determined to only use other-transcode I would leave the videos as they are.

More generally, there are methods for converting HDR content into SDR. They all come with compromises. To my knowledge, there is no mathematical way to map HDR colours and brightnesses into SDR without loosing something. There certainly are better and worse ways to do this, but none will be perfect. If you would like to investigate, the term of art is "tone mapping".

Finally, in this community we are at the beginning of understanding HDR (we are a bit slow, but we are persistent). The next version of other-transcode will (hopefully) include the very beginnings of support for transcoding HDR content. So, I do not think we know if 1.5-2.8 GB per episode for HDR content is reasonable or not. Certainly coming from 1080p SDR it sounds large for 30 minutes episodes, but more reasonable for 1 hour episodes. We think we know HDR requires a higher bitrate, and if these videos are 4K rather than 1080p then they certainly need a higher bitrate, but I do not think we have a good idea of how much higher yet.

Hope you find this helpful

@muhrizali
Copy link
Author

I am sure Don will be along soon, but in the meantime I will try answering.

I would not transcode these videos. The main issue is that they are already HDR. With the current version of other-transcode you cannot transcode HDR video and retain the HDR-ness. This leaves you converting to SDR which the current version of other-transcode does not fully support. So if you are determined to only use other-transcode I would leave the videos as they are.

More generally, there are methods for converting HDR content into SDR. They all come with compromises. To my knowledge, there is no mathematical way to map HDR colours and brightnesses into SDR without loosing something. There certainly are better and worse ways to do this, but none will be perfect. If you would like to investigate, the term of art is "tone mapping".

Finally, in this community we are at the beginning of understanding HDR (we are a bit slow, but we are persistent). The next version of other-transcode will (hopefully) include the very beginnings of support for transcoding HDR content. So, I do not think we know if 1.5-2.8 GB per episode for HDR content is reasonable or not. Certainly coming from 1080p SDR it sounds large for 30 minutes episodes, but more reasonable for 1 hour episodes. We think we know HDR requires a higher bitrate, and if these videos are 4K rather than 1080p then they certainly need a higher bitrate, but I do not think we have a good idea of how much higher yet.

Hope you find this helpful

Thank you very much.
Actually, all the videos are 1080p and are 24 minutes long.

@lisamelton lisamelton self-assigned this Oct 14, 2021
@klogg416
Copy link

klogg416 commented Oct 14, 2021

@martinpickett the Anime scene has a history of encoding as 10-bit h264 files to minimize colour banding in the final encode. It is challenging for playback since h264 videos with 10-bit colour depth was basically not adopted as a standard. I suspect these are the source files @solleeali is working with- 1080p non-HDR files re-encoded as 10-bit for colour banding prevention.

@solleeali are those assumptions and details accurate?

If so, you could re-encode at a lower bitrate in an effort to save space, and likely can save a lot since animation is comparatively simple, but then you are re-encoding and certain to experience some generational loss as well as the transition from an 8-bit source to a 10-bit re-encode, back to an 8-bit re-encode. You might be better served finding a source that more closely meets your size needs.

@lisamelton
Copy link
Owner

@solleeali My thanks to @martinpickett and @klogg416 for their excellent comments and questions! And I would agree. Don't transcode these particular videos. Converting HDR to SDR is currently fraught with problems, no matter which tool you use. And, BTW, thanks for using my tools!

@klogg416
Copy link

klogg416 commented Oct 14, 2021

One last point I missed. HDR requires 10-bit or 12-bit colour, but 10-bit colour does not necessarily mean HDR. If the Anime started life as 1080p, then you are dealing with 8-bit FHD source video re-encoded as 10-bit, which can have a meaningful decrease in colour banding, but still doesn't convert the source to HDR. If that makes sense.

@lisamelton
Copy link
Owner

@klogg416 Oooooh, good point. If that's the case, then it might be worth trying to transcode them just to see what it looks like.

@martinpickett
Copy link

martinpickett commented Oct 14, 2021

Echoing @klogg416's point, 10-bit does not mean HDR. So if your videos are only 10-bit and not HDR, then you could transcode using other-transcode and almost certainly produce smaller outputs which still meet your quality requirements. It might just take a little bit of trial and error to find the best bitrate.

Edit: Don beat me to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants