Skip to content

Conversation

@LukasKalbertodt
Copy link
Member

The script:

  • Finds the most CPU-intensive ffmpeg process
  • Parses its command line to find the input file
  • Checks the fd of that file for that process
  • Checks the byte offset of the process in the file
  • Calculates the percentage

Like obviously, this might not be accurate for many reasons, but in my test it actually is very accurate. And it's an easy non-intrusive way to check progress. (I had way weirder ideas before :D). Most of the code was written by AI, as bash and in particular sed/awk stuff is really not my area of expertise, nor fun. But from looking over it, looks like even if there are random failures, nothing catastrophic would happen (I don't see any way these commands would ever write anything). And I tested it on OC explore. But as usual, maybe check the script yourself before running it on your production server ;-)

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.

1 participant