Page 1 of 1

Haven't seen this codec before

PostPosted: Sun Oct 28, 2018 3:11 am
by atc98092
I am still encountering an occasional issue with some of my UHD movie rips. I'm trying to play it on my Roku TV. This one in particular I didn't notice before. While the UHD case calls it Dolby TrueHD with Atmos, MediaInfo is reporting it a little differently.
  Code:
Audio #1
ID                                       : 2
ID in the original source medium         : 4352 (0x1100)
Format                                   : MLP FBA 16-ch
Format/Info                              : Meridian Lossless Packing FBA with 16-channel presentation
Commercial name                          : Dolby TrueHD with Dolby Atmos
Codec ID                                 : A_TRUEHD
Duration                                 : 2 h 7 min
Bit rate mode                            : Variable
Bit rate                                 : 4 991 kb/s
Maximum bit rate                         : 7 662 kb/s
Channel(s)                               : 8 channels
Channel layout                           : L R C LFE Ls Rs Lb Rb
Sampling rate                            : 48.0 kHz
Frame rate                               : 1 200.000 FPS (40 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossless
Stream size                              : 4.44 GiB (9%)
Title                                    : Surround 7.1
Language                                 : English
Default                                  : Yes
Forced                                   : No
Original source medium                   : Blu-ray
Number of dynamic objects                : 11
Bed channel count                        : 1 channel
Bed channel configuration                : LFE


Is Meridian Lossless Packing something we can capture with a profile? I don't see it listed as a Matches codec. Or is this just the way that TrueHD is identifed?

My Roku TV is playing it without transcoding, but several minutes into the video it stops and reports the file as unplayable. I've encountered this before with DTS Master Audio: playback starts but then stops with the same error. For DTS/MA, I just transcode to DD and it plays fine. But the console is reporting this as no transcoding. Since no Roku supports any lossless audio codec, I am very puzzled why this even plays at all, regardless of the error message.

I also discovered an error in the Roku 4K TV profile, where it is transcoding video when I meant to only transcode the audio. I will submit an update for the next version.

Re: Haven't seen this codec before

PostPosted: Mon Nov 12, 2018 12:04 pm
by zip
need ffmpeg -i for the file, that's what serviio uses

Re: Haven't seen this codec before

PostPosted: Fri Nov 16, 2018 2:49 pm
by atc98092
Looks like it's something that MediaInfo is interpreting differently (or just embellishing) then FFMPEG. Here's the FFMPEG info.

  Code:
 Stream #0:1(eng): Audio: truehd, 48000 Hz, 7.1, s32 (24 bit) (default)
    Metadata:
      title           : Surround 7.1
      BPS-eng         : 4991233
      DURATION-eng    : 02:07:21.635000000
      NUMBER_OF_FRAMES-eng: 9169962
      NUMBER_OF_BYTES-eng: 4767647940
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.12.2 win(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-05-28 03:07:59
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID

Re: Haven't seen this codec before

PostPosted: Sat May 25, 2019 9:36 am
by priitv8
I have a strange observation with Serviio 1.10.1 and now 2.0 Free license server. I am using Sony BDP-Sx100 (2013) as a renderer profile.
For some reason, it will not include 1080p H.264 encoded clips that have TrueHD audio in the Movies playlists. So I can not browse for them on the bluray player (Sony UBP-X700) and also can not play them back using the mobile controller application (does not find suitable renderer). If the audio track is DTS (any flavour), the file is included properly.
The same I can say about UHD HEVC-encoded files. They all play back natively, without transcoding. And Serviio catalogs them without an issue.
What I am trying to achieve is a native playback. I've turned transcoding off completely in Serviio Console, so that is not, what I am trying to do.
Upon closer inspection, it seems, that Serviio does not index those files properly. But I do not know what may be the reason behind that.
What I observe is, that Serviio does not create the resource record for the movie track, hence the Content URI and Protocol Info pieces are missing from the media descriptor, as seen below.
Serviio-File1.png
Serviio-File1.png (283.45 KiB) Viewed 2203 times
Serviio-File2.png
Serviio-File2.png (319.13 KiB) Viewed 2203 times

Here is an example of properly indexed file:
Serviio-FileOK.png
Serviio-FileOK.png (330.7 KiB) Viewed 2203 times

Re: Haven't seen this codec before

PostPosted: Sat May 25, 2019 9:39 am
by priitv8
For comparison, the same files via Plex server (and indeed, I can play them back via Plex server without a problem)
Plex-File1.png
Plex-File1.png (298.44 KiB) Viewed 2203 times
Plex-File2.png
Plex-File2.png (309.31 KiB) Viewed 2203 times

As per conventions, here the ffmpeg -i output on File2.m2ts
  Code:
ffmpeg version 4.1.3-tessus  https://evermeet.cx/ffmpeg/  Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple LLVM version 10.0.1 (clang-1001.0.46.3)
  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
[mpegts @ 0x7fc107002600] start time for stream 3 is not set in estimate_timings_from_pts
[mpegts @ 0x7fc107002600] Could not find codec parameters for stream 3 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from '/Volumes/iTunes/Non-iTunes Media/Movies/File2.m2ts':
  Duration: 01:30:58.50, start: 11.650667, bitrate: 29554 kb/s
  Program 1
    Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
    Stream #0:1[0x1100](eng): Audio: truehd (AC-3 / 0x332D4341), 48000 Hz, 7.1, s32 (24 bit)
    Stream #0:2[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s
    Stream #0:3[0x1200](eng): Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)

And the same, as seen by MediaInfoLib
  Code:
General
ID                                       : 0 (0x0)
Complete name                            : /Volumes/iTunes/Non-iTunes Media/Movies/File2.m2ts
Format                                   : BDAV
Format/Info                              : Blu-ray Video
File size                                : 18.8 GiB
Duration                                 : 1h 30mn
Overall bit rate mode                    : Variable
Overall bit rate                         : 29.6 Mbps
Maximum Overall bit rate                 : 48.0 Mbps

Video
ID                                       : 4113 (0x1011)
Menu ID                                  : 1 (0x1)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.1
Format settings                          : CABAC / 2 Ref Frames
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 2 frames
Codec ID                                 : 27
Duration                                 : 1h 30mn
Bit rate mode                            : Variable
Bit rate                                 : 28.0 Mbps
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 23.976 (24000/1001) fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.563
Stream size                              : 17.8 GiB (95%)

Audio
ID                                       : 4352 (0x1100)
Menu ID                                  : 1 (0x1)
Format                                   : AC-3 MLP FBA 16-ch
Format/Info                              : Audio Coding 3 + Meridian Lossless Packing FBA with 16-channel presentation
Commercial name                          : Dolby TrueHD with Dolby Atmos
Muxing mode                              : Stream extension
Codec ID                                 : 131
Duration                                 : 1h 30mn
Bit rate mode                            : Variable
Bit rate                                 : 384 Kbps
Maximum bit rate                         : 8 823 Kbps
Channel(s)                               : 8 channels
Channel layout                           : L R C LFE Ls Rs Lb Rb
Sampling rate                            : 48.0 KHz
Frame rate                               : 31.250 fps (1536 SPF)
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 250 MiB (1%)
Language                                 : English
Service kind                             : Complete Main
Number of dynamic objects                : 11
Bed channel count                        : 1 channel
Bed channel configuration                : LFE

Text
ID                                       : 4608 (0x1200)
Menu ID                                  : 1 (0x1)
Format                                   : PGS
Codec ID                                 : 144
Language                                 : English

I would appreciate any help in solving this.
It seems to me, that this is an issue on the server side and can not just be fixed by updating the renderer profile.
Ultimately, I would love to turn off DLNA server on Plex altogether and stick to Serviio only.
This problem described here does not allow me, yet.

Re: Haven't seen this codec before

PostPosted: Sat May 25, 2019 7:23 pm
by atc98092
Sony has been removing DLNA functionality for years. I have an older BD player (BDP-S3500), and use the same profile you mentioned. While my previous Sony BD player would play both DTS Master Audio and Dolby TrueHD, the S3500 only plays TrueHD over DLNA. It sounds like they've removed that functionality from yours completely. Which means audio transcoding will always be necessary.

For your UBP-X700, there really isn't a good Serviio profile for it. Your player is 4K, and there is no 4K Sony profile. So any UHD material is being transcoded unnecessarily. I don't have such a player, so can't offer much help developing a new profile for it.

Re: Haven't seen this codec before

PostPosted: Sun May 26, 2019 6:37 pm
by priitv8
atc98092 wrote:Sony has been removing DLNA functionality for years. I have an older BD player (BDP-S3500), and use the same profile you mentioned. While my previous Sony BD player would play both DTS Master Audio and Dolby TrueHD, the S3500 only plays TrueHD over DLNA. It sounds like they've removed that functionality from yours completely. Which means audio transcoding will always be necessary.

For your UBP-X700, there really isn't a good Serviio profile for it. Your player is 4K, and there is no 4K Sony profile. So any UHD material is being transcoded unnecessarily. I don't have such a player, so can't offer much help developing a new profile for it.
This can not be!
Serviio plays back 4K HDR10 files with TrueHD Atmos soundtracks beautifully. Absolutely no complaints.
Here the problem is on Serviio side.
Same files I can play back when I open the Plex DLNA server on X700. But on Serviio file lists these particular files do not appear at all.
So this is definitely not a problem on Sony side.
I really hope that Petr can look into this.

Re: Haven't seen this codec before

PostPosted: Mon May 27, 2019 12:07 am
by atc98092
priitv8 wrote:
atc98092 wrote:Sony has been removing DLNA functionality for years. I have an older BD player (BDP-S3500), and use the same profile you mentioned. While my previous Sony BD player would play both DTS Master Audio and Dolby TrueHD, the S3500 only plays TrueHD over DLNA. It sounds like they've removed that functionality from yours completely. Which means audio transcoding will always be necessary.

For your UBP-X700, there really isn't a good Serviio profile for it. Your player is 4K, and there is no 4K Sony profile. So any UHD material is being transcoded unnecessarily. I don't have such a player, so can't offer much help developing a new profile for it.

This can not be!
Serviio plays back 4K HDR10 files with TrueHD Atmos soundtracks beautifully. Absolutely no complaints.
Here the problem is on Serviio side.
Same files I can play back when I open the Plex DLNA server on X700. But on Serviio file lists these particular files do not appear at all.
So this is definitely not a problem on Sony side.
I really hope that Petr can look into this.


I'm looking at the BDP-Sx100 (2013) profile, and don't see any lines that catch TrueHD, but I do see a line that catches H.265 video and transcodes both the audio and video, as well as sets a maximum video bitrate. The video is transcoded into MPEG2, and the audio into standard Dolby Digital. I can see that a H.264 movie with TrueHD would audio pass-through, but every 4K video on UHD Blu Ray I've ever seen has H.265. If you're watching a 4K video with HDR and TrueHD/Atmos, and your AVR is reporting TrueHD/Atmos, then you must be using a different profile. As I said, my current Sony BD player (not 4K capable) will pass TrueHD/Atmos, but not DTS Master Audio/DTS:X. It either reports an error about unsupported audio, or there's just no audio at all.

Plex has it's own custom profiles, and most likely has support for a player as new as yours. As I mentioned, Serviio hasn't had any Sony profile updates (to my knowledge) for several years. The newest TV profile is dated 2014, and the newest player profile is the one you are using (2013). These may have been tweaked over the years, but there hasn't been any new profiles specifically for supporting the 4K players.

Re: Haven't seen this codec before

PostPosted: Tue May 28, 2019 5:04 am
by priitv8
I understand the profile differences, but as my screenshots above shall characterise, the error happens on DLNA server side.
These pics show "AV Media Controller" tool from this site: https://www.meshcommander.com/upnptools
And as can be seen, some vital information is missing in the media descriptors: the whole Resource #n section.

In addition, I can assure you, that I do not watch anything with transcoding, I have even turned it off in Serviio preferences. The media info on the UBP-X800 shows, that the audio track is TrueHD. Atmos is recognised by AVR. In the transcoding process, it would definitely be lost, as there is no tool known to public (other than Dolby's proprietary tools) that could transcode Atmos streams leaving the objects and metadata intact.
Neither Serviio, nor Plex, nor UBP-X700 have any trouble with playing back HEVC, HDR10 or TrueHD Atmos natively, without transcoding.
That is why I am asking for the assessment from Petr, he has the insight why are Content URI and Protocol Info not presented to Controller or Renderer.

Re: Haven't seen this codec before

PostPosted: Tue May 28, 2019 12:14 pm
by atc98092
Cool. Just needed to confirm you weren't transcoding. Just as an aside, if you enable burned in subtitles it will transcode even if you have it turned off.

It's great the UBP-X700 still supports TrueHD. How about DTS MA/:X? Are you getting that to your AVR? If so, then that's the next BD player I need. :D

Yes, Serviio feeds all lossless audio and has no problems with HVEC or HDR. I've ripped 5 UHD Blu Rays, and they all stream perfectly to my Shield. My Roku players buffer, but that's because they don't have a Gigabit Ethernet connection and my WiFi doesn't seem to stream as well as a Fast Ethernet connection.

Hopefully Petr can determine if there's something he can do about the issue you have identified.

Re: Haven't seen this codec before

PostPosted: Tue May 28, 2019 7:22 pm
by priitv8
atc98092 wrote:Cool. Just needed to confirm you weren't transcoding. Just as an aside, if you enable burned in subtitles it will transcode even if you have it turned off.
I do not need them either, as X700 can use the muxed subtitles. Though, only PGS inside m2ts and TXT inside MKV work. Not the other way around.
Actually, if the m2ts is straight off the disc (decrypted, naturally), then it will play it back as if from optical. You will lose the metadata, obviously, as the BD m2ts does not contain any, they are kept in other files (CLIPINF and PLAYLIST).
The only thing it won't do, is the Dolby Vision of the bluray kind (the 2-video streams flavour, aka Profile 7). That second enhancement stream is only being processed when coming from optical. DoVi Profile 5 can also be streamed from Serviio or Plex.
atc98092 wrote:It's great the UBP-X700 still supports TrueHD. How about DTS MA/:X? Are you getting that to your AVR? If so, then that's the next BD player I need. :D
Yes, they do. Actually with even less problems. DTS:X plays also from MKV file. Atmos only from m2ts. That fault is with MKV, not the Sony player :)
atc98092 wrote:Hopefully Petr can determine if there's something he can do about the issue you have identified.
I hope he still follows this forum. Otherwise the only other option to be noticed (I've already sent e-mail) will be the GIT bug report.

Re: Haven't seen this codec before

PostPosted: Wed May 29, 2019 12:35 am
by atc98092
priitv8 wrote:I do not need them either, as X700 can use the muxed subtitles. Though, only PGS inside m2ts and TXT inside MKV work. Not the other way around.
Actually, if the m2ts is straight off the disc (decrypted, naturally), then it will play it back as if from optical. You will lose the metadata, obviously, as the BD m2ts does not contain any, they are kept in other files (CLIPINF and PLAYLIST).

Yeah, my S3500 will display captions from M2TS files, but not from MKV, although the player recognizes there are captions available.
priitv8 wrote:The only thing it won't do, is the Dolby Vision of the bluray kind (the 2-video streams flavour, aka Profile 7). That second enhancement stream is only being processed when coming from optical. DoVi Profile 5 can also be streamed from Serviio or Plex.

I don't have a DV capable display, so can't comment on that.
Yes, they do. Actually with even less problems. DTS:X plays also from MKV file. Atmos only from m2ts. That fault is with MKV, not the Sony player :)

I don't think it's because of the MKV container. With my Shield I can get DTS:X and TrueHD/Atmos from MKV and M2TS files without a problem. But that's great that it supports both lossless codecs. I can now consider one of those when I need to replace the BD player. Thanks!

Re: Haven't seen this codec before

PostPosted: Wed May 29, 2019 5:56 am
by priitv8
atc98092 wrote:Yeah, my S3500 will display captions from M2TS files, but not from MKV, although the player recognizes there are captions available.
Then try to mux a text sub (.srt) into the MKV and see if it helps. Took me a while to understand this. Because also X700 shows the PGS tracks, but does not render them.
atc98092 wrote:I don't think it's because of the MKV container. With my Shield I can get DTS:X and TrueHD/Atmos from MKV and M2TS files without a problem. But that's great that it supports both lossless codecs.
But it is. Sony handles the stream as per BD spec. In MKV the TrueHD will be split into 2 separate tracks: MLP (aka TrueHD) and Core AC3 (aka DD5.1).
On bluray they are interleaved in single stream and Sony expects the stream to be BDA compliant. Easy test: take a m2ts with single TrueHD audio track and wrap it into MKV. You see 2 audio tracks being created when there was one in the source!
Actually. eac3to tool can even recombine them, so that it is possible to recreate a fully compliant m2ts from a non-compliant mkv.