Output of yuv4mpegpipe doesn't have the same framerate as input video
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
mpv Information
mpv v0.41.0-dev-g41f6a6450 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
built on Dec 21 2025 19:30:47
libplacebo version: v7.358.0
FFmpeg version: f853d12
FFmpeg library versions:
libavcodec 62.11.100
libavdevice 62.1.100
libavfilter 11.4.100
libavformat 62.3.100
libavutil 60.8.100
libswresample 6.1.100
libswscale 9.1.100
Other Information
- Windows version: Windows 10 22H2
- GPU model, driver and version: NVIDIA GeForce RTX 5060 ver 32.0.15.9144
- Source of mpv: Latest stable release v0.41.0 41f6a64.
- Latest known working version: Unknown
- Issue started after the following happened: Unknown
Reproduction Steps
mpv --no-config input.mkv --audio=no --of=yuv4mpegpipe --ofopts=strict=experimental --gpu-debug --log-file=output.txt -o - > out.yuv
Expected Behavior
The yuv4mpegpipe copies the framerate from the input video
Actual Behavior
I haven't looked at how this works in the source code, but it appears the framerate and denominator don't get set at all, i can use videos with whatever framerate; in the YUV4 header the framerate will always be 24000:1 and there doesn't appear to be a way to overwrite it, which is problematic for when trying to pipe it to an encoder which tend to copy what's in the YUV4 header.
Before anyone questions it, i want to pass in the video through mpv since it renders .ass subtitles correctly and thus makes it the best way to hardsub a video, and i want a little more control over what encoder to use instead of relying what's in ffmpeg, the video i used for testing doesn't have any subtitles, but i just wanted to verify my observations.
Log File
Sample Files
No response
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the yuv4mpegpipe output path exercised by the reported mpv command and inspect how the YUV4 header obtains its framerate and denominator. Reproduce with the exact command and a video using a non-24000:1 framerate; done means the generated header reflects the input framerate and remains usable by a downstream encoder.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100