CarterLi / iina

The modern video player for macOS with additional features and bug fixes.
https://iina.io
GNU General Public License v3.0
678 stars 29 forks source link

Often duration is shown incorrectly for certain videos #27

Closed ViRo3 closed 2 years ago

ViRo3 commented 2 years ago

System and IINA version:

Expected behavior:

Show precise duration of the video

Actual behavior:

Attached sample : https://we.tl/t-CQ9a1TNIfS (PS : SFW)

CarterLi commented 2 years ago

It was incorrectly encoded

$ mediainfo /Users/carter/Downloads/x.mkv
General
Unique ID                                : 56443030197254426474604263747385083521 (0x2A76883E5131F4787F89747B68F0C681)
Complete name                            : /Users/carter/Downloads/x.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 37.4 MiB
Duration                                 : 22 min 14 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 235 kb/s
Movie name                               : Yuru Yuri Nachuyachumi!+ by Lazy Lily Fansubs
Encoded date                             : UTC 2020-04-03 07:08:56
Writing application                      : mkvmerge v23.0.0 ('The Bride Said No') 64-bit
Writing library                          : libebml v1.3.6 + libmatroska v1.4.9
Attachments                              : DENNE S OLD HANDWRITING.TTF / clearfag.ttf / BUBBLEGUM.TTF / BRLNSDB.TTF

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L4.1@High
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 1 min 31 s
Bit rate                                 : 1 677 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.034
Stream size                              : 18.2 MiB (49%)
Title                                    : Rom & Rem H265
Writing library                          : x265 3.2.1+1-b5c86a64bbbe:[Windows][GCC 9.2.0][64 bit] 10bit
Encoding settings                        : cpuid=1111039 / frame-threads=4 / numa-pools=8 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=1920x1080 / interlace=0 / total-frames=0 / level-idc=41 / 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=24 / keyint=240 / gop-lookahead=0 / bframes=6 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=25 / lookahead-slices=4 / scenecut=40 / 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-hme / weightp / no-weightb / no-analyze-src-pics / deblock=1:1 / sao / no-sao-non-deblock / rd=4 / selective-sao=4 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=0.40 / psy-rdoq=1.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 / vbv-maxrate=50000 / vbv-bufsize=50000 / vbv-init=0.9 / crf-max=0.0 / crf-min=0.0 / ipratio=1.40 / pbratio=1.30 / aq-mode=2 / aq-strength=0.40 / 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=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                                 : 1 min 31 s
Bit rate mode                            : Variable
Bit rate                                 : 1 723 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 11.724 FPS (4094 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossless
Stream size                              : 18.7 MiB (50%)
Writing library                          : libFLAC 1.2.1 (UTC 2007-09-17)
Language                                 : Japanese
Default                                  : Yes
Forced                                   : No

It is the container that insists on the duration of 22 min 14 s

ViRo3 commented 2 years ago

Thanks for the help! Appreciating it!