Jump to content

Its impossible play video with TrueHD audio


Barlog9511
 Share

Recommended Posts

Barlog9511

Hi


 


I have a problem with True HD audio,


Problem is in an android application as well 


 


I have version 3.6.0.76 of emby a later stable version of FreeNAS and Samsung TV application in version 1.0.44


 


everything works just fine when I play DTS audio, but in TrueHD audio, it TV output looks like this


 


post-102570-0-90899700-1544545598_thumb.jpg

server_log.txt

remux_log.txt

server_log_longer.txt

Link to comment
Share on other sites

Playback of the TrueHD track will not be possible, so it should be repackaging the audio.  The transcode log looks like it's doing the right thing, but the output definitely isn't right.  I will try and see if I can reproduce this tonight.

 

ffmpeg is supposed to be just copying the video stream (which it appears to be from the log, but not the screen)

Link to comment
Share on other sites

Simple solution: Play DTS audio. It will be converted to AC3 anyway, just like TrueHD, so there's no point in choosing TrueHD.

 

 

From a technical point of view: There's just two possibilities: 

 

  1. Either the transcoder (ffmpeg) has a bug and creates an invalid file format
  2. Or there's a bug in a decoder or demuxer in the TV

We'd need to analyze the output to see what's actually happening.

 

 

Another thing I'm wondering about:

/usr/local/lib/emby-server/bin/ffmpeg -f matroska -i file:"/Movies/4K/Avengers - Infinity War/
Avengers.Infinity.War.2018.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos.DD5.1.CZ.H.265-FCtU.mkv" 
-threads 0 -map 0:0 -map 0:1 -map -0:s -c:v:0 copy -copyts -vsync -1 -codec:a:0 ac3 -metadata:s:a:0 language=eng 
-disposition:a:0 default -ac:a:0 6 -ab:a:0 192000  -f segment -max_delay 5000000 -avoid_negative_ts disabled 
-map_metadata -1 -map_chapters -1 -start_at_zero -segment_time 6  -individual_header_trailer 0 
-segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 
-segment_list "/var/db/emby-server/transcoding-temp/459121e7a43027e4397fbdd24c8127a6.m3u8" 
-y "/var/db/emby-server/transcoding-temp/459121e7a43027e4397fbdd24c8127a6%d.ts"

We're encoding audio to 6-channel AC3 with a target bitrate of 192kbps only. @@Luke - can this be rightt?

Link to comment
Share on other sites

I don't have much knowledge in that area, I don't even known if that value is meant per channel, per 2 channel pairs or total.

So I was rather wondering if those 192k are correct (conforming to the AC3 spec).

Link to comment
Share on other sites

192 seemed a bit low for 6 channels, but if that's a normal value then it's fine. I was just guessing for potential anomalies..

Link to comment
Share on other sites

So I tried playing a 4K HEVC stream with a TrueHD audio track, I get the same issue with video breakup and colour artefacts.  I can confirm that the video stream was copied by ffmpeg while the audio is converted to AC3.

 

If I select another audio track so that it DirectPlays, then the picture is perfect.  This confirms to me that there is no problem with playback of the video stream.

 

If I go back to the TrueHD track so that .ts segment files are created, if I try and playback any of these segments using vlc (Windows or Mac), Microsoft Video player, etc then all the segments display the same break-up and artefacts.  There is something not right when these streams are created, or this is just not going to work how we expect for these video stream types.  I did read somewhere that “The container format for HEVC video MUST be fMP4,” ie: no mpeg-ts streams for HLS.  Not sure whether this is an issue.

 

If I compare the MediaInfo for a stream segment to the original the only difference I can see is that in the original:

    Codec ID                                 : V_MPEGH/ISO/HEVC

and in the segment

    Codec ID                                 : 36

 

Whether this would make a difference on playback, I just don't know.

 

Could this also be a HDR issue?

 

I expect you should be able to replicate this easily with any 4K HEVC file.  

 

 

