-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Silent ffmpeg bug (SOFIE-2650) #102
Conversation
There was an issue where ffmpeg didn't output any progress reports for certain files. My findings show that it helps if we don't do the scene detection.
specificWorker: any | ||
specificWorker: any, | ||
/** An FYI, the work will be considered timed out if there are no progression reports within this interval*/ | ||
progressTimeout: number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it reasonable to assume that all expectation will be able to provide periodical progress reports? I suspect that this will be the case for many of them, but if PM will be interacting with a remote system and having it do the operations, I expect it is quite likely that the API available may not provide progress reports or the progress report frequency may not be controllable. As such, wouldn't it make sense to move knowledge on the progressTimeout deeper into the expectations, so that they can make the judgement on what is an unacceptable amount of time to wait for a progress report?
… events, other than "error"
There was an issue in production when watching many files (over 9000), where chokidar choked on the initial watch and subsequently caused the whole worker to be sluggish
(builds upon #101)
This PR attempts to fix a bug we've found where (for certain media files) ffmpeg doesn't output any progress messages
(
frame= 1 fps=0.2 q=-0.0 Lsize=N/A time=00:00:04.28 bitrate=N/A speed=0.722x speed= 1.8x
)which PM uses to emit
progress
events.I have found that if we omit the scene detection from the ffmpeg command, it outputs the messages again.
So, if we detect that there are no progression events being emitted, we restart ffmpeg and try again, without the scene detection.
Additional information
Tested in prod-like environment and it seems to work well