OpenELEC / OpenELEC.tv

OpenELEC - The living room PC for everyone
http://openelec.tv
1.61k stars 882 forks source link

[RPi] r12458 Audio - Delay in every MKV-File with AC3-Stream #1468

Closed klopsknoedel closed 11 years ago

klopsknoedel commented 11 years ago

Sound comes ~200ms to late in every MKV-file i've tested.

Here's a representative sample media info:

General Unique ID : XXXXX Complete name : file.mkv Format : Matroska Format version : Version 2 File size : 1.51 GiB Duration : 41mn 45s Overall bit rate : 5 189 Kbps Encoded date : UTC 2010-06-01 21:27:48 Writing application : mkvmerge v3.3.0 ('Language') gebaut am Mar 24 2010 14:59:24 Writing library : libebml v0.8.0 + libmatroska v0.9.0

Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L3.1 Format settings, CABAC : No Format settings, ReFrames : 2 frames Codec ID : V_MPEG4/ISO/AVC Duration : 41mn 45s Bit rate : 4 189 Kbps Width : 1 280 pixels Height : 720 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 25.000 fps Original frame rate : 23.976 fps Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.182 Stream size : 1.22 GiB (81%) Default : Yes Forced : No Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709

Audio #1 ID : 2 Format : AC-3 Format/Info : Audio Coding 3 Mode extension : CM (complete main) Format settings, Endianness : Big Codec ID : A_AC3 Duration : 41mn 45s Bit rate mode : Constant Bit rate : 448 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 : 134 MiB (9%) Language : German Default : Yes Forced : No

Audio #2 ID : 3 Format : AC-3 Format/Info : Audio Coding 3 Mode extension : CM (complete main) Format settings, Endianness : Big Codec ID : A_AC3 Duration : 41mn 45s Bit rate mode : Constant Bit rate : 448 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 : 134 MiB (9%) Language : English Default : No Forced : No

lrusak commented 11 years ago

report to xbmc

Or you can try setting the latency in advancedsettings.xml

<advancedsettings>
  <video>
    <refresh>
      <min>23</min>
      <max>26</max>
      <delay>200</delay>
    </refresh>
  </video>
</advancedsettings>
klopsknoedel commented 11 years ago

latency is not working for me because other files without AC3 - Streams work as expected. May this correspond with Issue #1276

Edit: Could someone please add this report to "XBMC Upstream"?

popcornmix commented 11 years ago

