qfjp / MediaLibraryCompression

A script to convert video files to x265 codec in mp4 containers. Forces hvc1 for MacOS Big Sur compatibility
GNU General Public License v3.0
2 stars 1 forks source link

̶F̶i̶x̶ ̶#̶6̶ ̶-̶ ̶C̶h̶e̶c̶k̶ ̶f̶o̶r̶ ̶e̶x̶i̶s̶t̶i̶n̶g̶ ̶f̶i̶l̶e̶s̶ ̶t̶h̶a̶t̶ ̶a̶r̶e̶ ̶b̶e̶i̶n̶g̶ ̶p̶r̶o̶c̶e̶s̶s̶e̶d̶.̶ #7

Closed qfjp closed 1 year ago

qfjp commented 1 year ago

A start at avoiding collisions from simultaneous (or maybe parallel?) runs.

If a file exists with the name it should have after/during converting, this tests if the file is a complete conversion. Right now, the only action taken is to print whether or not the file is verified to be a complete-copied-transcode. This is because the file might be a work-in-progress by another process (or potentially this one if parallel threads are implemented).

In addition:

  1. process_vidlist calculates and returns the total size saved over the course of compressing all of the input files. More information about file sizes are printed during the full run as well.
  2. Flags are introduced to process_vidlist which control whether you want the old file deleted, or bad (new) conversions removed. By default, operating on a single file (through a CLI argument) does not replace the original file to compress. Otherwise, both replacment of old files and deletion of (bad) new files are the defaults.
  3. The user-defined-limit is now a global variable NUM_TO_PROCESS
qfjp commented 1 year ago

Wrong issue number in title; rolled back main and applied the commit with the proper message