Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some videos stutters ever since mpv-x86_64-20240820-git-67e087d release #14806

Closed
6 tasks done
vagabondshrimp opened this issue Sep 6, 2024 · 15 comments
Closed
6 tasks done

Comments

@vagabondshrimp
Copy link

vagabondshrimp commented Sep 6, 2024

mpv Information

mpv v0.38.0-747-g0eb5e914 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
 built on Sep  6 2024 00:10:54
libplacebo version: v7.349.0 (v7.349.0-9-gefb8934-dirty)
FFmpeg version: N-116878-ga49188297
FFmpeg library versions:
   libavcodec      61.11.100
   libavdevice     61.2.100
   libavfilter     10.2.102
   libavformat     61.5.101
   libavutil       59.35.100
   libswresample   5.2.100
   libswscale      8.2.100

Other Information

- Windows version: 11
- GPU model, driver and version: intel hd graphics 500
- Source of mpv: Shinchiro
- Introduced in version: mpv-x86_64-20240820-git-67e087d

Reproduction Steps

Tried all mpv version after mpv-x86_64-20240819-git-a3baf94 release, with and without config.

Expected Behavior

Video plays normally

Actual Behavior

Video stutters

Log File

mpv-x86_64-20240906-git-0eb5e91 (stutters)
log.txt

mpv-x86_64-20240819-git-a3baf94 (doesn't stutter)
log.txt

Sample Files

sample.mp4

I carefully read all instruction and confirm that I did the following:

  • I tested with the latest mpv version to validate that the issue is not already fixed.
  • I provided all required information including system and mpv version.
  • I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • I attached the full, untruncated log file.
  • I attached the backtrace in the case of a crash.
@vagabondshrimp vagabondshrimp changed the title Some videos stutters ever since mpv-x86_64-20240819-git-a3baf94 release Some videos stutters ever since mpv-x86_64-20240820-git-67e087d release Sep 6, 2024
@llyyr
Copy link
Contributor

llyyr commented Sep 6, 2024

Can you provide logs with --no-config?

FWIW

[   3.127][w][cplayer] Invalid video timestamp: 0.291956 -> 0.208540
[   3.127][d][vo/gpu-next/libplacebo] Non monotonically increasing PTS 0.291956 -> 0.208540
[   3.130][d][vo/gpu-next] Render queue underrun.
[   3.159][v][vo/gpu-next] Forcing queue refill, PTS(0.208540 + 0.000000 | 0.000000) < VPTS(0.291956)
[   3.159][d][vo/gpu-next/libplacebo] First frame received with non-zero PTS 0.208540

Though I don't see what could cause this in that regression range.

edit:

There are some ffmpeg hevc refactors in that regression range, can you reproduce with any other codec?

@obscenelyvague
Copy link

It is a HEVC specific bug. I think it has something to do with one of the encoding settings, which there are plenty of if you take a look at the sample OP linked.

Encoding settings : cpuid=1111039 / frame-threads=4 / wpp / 
no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / 
input-csp=1 / input-res=1920x800 / 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

@llyyr
Copy link
Contributor

llyyr commented Sep 6, 2024

I can reproduce the stutter with ffplay from master, I'll bisect what caused it

@llyyr
Copy link
Contributor

llyyr commented Sep 6, 2024

Caused by FFmpeg/FFmpeg@2fdecbb

@kungfubeaner
Copy link

I have this exact same issue since the very same version. I was going to post but I found this before I posted luckily. I'm still running the one for windows v3 version from 2004-08-17 for that reason. I have a Terminator 2 clip that makes it easy to reproduce. If i hit forward arrow on keyboard to skip ahead it will stutter non stop. Today's release still has the issue.

@llyyr
Copy link
Contributor

llyyr commented Sep 9, 2024

Please report to https://trac.ffmpeg.org. I reported on IRC but it doesn't seem trivial to diagnose why it happens so it might get forgotten.

BtbN pushed a commit to FFmpeg/FFmpeg that referenced this issue Sep 13, 2024
pkt_dts needs to be set manually when using the receive_frame() callback, so
it was unset after 2fdecbb.

Fixes PTS guessing for certain files with broken timestamps. Cf.
mpv-player/mpv#14806

Reported-by: llyyr <[email protected]>
@llyyr
Copy link
Contributor

llyyr commented Sep 13, 2024

Fixed upstream

@kasper93
Copy link
Contributor

Fixed by: FFmpeg/FFmpeg@b538006

richardpl pushed a commit to librempeg/librempeg that referenced this issue Sep 13, 2024
pkt_dts needs to be set manually when using the receive_frame() callback, so
it was unset after 2fdecbb239714b6203e37067fda2521f80e19d47.

Fixes PTS guessing for certain files with broken timestamps. Cf.
mpv-player/mpv#14806

Reported-by: llyyr <[email protected]>
Signed-off-by: Paul B Mahol <[email protected]>
@hooke007
Copy link
Contributor

I noticed this commit. I doubt it wasn't fixed clearly.
I can still get the 'stutter' here.
Ref: shinchiro/mpv-winbuild-cmake#705

@llyyr
Copy link
Contributor

llyyr commented Oct 15, 2024

Are you sure it's the same issue? Would be helpful if you could bisect since the issue should be reproducible with ffplay as well.

@hooke007
Copy link
Contributor

Does ffplay have the option like --hwdec=yes --hr-seek-framedrop=no ?

@llyyr
Copy link
Contributor

llyyr commented Oct 16, 2024

Does ffplay have the option like --hwdec=yes --hr-seek-framedrop=no ?

The issue linked in this ticket only happens on certain (broken) files that ffmpeg manages to playback correctly with PTS guessing. If your issue happens with all hevc files, or only when seeking, or only with hwdec, then it's a different issue.

@obscenelyvague
Copy link

It's not the same issue but probably another regression caused by the refactor. I can share sample.
https://files.catbox.moe/1chkj1.mkv

@llyyr
Copy link
Contributor

llyyr commented Nov 4, 2024

It's not the same issue but probably another regression caused by the refactor. I can share sample.

Can't reproduce here with hwdec_vaapi or hwdec_vulkan. I'm not saying it's impossible for a regression to only affect d3d11va, but I can't report this upstream myself. I'd recommend bisecting ffmpeg and making sure it's the same commit that causes the regression, then reporting it on trac.

@kasper93
Copy link
Contributor

kasper93 commented Nov 4, 2024

to only affect d3d11va

Doesn't happen on my end.

reporting it on trac

That would be best idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants