jellyfin / jellyfin-androidtv

Android TV Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
2.72k stars 464 forks source link

Video is shown in black playing directly #292

Closed 97carmine closed 2 years ago

97carmine commented 4 years ago

The app does not display the video correctly (only sound) showing only a black screen. Play directly.

AndroidTV

Video ID : 1 Format : HEVC Format/Info : High Efficiency Video Coding Format profile : @L5@Main Codec ID : V_MPEGH/ISO/HEVC Duration : 23 min 42 s Bit rate : 3 362 kb/s Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 23.976 (24000/1001) FPS Chroma subsampling : 4:4:4 Bit depth : 10 bits Bits/(Pixel*Frame) : 0.068 Stream size : 570 MiB (80%) Writing library : x265 - H.265/HEVC codec Default : Yes Forced : No

Audio ID : 2 Format : FLAC Format/Info : Free Lossless Audio Codec Codec ID : A_FLAC Duration : 23 min 42 s Bit rate mode : Variable Bit rate : 755 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 48.0 kHz Frame rate : 11.719 FPS (4096 SPF) Bit depth : 16 bits Compression mode : Lossless Stream size : 128 MiB (18%) Writing library : libFLAC 1.3.1 (UTC 2014-11-25) Language : Japanese Default : Yes Forced : No

Text ID : 3 Format : ASS Codec ID : S_TEXT/ASS Codec ID/Info : Advanced Sub Station Alpha Duration : 22 min 55 s Bit rate : 17.1 kb/s Count of elements : 15959 Compression mode : Lossless Stream size : 2.80 MiB (0%) Language : Spanish Default : Yes Forced : No

Menu 00:00:00.000 : en:Prologue 00:00:51.760 : en:Opening 00:02:21.767 : en:Part A 00:11:42.743 : en:Eyecatch 00:11:52.170 : en:Part B 00:22:16.377 : en:Ending 00:23:24.319 : en:Preview

Artiume commented 4 years ago

can you post your ffmpeg logs?

97carmine commented 4 years ago

I was wrong, I thought it transcoded but it is not so. Play directly.

Artiume commented 4 years ago

So I suspect the issue is the exo player can't play h265. Your file is 10bit so it may be that it can't play 10bit only. Can you find a file that is 8bit and see if that plays?

Looks like we need to update the profile to say it doesn't support 10bit

97carmine commented 4 years ago

I have tried both 10bit and 8bit available, and this is my result:

File that does not work ``` General Unique ID : 278570239432440072230465496332587102103 (0xD192AD33F0E15D07F428F80BB4F1EF97) Complete name : S21E01 - ¡El País de Wano! Hacia la tierra de los Sakuras y los Samuráis.mkv Format : Matroska Format version : Version 4 File size : 205 MiB Duration : 23 min 50 s Overall bit rate : 1 204 kb/s Encoded date : UTC 2019-07-07 21:13:54 Writing application : mkvmerge v35.0.0 ('All The Love In The World') 64-bit Writing library : libebml v1.3.9 + libmatroska v1.5.2 Video ID : 1 Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main@L5.1@Main Codec ID : V_MPEGH/ISO/HEVC Duration : 23 min 50 s Bit rate : 1 110 kb/s Width : 1 920 pixels Height : 1 080 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 Bit depth : 8 bits Bits/(Pixel*Frame) : 0.022 Stream size : 189 MiB (92%) Default : Yes Forced : No Audio ID : 2 Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Codec ID : A_AAC-2 Duration : 23 min 50 s Bit rate : 92.3 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 44.1 kHz Frame rate : 43.066 FPS (1024 SPF) Compression mode : Lossy Delay relative to video : 22 ms Stream size : 15.7 MiB (8%) Language : Japanese Default : Yes Forced : No Menu 00:00:10.510 : en:Opening Theme 00:02:10.631 : en:Recap 00:03:07.688 : en:Part A 00:15:21.129 : en:Part B 00:23:17.314 : en:Next Episode Preview ```

This, unlike the previous one that only the sound is heard, stays charging until the app closes. It also plays directly.

