-
Notifications
You must be signed in to change notification settings - Fork 442
Investigate ffmpegcv
backend for video input
#505
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
Comments
It seems this library might not do end-to-end GPU decoding unfortunately, but we might want to consider handling an ffmpeg decode pipe ourselves.
…On Sun, Apr 27, 2025 at 5:47 PM Nilas ***@***.***> wrote:
*NevermindNilas* left a comment (Breakthrough/PySceneDetect#505)
<#505 (comment)>
In theory it's just a fancy wrapper around ffmpeg's -f rawvideo piping,
you can achieve similar results by calling a subprocess.popen and piping
the stdout to a variable. Cuda accel is achieved through -hwaccel cuda.
—
Reply to this email directly, view it on GitHub
<#505 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA6TBFBLWZLTHGCMQIZPSL23VF63AVCNFSM6AAAAAB3EM32FKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMZTGY2TINZRGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Moviepy afaik already integrates a similar approach to piping ffmpeg's rawvideo stdout. But if you wish to add it yourself you have to make sure that all color formats are supported which is a pain, assuming your internal pipeline works with rgb24 / bgr24, in that case yuv420p, rgb24 or bgr24 will work just fine because FFMPEG can internally change the color format to the desired color format, but the moment you have yuv420p10le or yuv444p inputs the pipeline breaks. Maybe you could use kornia's built in functions in order to accurately estimate the bytesizes of each frame but as you can imagine, it's a pretty error prone / fragile workflow. I have a similar approach right here altho' deprecated for a good while now due to the reasons mentioned above: If you wish to add such workflow lmk as I am willing to contribute to the best of my knowledge, but I'd suggest sticking with pyav for the simplicity and look for other opportunities to improve performance. |
Uh oh!
There was an error while loading. Please reload this page.
See if https://github.com/chenxinfeng4/ffmpegcv is worth adding as a backend. It might be useful in the future, especially as it supports GPU (CUDA).
The text was updated successfully, but these errors were encountered: