boyska/techrec

ffmpeg generation on a temporary directory

Opened this issue · 2 comments

If files are created directly on the output/ directory, there could be errors regarding an existing, but not correct, file.
This should be avoided creating the file, then doing a rename()

Also, failed generation leftovers should be deleted

Implementation:

  • force a "tmp directory" to be set; be it TECHREC_TMP
    • create a pre_check() for that
  • inside TECHREC_TMP create a tmpdir prefixed by forge-$RECID
  • Put our file inside that folder
  • Move after processing
  • Finally, remove the directory