python-scraperlib icon indicating copy to clipboard operation
python-scraperlib copied to clipboard

allow specifying reencode's tmp dir

Open rgaudin opened this issue 1 year ago • 1 comments

reencode() uses a temporary file to encode into.

Once ffmpeg complete, if all went well, that temp file is copied into destination.

  • Copying is very safe (considering we could be on different filesystems) but it's unnecessarily slow if on the same filesystem. We should first attempt to move and only copy as fallback.
  • encoding is not just CPU intensive, it can consume a lot of space and is subject to disk speed to some extent. For those reasons, we should be able to provide a temp folder to use and only fallback to system's should it not be provided.

rgaudin avatar May 14 '24 12:05 rgaudin

Agreed!

benoit74 avatar May 14 '24 12:05 benoit74