jellyfin / jellyfin-androidtv

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

Stuttering Playback for Certain mp4 Files on New Devices #4055

Open Nerokor opened 1 week ago

Nerokor commented 1 week ago

Describe the bug

I am experiencing an issue with media playback in the Jellyfin Android TV app where certain .mp4 videos stutter, while the audio plays fine throughout the playback. This issue does not occur with all .mp4 files, only specific ones. Notably, the problematic files play fine on a range of older Fire TV Stick models without stuttering, but they stutter on the newest 16GB Fire TV Stick model and the Insignia TV model.

Additionally, if I take the troubled .mp4 files and recontainer them into .mkv files using MKVToolNix, they play fine on all devices without any stuttering.

Logs

No response

FFmpeg logs

No response

Media info of the file

General
Complete name                            : ..\Annabelle.Comes.Home.2019.1080p.BluRay.x265.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/mp41)
File size                                : 1.65 GiB
Duration                                 : 1 h 46 min
Overall bit rate                         : 2 230 kb/s
Frame rate                               : 23.976 FPS
Movie name                               : Annabelle.Comes.Home.2019.1080p.BluRay.x265
Encoded date                             : 2020-04-25 13:42:45 UTC
Tagged date                              : 2020-04-25 13:42:45 UTC
Writing application                      : Lavf58.20.100
Comment                                  : Annabelle.Comes.Home.2019.1080p.BluRay.x265

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L4@Main
Codec ID                                 : hev1
Codec ID/Info                            : High Efficiency Video Coding
Duration                                 : 1 h 46 min
Bit rate                                 : 2 001 kb/s
Width                                    : 1 920 pixels
Height                                   : 802 pixels
Display aspect ratio                     : 2.39:1
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.054
Stream size                              : 1.48 GiB (90%)
Writing library                          : x265 3.3+4-rxrx-30eb4de83092:[Linux][GCC 8.3.1][64 bit] 10bit
Encoding settings                        : cpuid=1111039 / frame-threads=4 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=1920x802 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=4 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=23 / keyint=250 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=25 / lookahead-slices=4 / scenecut=40 / hist-scenecut=0 / radl=0 / no-splice / 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 / strong-intra-smoothing / max-merge=3 / limit-refs=3 / limit-modes / me=3 / subme=3 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / no-sao / no-sao-non-deblock / rd=4 / selective-sao=0 / 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 / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=abr / bitrate=2000 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=2 / cplxblur=20.0 / qblur=0.5 / ipratio=1.40 / pbratio=1.30 / aq-mode=3 / 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=2 / transfer=2 / colormatrix=2 / 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 / hist-threshold=0.01 / no-opt-cu-delta-qp / no-aq-motion / no-hdr10 / no-hdr10-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=0 / analysis-save-reuse-level=0 / analysis-load-reuse-level=0 / 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 / no-scenecut-aware-qpconformance-window-offsets / right=0 / bottom=0
Encoded date                             : 2020-04-25 13:42:45 UTC
Tagged date                              : 2020-04-25 13:42:45 UTC
Codec configuration box                  : hvcC

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 1 h 46 min
Duration_LastFrame                       : -11 ms
Bit rate mode                            : Constant
Bit rate                                 : 224 kb/s
Channel(s)                               : 6 channels
Channel layout                           : C L R Ls Rs LFE
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 170 MiB (10%)
Language                                 : English
Default                                  : Yes
Alternate group                          : 1
Encoded date                             : 2020-04-25 13:42:45 UTC
Tagged date                              : 2020-04-25 13:42:45 UTC

Application version

0.17.6

Device information

INSIGNIA_NS-50F301NA24

Android version

Fire OS 7.6.8.1

Jellyfin server version

10.9.11

plauk commented 1 week ago

I've encountered this same issue. It only affects some mp4s and turning them into mkv files does indeed fix the issue.

But the problem is not only happening for me on my TV, it also affects playback in the web player and on my Android phone. I've since tested the problematic files by playing them directly via a plain html file with a video element, directly from my laptop in Edge (chromium) and the issue is present. (mp4 file stutters, mkv plays smooth).

Also note that I was able to get the file to play smoothly on my TV by forcing the video to open in an external player (ie. VLC).

Don't know if it's that some mp4 files are just broken, or there's a bug in the jellyfin Android/AndroidTV playback that is also a problem in Chromium browsers.