Page 1 of 2

Is there a way to ONLY transcode Hi10p and h265 files?

Posted: Thu Jan 07, 2016 7:16 am
by Tyestor
Pretty much what the title says.

Transcode: 10-bit and h265.
Stream/remux: Everything else.

Re: Is there a way to ONLY transcode Hi10p and h265 files?

Posted: Thu Jan 07, 2016 8:47 am
by Wolfgan
Make sure your renderer is properly detected, and then edit the .conf file and make sure "MediaInfo = true" and do not define those media types in the "Supported" lines (see http://www.universalmediaserver.com/faq ... erSupport1)

Re: Is there a way to ONLY transcode Hi10p and h265 files?

Posted: Fri Jan 08, 2016 6:17 am
by Tyestor
Wolfgan wrote:Make sure your renderer is properly detected, and then edit the .conf file and make sure "MediaInfo = true" and do not define those media types in the "Supported" lines (see http://www.universalmediaserver.com/faq ... erSupport1)
Ah yes, the thing is, my Nexus 7 2013 can play hi10p videos (and I think h265) however, the problem is, they're EXTREMELY laggy (lots of frame drops). So mediainfo isn't useful in this situation. I can get them to transcode if I enable "Encoded Audio Passthrough for AC-3 and DTS" but that option serves a different function.

This is the .conf I use: viewtopic.php?f=5&t=2574 - AFAIK it doesn't come with UMS by default.

Re: Is there a way to ONLY transcode Hi10p and h265 files?

Posted: Fri Jan 08, 2016 7:05 am
by Nadahar
It isn't part of default UMS yet, but I've made a pull request for it. I've gotten no response from the others though, so I guess time will show.

But you're wrong about mediainfo.

Code: Select all

MediaInfo = true
tells UMS to use mediainfo to get information about a file's format and codecs, and is a requirement to be able to detect things like h265. So, it needs to be turned on for such a configuration to be possible. But, in the configuration you linked to, it also is.

As long as mediainfo is enabled in the renderer configuration, you control what's streamed or transcoded via the "supported" lines. In the linked configuration you have for example this line:

Code: Select all

Supported = f:mkv       v:divx|h264|h265|mp4|mpeg2|vc1|vp8           a:aac|aac-he|ac3|adpcm|dts|eac3|flac|lpcm|mp3|mpa|opus|tta|vorbis|wavpack|wma   m:video/x-matroska
It tells UMS that if the format is mkv, video codec is divx, h264, h265, mp4, mpeg2, vc1 or vp8 AND the audio codec is one of those listed, the file should be streamed with mime type video/x-matroska. Editiing that line so that h265 isn't there will enable transcoding for mkv files with h265. You have to check all support lines if anything enables streaming of content you don't want to be streamed - anything not mentioned there will be transcoded.

Re: Is there a way to ONLY transcode Hi10p and h265 files?

Posted: Fri Jan 08, 2016 7:04 pm
by Tyestor
Nadahar wrote:It isn't part of default UMS yet, but I've made a pull request for it. I've gotten no response from the others though, so I guess time will show.

But you're wrong about mediainfo.

Code: Select all

MediaInfo = true
tells UMS to use mediainfo to get information about a file's format and codecs, and is a requirement to be able to detect things like h265. So, it needs to be turned on for such a configuration to be possible. But, in the configuration you linked to, it also is.

As long as mediainfo is enabled in the renderer configuration, you control what's streamed or transcoded via the "supported" lines. In the linked configuration you have for example this line:

Code: Select all

Supported = f:mkv       v:divx|h264|h265|mp4|mpeg2|vc1|vp8           a:aac|aac-he|ac3|adpcm|dts|eac3|flac|lpcm|mp3|mpa|opus|tta|vorbis|wavpack|wma   m:video/x-matroska
It tells UMS that if the format is mkv, video codec is divx, h264, h265, mp4, mpeg2, vc1 or vp8 AND the audio codec is one of those listed, the file should be streamed with mime type video/x-matroska. Editiing that line so that h265 isn't there will enable transcoding for mkv files with h265. You have to check all support lines if anything enables streaming of content you don't want to be streamed - anything not mentioned there will be transcoded.
Thanks Nadahar. It seems to be simple for h265, for it is resolvable in the way that you stated. Unfortunately, it's a little more difficult for hi10p as AFAIK there is no parameter for it (e.g hi10p or h264-hi10p). I'm sure you know what hi10p is, but I'll link the wiki for it anyway (it doesn't link directly so just read down a bit for anyone that is interested - https://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Profiles) - It's an encoding profile for h264 (maybe for h265, I don't know anything about h265 though) and it is very popular in the anime scene (hi444pp less popular), and a lot of files nowadays use it. As it stands, it appears I can't tell UMS to transcode 10-bit h264 files but leave 8-bit h264 files alone. It will either stream or transcode, regardless of the bitdepth.

I hope you understand.

Re: Is there a way to ONLY transcode Hi10p and h265 files?

Posted: Fri Jan 08, 2016 9:35 pm
by Nadahar
Yes, currently UMS doesn't differentiate on the different profiles, sadly. We could do it, but it would be very difficult to make a sensible configuration scheme for that. How would that "supported" line have to look, and how many people would then be able to get a working configuration. So, I guess you have to decide for h264... if your renderer support fast forward etc while transcoding, transcoding shouldn't be too bad. If not, it's not ideal...

Re: Is there a way to ONLY transcode Hi10p and h265 files?

Posted: Sat Jan 16, 2016 11:15 am
by ExSport
If MediaInfo is able to detect Hi10p files then it should not be so hard.
Hi10p is supported on the latest HW so I suppose it should be disabled by default (Hi10p_Support = Yes/No) but enabled for latest renderers (Like Amlogic s905 TVBoxes etc...)
Then UMS will easily force transcoding for nonsupported devices.
How we can detect these kind of files with 100% success ratio? 8-)

Re: Is there a way to ONLY transcode Hi10p and h265 files?

Posted: Sun Jan 17, 2016 10:18 am
by valib
ExSport wrote:If MediaInfo is able to detect Hi10p files then it should not be so hard.
Hi10p is supported on the latest HW so I suppose it should be disabled by default (Hi10p_Support = Yes/No) but enabled for latest renderers (Like Amlogic s905 TVBoxes etc...)
Then UMS will easily force transcoding for nonsupported devices.
How we can detect these kind of files with 100% success ratio? 8-)
I checked some sample videos and the MediaInfo detects the video as

Code: Select all

Format profile : High [email protected]
Bit depth : 10 bits
but the

Code: Select all

Codec ID : V_MPEG4/ISO/AVC
which is not H265. So could be the Hi10p format used for H264 and also for H265?
It could be quite simple to add the

Code: Select all

Hi10p_Support = Yes/No
to the renderers setting but we should consider if it is a propper way.

Re: Is there a way to ONLY transcode Hi10p and h265 files?

Posted: Sun Jan 17, 2016 11:07 am
by Nadahar
Hi10p can be used in h264, that's the problem. We can detect it via MediaInfo, the problem is how to work it into the existing system. I don't think

Code: Select all

Hi10p_Support = Yes/No
isn't a good way, it need to be part of the "supported" line syntax, and we'd need to be able to negate as well since the supported line would have to select those NOT Hi10p.

Re: Is there a way to ONLY transcode Hi10p and h265 files?

Posted: Sun Jan 17, 2016 11:31 am
by valib
Nadahar we can add this feature but I am affraid that it will slow down the most critical part of the browsing which is the responsibility of the "supported" lines matching.