Skip to content

Conversation

@broganross
Copy link

Firstly, I've never written in perl before so if there's something seriously wrong, my apologies.

My main purpose was to be able to parse progress information out of the script. Adding the log-level option does that. All the other changes are things I ran into along the way.

Added File::Slurp to README requirements, as it doesn't seem to a builtin. At least in some older OS versions.

Added option to control ffmpeg's log level. Adding this option gives enough information for a system calling the encode script to collect progress from the script.

Make reading chunk file paths absolute to the temporary chunk directory. Looping through the chunk files in the tmp directory was erring, saying it couldn't find the file. Concatenating the build_dir and filename together into an absolute path fixed that.

Added removing temp chunk directory. The build_dir wasn't removed after the encode script completed.

Moved the "Success" print to after clean up, for reasons...

Added removing temp chunk directory
Added option to control ffmpeg's log level
Make reading chunk file paths absolute to the temporary chunk directory
@msheby
Copy link
Contributor

msheby commented Dec 1, 2021

Hi Brogan,

I've got two questions related to the non-logging changes:

  1. If we change the assignment of $build_dir from tempdir to tempdir(CLEANUP => 1) (see https://metacpan.org/pod/File::Temp#FUNCTIONS), we can eliminate the need for the explicit rmtree() import and use. Does that work on your platform?
  2. Similarly, the prefix option to read_dir() (see https://metacpan.org/pod/File::Slurp#read_dir) already should be doing the work that obviates the need for an explicit import and use of catfile(). If you update this module, do you also get this behavior?

@broganross
Copy link
Author

Since this was 3 years ago, I have no memory of this. I'll have to dig into it when I get a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants