You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a bit of a pain because to do this in python we need to use process_map, but this requires all arguments to the mapped function can be pickled. Pickling is possible in pybind11 (see https://pybind11.readthedocs.io/en/stable/advanced/classes.html#pickling-support) but seems to be designed for binary streams, which would result in many large copies. Using shared_ptr didn't work out in my attempts.
An alternative is to load everything into numpy and use python shared memory. This doubles memory use, and is a big faff.
Perhaps a practical alternative is just to wrap a raw pointer in a class, and be careful how you use it.
It's a fairly marginal gain as the ffmpeg encoding takes ages (single threaded) anyway.
The text was updated successfully, but these errors were encountered:
This is a bit of a pain because to do this in python we need to use
process_map
, but this requires all arguments to the mapped function can be pickled. Pickling is possible in pybind11 (see https://pybind11.readthedocs.io/en/stable/advanced/classes.html#pickling-support) but seems to be designed for binary streams, which would result in many large copies. Usingshared_ptr
didn't work out in my attempts.An alternative is to load everything into numpy and use python shared memory. This doubles memory use, and is a big faff.
Perhaps a practical alternative is just to wrap a raw pointer in a class, and be careful how you use it.
It's a fairly marginal gain as the ffmpeg encoding takes ages (single threaded) anyway.
The text was updated successfully, but these errors were encountered: