Conversation
|
bestsource is too slow. That's much much much slower then ffprobe that took less then 1 second for both video :/ I'm not sure I will replace bestsource with ffprobe because of that. |
|
I should maybe try to add ffms2: https://github.com/FFMS/ffms2 ffms2 use autotools. To build it, we should look how to "call" autotools in meson: https://mesonbuild.com/External-Project-module.html |
bf28343 to
52a0a28
Compare
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14 +/- ##
==========================================
- Coverage 97.77% 97.45% -0.32%
==========================================
Files 18 17 -1
Lines 1574 1614 +40
==========================================
+ Hits 1539 1573 +34
- Misses 35 41 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cbd9bf4 to
f378abe
Compare
c0960bf to
6daf3a2
Compare
|
Waiting fix for:
TODO:
|
pyproject.toml
Outdated
| [build-system] | ||
| requires = ["setuptools"] | ||
| build-backend = "setuptools.build_meta" | ||
| requires = ["meson @ git+https://github.com/moi15moi/meson.git@fix", "meson-python", "pybind11==2.13.6"] |
There was a problem hiding this comment.
I'm waiting for meson to fix this problem: mesonbuild/meson#13916
Currently, I set a branch that has the fix.
I'm also waiting pybind11 to fix this issue with the version 3.0.0: pybind/pybind11#5750
| Note: If None, it will try to guess it from the PTS and fps. | ||
| use_ffprobe_to_guess_fps (bool): If True, use ffprobe to guess the video fps. | ||
| If False, the fps will be approximate from the first and last frame PTS. | ||
| use_video_provider_to_guess_fps (bool): If True, use the video_provider to guess the video fps. |
There was a problem hiding this comment.
Is there a reason why this option could be needed? I see you're anyway computing them using the video provider.
If the concern was on performance optimization maybe this param should be passed to video_provider.get_pts
There was a problem hiding this comment.
use_video_provider_to_guess_fps is needed because the fps from the provider is, in 99% of case, better then the one we approximate with the first and last pts. For CFR video, setting use_video_provider_to_guess_fps to true is always a good choice. For VFR video, it depends, but in general, it is better to set use_video_provider_to_guess_fps to false.
The fps will be used to approximate the timestamps after the video duration. This is a case that pretty much no one use, so you probably don't really care about this option.
53c0cb4 to
9110eba
Compare
06ea10f to
a54e29b
Compare
495bba5 to
e910304
Compare
b0f1877 to
52be80a
Compare
6fdd1a6 to
e6b8ad6
Compare
This was needed because the user doesn't always have ffprobe installed and using ffms2/bestsource is more reliable. There are some minor breaks: - Removed __version__ of _version.py - Removed video_timestamps/ffprobe/* - Renamed use_ffprobe_to_guess_fps to use_video_provider_to_guess_fps param of VideoTimestamps.from_video_file - Added video_provider param to VideoTimestamps.from_video_file
It adapt the CI to properly build the wheel and test them.
0c9a731 to
0df3ef8
Compare
…project module with ffms2 gstreamer ffmpeg isn't always up to date. For example, ffmpeg 8.0 have been released 2025-08-22, but as of 2025-10-20, gstreamer still only use the version 7.1. Also, I don't like the fact that gstreamer doesn't use the official build system. There might be difference, so let's not take any chance and use the official build system. I wanted to use the ffmpeg build system with meson External Project module https://mesonbuild.com/External-Project-module.html, but it just doesn't work. It seems that subproject (in this case bestsource) can't depend on a external project module because they don't use -uninstalled.pc, but i'm not sure. Also, the external project module doesn't use the .pc file to retrieve the dependencies, so I need to maintain it manually which sucks: mesonbuild/meson#14767 Finally, the external project module doesn't work on msys2. There is a PR that have been opened almost a year ago and work fine, but for a reason, it's not getting merge: mesonbuild/meson#13916 So, for all these reason, let's directly use autotools for ffms2 and the official ffmpeg build system by building them "manually".
nanobind allow to use the limited api which will help to have less wheel. Currently, I have this issue: mesonbuild/meson#15172 When it is fixed, we will be able to use the limited api.
0df3ef8 to
24d6f64
Compare
|
The PR is not perfect, but it's been open for a while and it does work, so I will merge it.
|
This PR replace ffprobe with bestsource and ffms2. It should be better than using ffprobe + it won't require the user to install any external dependency (previously, we were asking the user to install ffprobe + adding it to the PATH)
TODO