Skip to content
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

Merged
merged 18 commits into from
Oct 12, 2023
Merged

Fix: Silent ffmpeg bug (SOFIE-2650) #102

merged 18 commits into from
Oct 12, 2023

Conversation

nytamin
Copy link
Contributor

@nytamin nytamin commented Sep 25, 2023

(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

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.
@nytamin nytamin marked this pull request as ready for review September 27, 2023 13:10
@nytamin nytamin changed the base branch from master to develop September 27, 2023 13:13
@nytamin nytamin changed the base branch from develop to master September 27, 2023 13:13
@nytamin nytamin requested a review from jstarpl September 27, 2023 13:13
@nytamin nytamin changed the title Fix: Silent ffmpeg bug Fix: Silent ffmpeg bug (SOFIE-2650) Sep 28, 2023
specificWorker: any
specificWorker: any,
/** An FYI, the work will be considered timed out if there are no progression reports within this interval*/
progressTimeout: number
Copy link
Member

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?

@nytamin nytamin merged commit 2ca1c0a into master Oct 12, 2023
3 of 7 checks passed
@nytamin nytamin deleted the fix/silent-ffmpeg branch October 12, 2023 12:15
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.

2 participants