FFmpeg: nicer process report #99912
Labels
No Label
Good First Issue
Priority
High
Priority
Low
Priority
Normal
Status
Archived
Status
Confirmed
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Job Type
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: studio/flamenco#99912
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
FFmpeg can report its progress in a machine-readable way (see Stack Overflow). It would be nice to include this in Flamenco Worker, so that it can send progress info to the Manager.
Changed status from 'Needs Triage' to: 'Confirmed'
Added subscriber: @dr.sybren
Hey all. I stumbled on this looking for something else and just wanted to give a little back.
This is not specific to Flamenco - I use a highly modified version of the Pandora Render Farm Manager. It is open source and I have added/modified it to suite our needs. One of the things I did was write a "Preview Maker" that uses FFMPEG to create a vid clip from the rendered image sequences from the UI. I wanted it to be fast and simple with a nice GUI. One of the things is to have FFMPEG progress in the GUI.
So here is the code, maybe it will help. Obviously it will not work on it's own, but maybe you can use some of the code for Flamenco. I am sure this could be written cleaner and/or better, but it works for me.
J.
Thanks for the script @JBreckeen. Am I right that it's parsing FFmpeg's regular output, and is not using its
-progress
argument to send progress reports?(I'm asking because I couldn't find this, but the script you sent is large so I might have missed something)
My pleasure.
And correct, it is just reading the "output = self.proc.stderr.readline()" and then:
And example command is:
And just calling it using subprocess in a thread with a hidden window:
It seems to be working without errors now. I did keep finding failures such as when the first frame was not "1", but solved it. Have not had an error in awhile now.
But again, I am not coder and there might be better ways to do it . . .
J.
Running FFmpeg is handled, we already have code for that :)
The question I have mostly is what would be a better approach in the long run:
-progress
will give us output from FFmpeg that's intended to be read by code. It is likely more stable / future-proof, but also requires a bit more effort on the Flamenco side (it needs to open a network socket to receive the info).