FAQ  •  Register  •  Login

x265 transcoding not fully implemented in profiles.xml

<<

Fred

Serviio newbie

Posts: 5

Joined: Sat Feb 08, 2014 8:08 pm

Post Sat Jul 04, 2015 12:29 pm

x265 transcoding not fully implemented in profiles.xml

Hi,
The title may be a bit provocative, but the truth is that x265 transcoding (Matroska containers) does not work for my Sony BDP-370 player. However, for mp4 containers it does work out of the box. After looking at the default profile.xml I do understand why (see below). I edited my profile.xml file and tested it afterwards. The modified profile.xml works much better and will now transcode x265 correctly.

--> Zip, may I ask you to update the default profile.xml according to these suggestions at the end of this post?

I have only tested the bdp2010 profile, but I would suspect x265 transcoding will also not work with the default profile.xml for the following (Sony) combinations:
1a. Profile "sony2012" container="mp4" vCodec="h265" (no match in any rule set)
1b. Profile "sony2012" container="mpeg" vCodec="h265" aCodec="dca","dts-hd" (will be catched by audio transcoding rule set)
2a. Profile "bdp2012" container="matroska" vCodec="h265" aCodec="trueHD","flac","lpcm" (will be catched by the "Remux video and transcode unsupported audio..." rule set )
2b. Profile "bdp2012" container="mpeg" vCodec="h265" aCodec="lpcm" (will be catched by the "Remux video and transcode unsupported audio..." rule set)
3. Profile "bdp2010" container="matroska" vCodec="h265" (will be catched by the "mkv stutter" rule set or the rule set directly after depending on the aCodec used in the file)

Fixing the 3 above profiles will also (due to inherance fix the 4 below profiles "automatically")
4. Profile "bdp2010us" will due to inherance of bdp2010 suffer from the same behavior as bdp2010.
5. Profile "sony2011" will due to inherance of sony2012 suffer from the same behavior as sony2012. (However sony2010 have a matching mp4 rule set that works)
6. Profile "sony2012us" will due to inherance of sony2012 suffer from the same behavior as sony2012.
7. Profile "sony2011us" will due to inherance of sony2012us" suffer from the same behavior as sony2012us.


It would be nice if the default profile.xml file could be changed into something like this :
1. For profile "sony2012":
From
  Code:
 ...
      <Video targetContainer="mpegts" targetVCodec="mpeg2video" maxVBitrate="17000" targetACodec="ac3" aBitrate="384" DAR="16:9" forceInheritance="true">
            <Matches container="*" vCodec="h264" profile="high_10" />
            <Matches container="*" vCodec="h264" profile="high_422" />
...

To this:
  Code:
 ...
      <Video targetContainer="mpegts" targetVCodec="mpeg2video" maxVBitrate="17000" targetACodec="ac3" aBitrate="384" DAR="16:9" forceInheritance="true">
            <Matches container="*" vCodec="h265"/>
            <Matches container="*" vCodec="h264" profile="high_10" />
            <Matches container="*" vCodec="h264" profile="high_422" />
...



2. For profile "bdp2012":
From
  Code:
...
         <Video targetContainer="mpegts" targetVCodec="mpeg2video" maxVBitrate="17000" targetACodec="ac3" aBitrate="320" forceInheritance="true">
             <Matches container="*" vCodec="h264" profile="high_10" />
...

To this:
  Code:
...
         <Video targetContainer="mpegts" targetVCodec="mpeg2video" maxVBitrate="17000" targetACodec="ac3" aBitrate="320" forceInheritance="true">
                                <Matches container="*" vCodec="h265"/>
            <Matches container="*" vCodec="h264" profile="high_10" />
...



3. For profile "bdp2010":
From
  Code:
...
      </MediaFormatProfiles>
      <Transcoding>
         <!-- 2010 model Sony BDP requests all formats except mpeg-ps and mpeg-ts in 32KB chunks which works badly over wifi, hence mkv files are remuxed to mpeg-ts by default in this profile. Natively played