File that works ``` General Unique ID : 233051462504157835762707990198043997707 (0xAF54143AC9283D541F33536CE366F60B) Complete name : S01E01 - La historia de Daigo.mkv Format : Matroska Format version : Version 4 File size : 982 MiB Duration : 23 min 46 s Overall bit rate mode : Variable Overall bit rate : 5 778 kb/s Encoded date : UTC 2019-12-29 19:30:18 Writing application : mkvmerge v38.0.0 ('The Silent Type') 64-bit Writing library : libebml v1.3.9 + libmatroska v1.5.2 Video ID : 1 Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main 10@L4@Main Codec ID : V_MPEGH/ISO/HEVC Duration : 23 min 46 s Bit rate : 4 691 kb/s Width : 1 920 pixels Height : 1 080 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 Bit depth : 10 bits Bits/(Pixel*Frame) : 0.094 Stream size : 798 MiB (81%) Writing library : x265 3.2+9-971180b100f8:[Windows][MSVC 1923][64 bit] 10bit Encoding settings : cpuid=1111039 / frame-threads=3 / numa-pools=12 / wpp / pmode / pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=1920x1080 / interlace=0 / total-frames=34200 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / no-open-gop / min-keyint=23 / keyint=250 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=40 / lookahead-slices=6 / scenecut=40 / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=1 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=3 / limit-refs=1 / no-limit-modes / me=2 / subme=4 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / weightb / no-analyze-src-pics / deblock=-1:-2 / sao / no-sao-non-deblock / rd=4 / selective-sao=4 / early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / b-intra / no-splitrd-skip / rdpenalty=1 / psy-rd=4.00 / psy-rdoq=10.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=20.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=3 / aq-strength=0.90 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=0 / overscan=0 / videoformat=5 / range=0 / colorprim=1 / transfer=1 / colormatrix=1 / chromaloc=0 / display-window=0 / cll=0,0 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / no-hdr / no-hdr-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / no-field / qp-adaptation-range=1.00 Default : Yes Forced : No Color range : Limited Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709 Audio ID : 2 Format : FLAC Format/Info : Free Lossless Audio Codec Codec ID : A_FLAC Duration : 23 min 46 s Bit rate mode : Variable Bit rate : 1 085 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 48.0 kHz Frame rate : 11.719 FPS (4096 SPF) Bit depth : 24 bits Compression mode : Lossless Stream size : 184 MiB (19%) Writing library : libFLAC 1.3.3 (UTC 2019-08-04) Language : Japanese Default : Yes Forced : No Menu 00:00:00.000 : :Prologo 00:09:00.930 : :Parte A 00:11:34.920 : :Parte B 00:22:10.890 : :Ending 00:23:40.890 : :Prossimo episodio ```
Artiume commented 4 years ago

So the file that isn't working is 8 bit, but the 10 bit did work, correct? The very first file was reported as not working but was 10bit.

I'm a little confused, either it's deeper than a bit issue or perhaps you can clarify what I'm missing.

The encoding levels differ as well, so maybe that's involved too

97carmine commented 4 years ago

I admit that since I updated the MiBox S to Android TV 9.0 it has been doing very strange things. Auto adjust screen preferences and it works normally.

The videos indicated in the previous comment already play correctly.

With respect to the first video, it plays correctly with ExoPlayer but not with libVLC, it stays loading until you close the app

Artiume commented 4 years ago

Ok, so to keep a clean environment, please break down what works and doesnt work and for which player.

97carmine commented 4 years ago

The only video that is not displayed correctly (causes app closes) is the one indicated at the beginning using libVLC.

With ExoPlayer you play it correctly.

Artiume commented 4 years ago

@nielsvanvelzen @thornbill you two might know better how to handle x265 libvlc issues and compatibility.

nielsvanvelzen commented 4 years ago

So if I understand it correctly the videoplayer crashed when playing the video from the issue description when using LibVLC but ExoPlayer works fine?

I use ExoPlayer only on my set-up because it works well for pretty much everything since the upgrade so I don't know a lot about playback with LibVLC.

I would recommend using the "Auto" mode or force ExoPlayer for now.

stale[bot] commented 4 years ago

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments. If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label. This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

supersebbo commented 3 years ago

