(Go: >> BACK << -|- >> HOME <<)

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

Q: frame-exact (consistent) timing of lavfi audio waveform? #13424

Open
pjotrek-b opened this issue Feb 6, 2024 · 1 comment
Open

Q: frame-exact (consistent) timing of lavfi audio waveform? #13424

pjotrek-b opened this issue Feb 6, 2024 · 1 comment

Comments

@pjotrek-b
Copy link

I'm using ffmpeg's lavfi in mpv to display the audio waveforms:

mpv --log-file=audio_waveform.log ~/Video/dva_fidelity2-90s.avi --lavfi-complex='[aid1] asplit [ao] [a1] ; [a1] showwaves=size=600x200:rate=25:mode=line:colors=white:scale=sqrt:split_channels=1 [vida] ; [vid1] [vida] overlay=(W-w)/2:H-h [vo]' --pause

I'd like to show the waveform of the exact frame being shown.
My reference video is i-frame-only FFV1, PCM (so I don't expect any lossy-or-GOP related fuzzyness) 😉

In my screenshots, you can see the very same frame - with 2 different positions/offsets of the same audio waveform shown:
Screenshot_2024-02-06_11-02-21
Screenshot_2024-02-06_11-08-17

If I move back/forth (eg seek by-frame using ,and . keys) - the shown waveform is rendered with a changing offset, depending on how (much) I went back or forth.

Is there anything I can do to force mpv to show the same audio samples at the same time/position consistently?

Thank you very much in advance 😄

@pjotrek-b
Copy link
Author

I think the reason is, that the "showwaves" filter doesn't scale correctly to show only "the audio for the currently shown video frame", but rather increases the FPS value (to about 44.444 fps for a 25fps/48kHz source).

Is there any (other/better/consistent) way to have MPV show the audio waveform for the current frame/image?

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

1 participant