mpv-player / mpv-player/mpv

Using lavfi-complex, various properties relating to frame count '0' or 'not available'

Open
#16,399 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

os:win
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

mpv Information
mpv 0.39.0 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
 built on Sep 28 2024 01:30:48
libplacebo version: v7.349.0 (v7.349.0-13-ga018ab0-dirty)
FFmpeg version: N-117212-g01c47dd23
FFmpeg library versions:
   libavcodec      61.20.100
   libavdevice     61.4.100
   libavfilter     10.5.100
   libavformat     61.8.100
   libavutil       59.40.100
   libswresample   5.4.100
   libswscale      8.4.100
Other Information
- Windows version: 11
- GPU model, driver and version: Nvidia Geforce RTX 2060
- Source of mpv: official
- Latest known working version: ?
- Issue started after the following happened: n/a
Reproduction Steps

mpv "test.mp4" "--lavfi-complex=[vid1]scale=100:100[vo];[aid1]aresample=async=1[ao]" --script=mpv-frame-report.lua

mpv-frame-report.lua:

local msg = require("mp.msg")
mp.enable_messages("info")
mp.add_periodic_timer(1, function ()
    msg.info("estimated-frame-count: "..tostring(mp.get_property_native("estimated-frame-count")))
    msg.info("estimated-frame-number: "..tostring(mp.get_property_native("estimated-frame-number")))
end)

I think these properties depend on container_fps, but when using lavfi-complex container_fps = 0

Expected Behavior

Outputs correct values.

Actual Behavior
[mpv_frame_report] estimated-frame-count: 0
[mpv_frame_report] estimated-frame-number: 0
[mpv_frame_report] estimated-frame-count: 0
[mpv_frame_report] estimated-frame-number: 0
[mpv_frame_report] estimated-frame-count: 0
[mpv_frame_report] estimated-frame-number: 0
...
Log File

out.txt

Sample Files

https://0x0.st/83eT.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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the reported mpv command with lavfi-complex and mpv-frame-report.lua, then trace how estimated-frame-count and estimated-frame-number are computed when container_fps is 0. Compare the property behavior with and without lavfi-complex and use the supplied log and sample file to confirm the cause. Done means the properties report correct values instead of 0 or unavailable.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
audio-video-rtc, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.