Can you run: tvservice -d edid.dat edidparser edid.dat and post that here. (I'm interested if your tv/receiver reports a non-zero audio or video latency)

klopsknoedel commented 11 years ago

Here it is:

Enabling fuzzy format match... Parsing edid.dat... HDMI:EDID version 1.3, 1 extensions, screen size 16x9 cm HDMI:EDID features - videodef 0x80 !standby !suspend !active off; colour encoding:RGB444|YCbCr422; sRGB is not default colourspace; preferred format is native; does not support GTF HDMI:EDID found monitor range descriptor tag 0xfd HDMI:EDID monitor range offsets: V min=0, V max=0, H min=0, H max=0 HDMI:EDID monitor range: vertical is 57-63 Hz, horizontal is 31-82 kHz, max pixel clock is 160 MHz HDMI:EDID monitor range does not support GTF HDMI:EDID found monitor name descriptor tag 0xfc HDMI:EDID monitor name is LG_TV HDMI:EDID found preferred CEA detail timing format: 1920x1080p @ 60 Hz (16) HDMI:EDID found DMT detail timing format: 1360x768p @ 60 Hz (39) HDMI:EDID established timing I/II bytes are A1 08 00 HDMI:EDID found DMT format: code 4, 640x480p @ 60 Hz in established timing I/II HDMI:EDID found DMT format: code 9, 800x600p @ 60 Hz in established timing I/II HDMI:EDID found DMT format: code 16, 1024x768p @ 60 Hz in established timing I/II HDMI:EDID standard timings block x 8: 0x7140 81C0 8100 8180 9500 9040 A9C0 B300 HDMI:EDID unknown standard timing 1152x864 @ 60 Hz aspect ratio (4:3) HDMI:EDID found DMT format: code 85, 1280x720p @ 60 Hz (16:9) in standard timing 1 HDMI:EDID found DMT format: code 28, 1280x800p @ 60 Hz (16:10) in standard timing 2 HDMI:EDID found DMT format: code 35, 1280x1024p @ 60 Hz (5:4) in standard timing 3 HDMI:EDID found DMT format: code 47, 1440x900p @ 60 Hz (16:10) in standard timing 4 HDMI:EDID found DMT format: code 42, 1400x1050p @ 60 Hz (4:3) in standard timing 5 HDMI:EDID found DMT format: code 83, 1600x900p @ 60 Hz (16:9) in standard timing 6 HDMI:EDID found DMT format: code 58, 1680x1050p @ 60 Hz (16:10) in standard timing 7 HDMI:EDID parsing v3 CEA extension 0 HDMI:EDID monitor support - underscan IT formats:yes, basic audio:yes, yuv444:yes, yuv422:yes, #native DTD:1 HDMI:EDID found CEA detail timing format: 1920x1080i @ 60 Hz (5) HDMI:EDID failed to find a matching detail format for 1280x720p hfp:110 hs:136 hbp:138 vfp:5 vs:5 vbp:16 pixel clock:74 MHz HDMI:EDID calculated refresh rate is 60 Hz HDMI:EDID guessing the format to be 1280x720p @60 Hz HDMI:EDID found CEA detail timing format: 1280x720p @ 60 Hz (4) HDMI:EDID found CEA detail timing format: 1920x1080p @ 60 Hz (16) HDMI:EDID found DMT detail timing format: 1360x768p @ 60 Hz (39) HDMI:EDID found CEA format: code 16, 1920x1080p @ 60Hz HDMI:EDID found CEA format: code 31, 1920x1080p @ 50Hz HDMI:EDID found CEA format: code 4, 1280x720p @ 60Hz (native) HDMI:EDID found CEA format: code 19, 1280x720p @ 50Hz HDMI:EDID found CEA format: code 5, 1920x1080i @ 60Hz HDMI:EDID found CEA format: code 20, 1920x1080i @ 50Hz HDMI:EDID found CEA format: code 3, 720x480p @ 60Hz HDMI:EDID found CEA format: code 2, 720x480p @ 60Hz HDMI:EDID found CEA format: code 18, 720x576p @ 50Hz HDMI:EDID found CEA format: code 32, 1920x1080p @ 24Hz HDMI:EDID found CEA format: code 33, 1920x1080p @ 25Hz HDMI:EDID found CEA format: code 34, 1920x1080p @ 30Hz HDMI:EDID found CEA format: code 21, 1440x576i @ 50Hz HDMI:EDID found CEA format: code 1, 640x480p @ 60Hz HDMI:EDID found audio format 6 channels AC3, sample rate: 32|44|48 kHz, bitrate: 640 kbps HDMI:EDID found audio format 2 channels PCM, sample rate: 32|44|48|96|192 kHz, sample size: 16|20|24 bits HDMI:EDID found HDMI VSDB length 7 HDMI:EDID HDMI VSDB has physical address 2.0.0.0 HDMI:EDID HDMI VSDB supports AI:yes, dual link DVI:no HDMI:EDID HDMI VSDB deep colour support - 48-bit:no 36-bit:yes 30-bit:yes DC_yuv444:yes HDMI:EDID HDMI VSDB max TMDS clock 225 MHz HDMI:EDID HDMI VSDB has no latency information HDMI:EDID extended data block tag 0x05 length 3 not supported HDMI:EDID adding mandatory support for CEA (17) 720x576p @ 50Hz HDMI:EDID filtering formats with pixel clock > 162 MHz or h. blanking > 1023 HDMI:EDID best score mode initialised to CEA (1) 640x480p @ 60 Hz with pixel clock 25 MHz (score 18432) HDMI:EDID best score mode is now CEA (1) 640x480p @ 60 Hz with pixel clock 25 MHz (score 61864) HDMI:EDID best score mode is now CEA (2) 720x480p @ 60 Hz with pixel clock 27 MHz (score 66472) HDMI:EDID CEA mode (3) 720x480p @ 60 Hz with pixel clock 27 MHz has a score of 66472 HDMI:EDID best score mode is now CEA (4) 1280x720p @ 60 Hz with pixel clock 74 MHz (score 3690888) HDMI:EDID DMT mode (4) 640x480p @ 60 Hz with pixel clock 25 MHz has a score of 18432 HDMI:EDID best score mode is now CEA (5) 1920x1080i @ 60 Hz with pixel clock 74 MHz (score 4273832) HDMI:EDID DMT mode (9) 800x600p @ 60 Hz with pixel clock 40 MHz has a score of 28800 HDMI:EDID best score mode is now CEA (16) 1920x1080p @ 60 Hz with pixel clock 148 MHz (score 5398248) HDMI:EDID DMT mode (16) 1024x768p @ 60 Hz with pixel clock 65 MHz has a score of 47185 HDMI:EDID CEA mode (17) 720x576p @ 50 Hz with pixel clock 27 MHz has a score of 66472 HDMI:EDID CEA mode (18) 720x576p @ 50 Hz with pixel clock 27 MHz has a score of 66472 HDMI:EDID CEA mode (19) 1280x720p @ 50 Hz with pixel clock 74 MHz has a score of 117160 HDMI:EDID CEA mode (20) 1920x1080i @ 50 Hz with pixel clock 74 MHz has a score of 128680 HDMI:EDID CEA mode (21) 1440x576i @ 50 Hz with pixel clock 27 MHz has a score of 45736 HDMI:EDID DMT mode (28) 1280x800p @ 60 Hz with pixel clock 83 MHz has a score of 86440 HDMI:EDID CEA mode (31) 1920x1080p @ 50 Hz with pixel clock 148 MHz has a score of 232360 HDMI:EDID CEA mode (32) 1920x1080p @ 24 Hz with pixel clock 74 MHz has a score of 124532 HDMI:EDID CEA mode (33) 1920x1080p @ 25 Hz with pixel clock 74 MHz has a score of 128680 HDMI:EDID CEA mode (34) 1920x1080p @ 30 Hz with pixel clock 74 MHz has a score of 149416 HDMI:EDID DMT mode (35) 1280x1024p @ 60 Hz with pixel clock 108 MHz has a score of 103643 HDMI:EDID DMT mode (39) 1360x768p @ 60 Hz with pixel clock 85 MHz has a score of 4562668 HDMI:EDID DMT mode (42) 1400x1050p @ 60 Hz with pixel clock 121 MHz has a score of 113200 HDMI:EDID DMT mode (47) 1440x900p @ 60 Hz with pixel clock 106 MHz has a score of 102760 HDMI:EDID DMT mode (58) 1680x1050p @ 60 Hz with pixel clock 146 MHz has a score of 130840 HDMI:EDID DMT mode (83) 1600x900p @ 60 Hz with pixel clock 108 MHz has a score of 111400 HDMI:EDID DMT mode (85) 1280x720p @ 60 Hz with pixel clock 74 MHz has a score of 80296 HDMI:EDID preferred mode remained as CEA (16) 1920x1080p @ 60 Hz with pixel clock 148 MHz HDMI:EDID has HDMI support and audio support edid_parser exited with code 0

popcornmix commented 11 years ago

Unfortunately your TV/receiver is not indicating different audio/video latency: HDMI:EDID HDMI VSDB has no latency information

so there is nothing that can be done automatically there.

Do you have AC3 passthough enabled in xbmc settings?

klopsknoedel commented 11 years ago

Yes, passthrough for whole audio because I thought reencoding could cause latency.

klopsknoedel commented 11 years ago

Sorry, I accidently closed this issue.

sraue commented 11 years ago

closing for now, please report to trac.xbmc.org