...

To this:
  Code:
...
      </MediaFormatProfiles>
      <Transcoding>
      <!-- h264 videos with high/main profile level > 4.1 will be transcoded to mpegts with mpeg2video and ac3 audio -->
         <Video targetContainer="mpegts" targetVCodec="mpeg2video" maxVBitrate="17000" targetACodec="ac3" aBitrate="320" forceInheritance="true">
                                <Matches container="*" vCodec="h265"/>
            <Matches container="*" vCodec="h264" profile="high_10" />
            <Matches container="*" vCodec="h264" profile="high_444" />
            <Matches container="*" vCodec="h264" profile="high_422" />
            <Matches container="*" vCodec="h264" profile="high" levelGreaterThan="4.1" />
            <Matches container="*" vCodec="h264" profile="main" levelGreaterThan="4.1" />
            <Matches container="matroska" vCodec="vp8" />
         </Video>
         <!-- 2010 model Sony BDP requests all formats except mpeg-ps and mpeg-ts in 32KB chunks which works badly over wifi, hence mkv files are remuxed to mpeg-ts by default in this profile. Natively played
...



The addition for bdp2010 will also fix playback for h264 high profiles that also does not work right now.

Regards,
Fred
<<

atc98092

User avatar

DLNA master

Posts: 5213

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Sat Jul 04, 2015 4:08 pm

Re: x265 transcoding not fully implemented in profiles.xml