I am having the same problem with LibVLC on Android (FireTV) with 4K 10bit hevc source. If left on Auto then the client chooses LibVLC to play this source and DirectStreams but ultimately fails to display any video, just a blank screen with audio. If I force ExoPlayer it works, but only with a full transcode to x264 8bit (very processor intensive).

So I think this is still an issue and needs to be reopened.

vdmkenny commented 3 years ago

Same issue, with libVLC selected as the player, it plays everything with a black screen, only audio. With exoplayer, it seems to work fine.

stale[bot] commented 2 years ago

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments. If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label. This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

TheDom42 commented 2 years ago

I ran into this issue today, but in another way: For me, the screen turns black and only audio is playing, when trying to play a Dolby Vision HEVC file actually using the ExoPlayer backend (which also only works when forcing maximum bitrate although it's on LAN). When direct playing from the server, DV bug on the TV is actually triggered, so it apparently recognizes the file but doesn't display it. When using LibVLC, the TV only reports HDR playback (not DV) but at least plays it correctly.

My setup:

The file, I tried to play was the following:

Mediainfo ``` General Unique ID : XXX Complete name : XXX Format : Matroska Format version : Version 2 File size : 63.9 GiB Duration : 3 h 16 min Overall bit rate mode : Variable Overall bit rate : 46.7 Mb/s Movie name : Apocalypse Now - UHD Encoded date : XXX Writing application : XXX Writing library : XXX Video ID : 1 ID in the original source m : 4113 (0x1011) Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main 10@L5.1@High HDR format : Dolby Vision, Version 1.0, dvhe.07.06, BL+EL+RPU, Blu-ray compatible / SMPTE ST 2086, HDR10 compatible Codec ID : V_MPEGH/ISO/HEVC Duration : 3 h 16 min Bit rate : 40.8 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.205 Stream size : 55.8 GiB (87%) Language : English Default : No Forced : No Color range : Limited Color primaries : BT.2020 Transfer characteristics : PQ Matrix coefficients : BT.2020 non-constant Mastering display color pri : Display P3 Mastering display luminance : min: 0.0010 cd/m2, max: 1000 cd/m2 Maximum Content Light Level : 1000 cd/m2 Maximum Frame-Average Light : 363 cd/m2 Original source medium : Blu-ray Audio #1 ID : 2 ID in the original source m : 4352 (0x1100) Format : MLP FBA Format/Info : Meridian Lossless Packing FBA Commercial name : Dolby TrueHD Codec ID : A_TRUEHD Duration : 3 h 16 min Bit rate mode : Variable Bit rate : 1 884 kb/s Maximum bit rate : 2 601 kb/s Channel(s) : 6 channels Channel layout : L R C LFE Ls Rs Sampling rate : 48.0 kHz Frame rate : 1 200.000 FPS (40 SPF) Bit depth : 24 bits Compression mode : Lossless Stream size : 2.58 GiB (4%) Title : Surround 5.1 Language : German Default : Yes Forced : No Original source medium : Blu-ray Audio #2 ID : 3 ID in the original source m : 4352 (0x1100) Format : AC-3 Format/Info : Audio Coding 3 Commercial name : Dolby Digital Codec ID : A_AC3 Duration : 3 h 16 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) Compression mode : Lossy Stream size : 628 MiB (1%) Title : Surround 5.1 Language : German Service kind : Complete Main Default : No Forced : No Original source medium : Blu-ray Audio #3 ID : 4 ID in the original source m : 4354 (0x1102) Format : MLP FBA Format/Info : Meridian Lossless Packing FBA Commercial name : Dolby TrueHD Codec ID : A_TRUEHD Duration : 3 h 16 min Bit rate mode : Variable Bit rate : 3 005 kb/s Maximum bit rate : 4 188 kb/s Channel(s) : 6 channels Channel layout : L R C LFE Ls Rs Sampling rate : 48.0 kHz Frame rate : 1 200.000 FPS (40 SPF) Bit depth : 24 bits Compression mode : Lossless Stream size : 4.12 GiB (6%) Title : Surround 5.1 Language : English Default : No Forced : No Original source medium : Blu-ray Audio #4 ID : 5 ID in the original source m : 4354 (0x1102) Format : AC-3 Format/Info : Audio Coding 3 Commercial name : Dolby Digital Codec ID : A_AC3 Duration : 3 h 16 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) Compression mode : Lossy Stream size : 628 MiB (1%) Title : Surround 5.1 Language : English Service kind : Complete Main Default : No Forced : No Original source medium : Blu-ray Text #1 ID : 6 ID in the original source m : 4768 (0x12A0) Format : PGS Codec ID : S_HDMV/PGS Codec ID/Info : Picture based subtitle format used on BDs/HD-DVDs Duration : 3 h 13 min Bit rate : 28.6 kb/s Frame rate : 0.376 FPS Count of elements : 4362 Stream size : 39.6 MiB (0%) Language : German Default : No Forced : No Original source medium : Blu-ray Text #2 ID : 8 ID in the original source m : 4769 (0x12A1) Format : PGS Codec ID : S_HDMV/PGS Codec ID/Info : Picture based subtitle format used on BDs/HD-DVDs Duration : 3 h 11 min Bit rate : 37.3 kb/s Frame rate : 0.342 FPS Count of elements : 3922 Stream size : 50.9 MiB (0%) Language : English Default : No Forced : No Original source medium : Blu-ray Text #3 ID : 10 ID in the original source m : 4770 (0x12A2) Format : PGS Codec ID : S_HDMV/PGS Codec ID/Info : Picture based subtitle format used on BDs/HD-DVDs Duration : 3 h 14 min Bit rate : 72 b/s Frame rate : 0.005 FPS Count of elements : 54 Stream size : 103 KiB (0%) Language : German Default : No Forced : No Original source medium : Blu-ray Text #4 ID : 11 ID in the original source m : 4770 (0x12A2) Format : PGS Codec ID : S_HDMV/PGS Codec ID/Info : Picture based subtitle format used on BDs/HD-DVDs Duration : 1 h 20 min Bit rate : 171 b/s Frame rate : 0.001 FPS Count of elements : 6 Stream size : 101 KiB (0%) Language : German Default : No Forced : No Original source medium : Blu-ray Text #5 ID : 12 ID in the original source m : 4772 (0x12A4) Format : PGS Codec ID : S_HDMV/PGS Codec ID/Info : Picture based subtitle format used on BDs/HD-DVDs Duration : 3 h 14 min Bit rate : 40.7 kb/s Frame rate : 0.372 FPS Count of elements : 4348 Stream size : 56.8 MiB (0%) Language : English Default : No Forced : No Original source medium : Blu-ray Menu 00:00:00.000 : en:Chapter 01 00:09:23.396 : en:Chapter 02 00:20:22.471 : en:Chapter 03 00:24:08.905 : en:Chapter 04 00:31:13.329 : en:Chapter 05 00:34:09.589 : en:Chapter 06 00:45:00.948 : en:Chapter 07 00:52:03.870 : en:Chapter 08 01:03:25.968 : en:Chapter 09 01:17:09.333 : en:Chapter 10 01:34:16.942 : en:Chapter 11 01:39:35.594 : en:Chapter 12 01:49:19.928 : en:Chapter 13 01:55:03.104 : en:Chapter 14 02:27:39.141 : en:Chapter 15 02:36:23.874 : en:Chapter 16 02:45:17.866 : en:Chapter 17 03:03:08.769 : en:Chapter 18 03:10:10.023 : en:Chapter 19 ```
jbishop129 commented 2 years ago

I am seeing this too, for freshly re-encoded h.265 content (processed by either Tdarr or Unmanic), so far everywhere I've tested, except using the Infuse app on Apple TV; there, playback is normal.

Places it doesn't work:

Places it does work:

In Jellyfin, I have the per-user Transcode settings turned off, because my Jellyfin server is a low-power ARM SoC. If I re-enable transcoding, playback works (but experience is terrible due to low powered system, thus the desire for direct-play)

Hope this helps, and I'm happy to help chase down any details that might help move this issue forward

Akiva-J commented 4 months ago

I too have this issue.

App: Jellyfin Android Player: Exoplayer Playback: Direct File: 10Bit, HVEC, DV

Plays fine on same device if I drop quality to force transcoding. I can also play other 10bit, HVEC files but it seems to be the Dolby Vision that is breaking the playback for me and only showing black video.