Video

ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Commercial name                          : HDR10
Format profile                           : Main 10@L5.1@High
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 1 h 44 min
Bit rate                                 : 12.4 Mb/s
Width                                    : 3 840 pixels
Height                                   : 1 600 pixels
Display aspect ratio                     : 2.40:1
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0 (Type 2)
Bit depth                                : 10 bits
Bits/(Pixel*Frame)                       : 0.084
Stream size                              : 9.03 GiB (72%)
Writing library                          : x265 2.5+27-0e168bdeb48b:[Windows][GCC 6.2.1][64 bit] 10bit
Encoding settings                        : cpuid=1173503 / frame-threads=4 / numa-pools=20 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=3840x1600 / interlace=0 / total-frames=150285 / level-idc=51 / high-tier=1 / uhd-bd=0 / ref=4 / no-allow-non-conformance / repeat-headers / annexb / aud / hrd / info / hash=0 / no-temporal-layers / no-open-gop / min-keyint=1 / keyint=24 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=25 / lookahead-slices=4 / scenecut=40 / no-intra-refresh / ctu=64 / min-cu-size=8 / rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=2 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / no-strong-intra-smoothing / max-merge=3 / limit-refs=3 / limit-modes / me=3 / subme=3 / merange=57 / temporal-mvp / weightp / no-weightb / no-analyze-src-pics / deblock=-3:-3 / no-sao / no-sao-non-deblock / rd=4 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=1.00 / no-rd-refine / analysis-reuse-mode=0 / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=17.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / vbv-maxrate=160000 / vbv-bufsize=160000 / vbv-init=0.9 / crf-max=0.0 / crf-min=0.0 / ipratio=1.40 / pbratio=1.30 / aq-mode=1 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=9 / transfer=16 / colormatrix=9 / chromaloc=1 / chromaloc-top=2 / chromaloc-bottom=2 / display-window=0 / master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(40000000,50) / max-cll=500,200 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / opt-qp-pps / opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / hdr / hdr-opt / no-dhdr10-opt / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=0 / no-limit-sao / ctu-info=0
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : PQ
Matrix coefficients                      : BT.2020 non-constant
Mastering display color primaries        : Display P3
Mastering display luminance              : min: 0.0050 cd/m2, max: 4000 cd/m2
Maximum Content Light Level              : 500 cd/m2
Maximum Frame-Average Light Level        : 200 cd/m2
Link to comment
Share on other sites

Support for HEVC in HLS varies from one device to another.

 

But maybe you've found the answer - HDR Hevc in HLS. Do you have non-hdr hevc to compare with?

Link to comment
Share on other sites

  • 4 weeks later...

Support for HEVC in HLS varies from one device to another.

 

But maybe you've found the answer - HDR Hevc in HLS. Do you have non-hdr hevc to compare with?

 

 

It's not a HDR issue.

 

I've got another HEVC/4K/HDR file with TrueHD and it DirectStreams fine.  It's even a much higher bit rate.

 

I really don't know why one plays fine and not the other.  There is some encoding differences between the files I have so I suspect that the way the video stream has been encoded is impacting it's ability to be split and streamed via HLS.

 

Are you able to send me the MediaInfo output for you file to confirm?  Thanks

Edited by SamES
Link to comment
Share on other sites

Barlog9511

Hi @@SamES

 

I update Emby to version 4.0.2 and artifacts disappear, but I have problems with playing as well

 

this is my media info output

General
Unique ID                                : 78162701324270964954682774450656844174 (0x3ACD96B52391CDE15DE8E7B19C45198E)
Complete name                            : Z:\Filmy\4K\The Darkest Minds\The Darkest Minds(2018)(CZEN)[HEVC][2160pHD].mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 49.5 GiB
Duration                                 : 1 h 43 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 68.3 Mb/s
Encoded date                             : UTC 2018-10-29 22:26:00
Writing application                      : mkvmerge v28.0.0 ('Voice In My Head') 64-bit
Writing library                          : libebml v1.3.6 + libmatroska v1.4.9

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Commercial name                          : HDR10
Format profile                           : Main 10@L5.1@High
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 1 h 43 min
Bit rate                                 : 62.7 Mb/s
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0 (Type 2)
Bit depth                                : 10 bits
Bits/(Pixel*Frame)                       : 0.315
Stream size                              : 45.5 GiB (92%)
Writing library                          : ATEME Titan File 3.8.16 (4.8.16.0)      
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : PQ
Matrix coefficients                      : BT.2020 non-constant
Mastering display color primaries        : Display P3
Mastering display luminance              : min: 0.0050 cd/m2, max: 1000 cd/m2

Audio #1
ID                                       : 2
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                                 : 1 h 43 min
Bit rate mode                            : Variable
Bit rate                                 : 4 384 kb/s
Maximum bit rate                         : 8 790 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)
Compression mode                         : Lossless
Delay relative to video                  : -1 ms
Stream size                              : 3.18 GiB (6%)
Language                                 : English
Default                                  : Yes
Forced                                   : No
Number of dynamic objects                : 13
Bed channel count                        : 1 channel
Bed channel configuration                : LFE

Audio #2
ID                                       : 3
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : A_AC3
Duration                                 : 1 h 43 min
Bit rate mode                            : Constant
Bit rate                                 : 640 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Bit depth                                : 16 bits
Compression mode                         : Lossy
Delay relative to video                  : -1 ms
Stream size                              : 475 MiB (1%)
Language                                 : English
Service kind                             : Complete Main
Default                                  : No
Forced                                   : No

Audio #3
ID                                       : 4
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : A_AC3
Duration                                 : 1 h 43 min
Bit rate mode                            : Constant
Bit rate                                 : 448 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 333 MiB (1%)
Language                                 : Czech
Service kind                             : Complete Main
Default                                  : No
Forced                                   : No

Text
ID                                       : 5
Format                                   : PGS
Muxing mode                              : zlib
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 1 h 42 min
Bit rate                                 : 44.7 kb/s
Count of elements                        : 2576
Stream size                              : 32.8 MiB (0%)
Language                                 : Czech
Default                                  : Yes
Forced                                   : No


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...