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(preview): ffmpeg gets stuck when getting video cover #45722

Closed
wants to merge 2 commits into from
Closed

fix(preview): ffmpeg gets stuck when getting video cover #45722

wants to merge 2 commits into from

Conversation

ncheng89
Copy link

@ncheng89 ncheng89 commented Jun 8, 2024

Fixed the issue that ffmepg was stuck in getting the cover, which caused the PHP process to be blocked.

Summary

TODO

  • ...

Checklist

Fixed the issue that ffmepg was stuck in getting the cover, which caused the PHP process to be blocked.

Signed-off-by: ncheng89 <48044818+ncheng89@users.noreply.github.com>
@kesselb
Copy link
Contributor

kesselb commented Jun 8, 2024

Good idea to make the movie preview provider more robust by adding a timeout.

I used $cmd = ['/usr/bin/sleep', '60']; for testing.
Seems to work ;)

ffmpeg cannot extract an image for the given file.
That's not a temporary, I guess.

The timeout might help to reduce the impact, but Nextcloud will try to generate the preview again and again and again.
I wonder if we should use/generate a placeholder image for such cases.

We could also use the symfony process component (it's in 3rdparty) that provides this timeout logic already.

Related: #42545

@ncheng89
Copy link
Author

ncheng89 commented Jun 9, 2024

通过添加超时功能使电影预览提供程序更加强大是一个好主意。

我用来$cmd = ['/usr/bin/sleep', '60'];测试了。 似乎有效 ;)

ffmpeg 无法提取给定文件的图像。 我猜这不是临时的。

超时可能有助于减少影响,但 Nextcloud 会一次又一次地尝试生成预览。 我想知道我们是否应该针对这种情况使用/生成占位符图像。

我们还可以使用已经提供此超时逻辑的 symfony 进程组件(它在第三方中)。

相关:#42545

Of course, this fix includes the ffmpeg timeout problem. If ffmpeg fails to obtain the cover within the specified time, the task will be terminated and the ffmpeg process will be recycled and released.

@solracsf solracsf removed their request for review June 9, 2024 05:34
@Pytal Pytal requested review from a team, ArtificialOwl and yemkareems and removed request for a team June 10, 2024 16:22
@Pytal Pytal removed their request for review June 13, 2024 17:04
@solracsf solracsf added this to the Nextcloud 30 milestone Jun 18, 2024
Copy link
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@blizzz blizzz mentioned this pull request Jul 30, 2024
@joshtrichards joshtrichards requested a review from st3iny July 31, 2024 13:43
@blizzz blizzz mentioned this pull request Aug 1, 2024
This was referenced Aug 5, 2024
@ncheng89 ncheng89 closed this by deleting the head repository Aug 13, 2024
@skjnldsv skjnldsv removed this from the Nextcloud 30 milestone Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: ffmpeg gets stuck when getting video cover
6 participants