I would not recommend altering the default profile (#1), as there are now devices on the market that play x265 without transcoding. My Samsung does, as does many other Samsungs, Sonys, and other 4K models.

As you note, there might be an issue with the type of container the video is in. My only video with h265 (a demo short) is in a MKV container. I can play it straight from the server with no issues, but through Serviio it fails. I haven't researched why, as I only downloaded the clip to test 4k streaming. Here's the MediaInfo on the file if anyone is interested in determining what profile changes might be necessary:

  Code:
General
Unique ID                                : 236502769237675496236284442215218513912 (0xB1ECC6CA0CBBC45A86468BA63E6987F8)
Complete name                            : E:\Video_3\Sintel.2010.4k.mkv
Format                                   : Matroska
Format version                           : Version 2
File size                                : 4.20 GiB
Duration                                 : 14mn 48s
Overall bit rate                         : 40.6 Mbps
Encoded date                             : UTC 2011-05-11 09:46:37
Writing application                      : mkvmerge v2.9.7 ('Tenderness') built on Jul  1 2009 18:43:35
Writing library                          : libebml v0.7.7 + libmatroska v0.8.1

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L5.1
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 14mn 48s
Bit rate                                 : 40.0 Mbps
Width                                    : 4 096 pixels
Height                                   : 1 744 pixels
Display aspect ratio                     : 2.35:1
Frame rate mode                          : Constant
Frame rate                               : 24.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.233
Stream size                              : 4.05 GiB (96%)
Writing library                          : x264 core 115 r1947 b5a8ad7
Encoding settings                        : cabac=1 / ref=4 / deblock=1:-3:-3 / analyse=0x3:0x133 / me=tesa / subme=10 / psy=1 / psy_rd=0.80:0.30 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-4 / threads=3 / sliced_threads=0 / nr=0 / decimate=0 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=6 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc=2pass / mbtree=0 / bitrate=40000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / pb_ratio=1.30 / aq=1:1.00 / zones=80,751,b=2.0/1572,1954,b=2.0/12210,12303,b=2.0
Language                                 : English
Default                                  : Yes
Forced                                   : No
Matrix coefficients                      : BT.709
Color range                              : Limited

Audio
ID                                       : 2
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Codec ID                                 : A_AC3
Duration                                 : 14mn 48s
Bit rate mode                            : Constant
Bit rate                                 : 640 Kbps
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 67.8 MiB (2%)
Title                                    : AC3 5.1 @ 640 Kbps
Language                                 : English
Default                                  : Yes
Forced                                   : No

Text #1
ID                                       : 3
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Language                                 : German
Default                                  : Yes
Forced                                   : No

Text #2
ID                                       : 4
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Language                                 : English
Default                                  : No
Forced                                   : No

Text #3
ID                                       : 5
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Language                                 : Spanish
Default                                  : No
Forced                                   : No

Text #4
ID                                       : 6
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Language                                 : French
Default                                  : No
Forced                                   : No

Text #5
ID                                       : 7
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Language                                 : Italian
Default                                  : No
Forced                                   : No

Text #6
ID                                       : 8
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Language                                 : Dutch
Default                                  : No
Forced                                   : No

Text #7
ID                                       : 9
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Language                                 : Polish
Default                                  : No
Forced                                   : No

Text #8
ID                                       : 10
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Language                                 : Portuguese
Default                                  : No
Forced                                   : No

Text #9
ID                                       : 11
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Language                                 : Russian
Default                                  : No
Forced                                   : No

Text #10
ID                                       : 12
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Language                                 : Vietnamese
Default                                  : No
Forced                                   : No

Menu
00:00:00.000                             : :Chapter 01
00:01:43.125                             : :Chapter 02
00:02:28.667                             : :Chapter 03
00:05:49.792                             : :Chapter 04
00:07:17.208                             : :Chapter 05
00:07:52.075                             : :Chapter 06
00:11:18.833                             : :Chapter 07
00:12:24.083                             : :Chapter 08
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

Fred

Serviio newbie

Posts: 5

Joined: Sat Feb 08, 2014 8:08 pm

Post Sat Jul 04, 2015 9:42 pm

Re: x265 transcoding not fully implemented in profiles.xml

Hi,
Maybe I expressed my self a bit unclear. Sorry for that.

I do NOT suggest to change profile #1 as it would affect all devices, also those that can do h265 natively exactly as you say. I was refering to the xml file itself (default = original as shipped in Serviio 1.5.2 ). I only suggest to change 3 different Sony-profiles in the profiles.xml file.

I only have Sony BluRay and Sony TV Equipment. Therefore I have limited my "investigation" to the Sony profiles. I do not know what the capabilities are for Samsung, why I have not looked into those profiles.

If you have a problem with h265.mkv file I guess you could have a similar problem for whatever Samsung profile you are using. However, I do notice that it is a 40MBit/s bitrate and I guess that high bitrate could be too much for the renderer apart from a non-h265-optimized rules, but I am only guessing here.

/Fred
<<

atc98092

User avatar

DLNA master

Posts: 5213

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Mon Jul 06, 2015 12:39 pm

Re: x265 transcoding not fully implemented in profiles.xml

Fred wrote:Hi,
Maybe I expressed my self a bit unclear. Sorry for that.

I do NOT suggest to change profile #1 as it would affect all devices, also those that can do h265 natively exactly as you say. I was refering to the xml file itself (default = original as shipped in Serviio 1.5.2 ). I only suggest to change 3 different Sony-profiles in the profiles.xml file.

I only have Sony BluRay and Sony TV Equipment. Therefore I have limited my "investigation" to the Sony profiles. I do not know what the capabilities are for Samsung, why I have not looked into those profiles.

If you have a problem with h265.mkv file I guess you could have a similar problem for whatever Samsung profile you are using. However, I do notice that it is a 40MBit/s bitrate and I guess that high bitrate could be too much for the renderer apart from a non-h265-optimized rules, but I am only guessing here.

/Fred


No problem. I probably didn't read it clear :lol:

I have no problem with the 40Mbps rate, as the video plays fine if I stream it straight from the computer, rather than going through Serviio. Something in the Samsung profile is catching it and applying something that isn't necessary. And looking at the file info again I notice that it doesn't list h265 as the video codec, rather it's MPEG4. Although the V_MPEG4 label might be another identity for h265. Time for more research I guess!
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents

Return to Transcoding

Who is online

Users browsing this forum: No registered users and 18 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.