Replies: 8 comments 19 replies
-
I recall @Keukhan may have answered this. The thumbnail publisher currently decodes every frame whether it is creating a thumbnail or not. Your approach is more efficient although I wonder if there's a cost to spawning many short-lived FFmpeg processes at once. You guys operate at scale so I guess it's OK? Anyways, +1 for a more efficient thumbnail publisher. My application relies on "live" thumbnails and I definitely notice the impact on CPU. |
Beta Was this translation helpful? Give feedback.
-
Left hand side is OME with Thumbnail publisher disabled, blue line is Ruby Thumbnailer CPU usage, Right hand side is OME with Thumbnailer published enabeld, you can see it uses more CPU than the left side, it goes down as streams started to go offline |
Beta Was this translation helpful? Give feedback.
-
This is in our backlog. We will check to see if we can improve. |
Beta Was this translation helpful? Give feedback.
-
Hmm, at least my version of ffmpeg isn't doing any better than yours, even
after playing with a bunch of flags. I can document more later but gotta
run for now
…On Fri, Aug 9, 2024 at 3:57 PM bchah ***@***.***> wrote:
Appreciate it! I only tested the macOS homebrew version of FFmpeg 7.0 so
far. Could be that this particular build is missing a piece too.
—
Reply to this email directly, view it on GitHub
<#1447 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABV4BWJMJ2MWEPH74ELF4QLZQUNMJAVCNFSM6AAAAABJOM63GOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMRZGEYDQNI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Thank you for your patience. An option to decode only keyframes has been added to significantly reduce CPU usage when only the thumbnail publisher is used. It has been added to the master branch, but it has not been released yet. Please test it and let us know if you have any suggestions for improvements. Please refer to the link below for usage instructions. Gitbook : https://airensoft.gitbook.io/ovenmediaengine/dev/transcoding#keyframe-decoding-only Below are the results from my testing The feature to configure the number of decoding threads you requested has also been added Gitbook : https://airensoft.gitbook.io/ovenmediaengine/dev/transcoding#decoding-thread-configuration |
Beta Was this translation helpful? Give feedback.
-
Wow, perfect timing! We'll try it asap
I was just fighting with our current thumbnail setup
…On Mon, Nov 11, 2024 at 23:29 Keukhan Kwon ***@***.***> wrote:
@hernanrz <https://github.com/hernanrz> @bchah <https://github.com/bchah>
@naanlizard <https://github.com/naanlizard>
Thank you for your patience. An option to decode only keyframes has been
added to significantly reduce CPU usage when only the thumbnail publisher
is used. It has been added to the master branch, but it has not been
released yet. Please test it and let us know if you have any suggestions
for improvements.
Please refer to the link below for usage instructions.
Gitbook :
https://airensoft.gitbook.io/ovenmediaengine/dev/transcoding#keyframe-decoding-only
Github : 4dff75a
<4dff75a>
Below are the results from my testing
*Before*
image.png (view on web)
<https://github.com/user-attachments/assets/d933633a-4cc8-47a5-b911-9f0b984d8f3b>
*After*
image.png (view on web)
<https://github.com/user-attachments/assets/749cc28d-1084-4e4b-bf52-9d4dead4846f>
—
Reply to this email directly, view it on GitHub
<#1447 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABV4BWPB4USQMXE4C5J6EJT2AF7ZXAVCNFSM6AAAAABJOM63GOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCMRSGEZDEMQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
A question about the implementation:
When the option is enabled and ome only decodes key frames, how does the
screenshot output profile framerate setting interact?
If my stream has a keyframe interval of 1s and the target output is 1s, I
assume it works as expected and the image updates every 1s
If the KFI is 10s and the framerate is set to 1s, I think it would update
every 10s?
Similarly, KFI=1s, framerate 10s, image updates every 10s?
I think the flag name is confusing and will think of a better one.
KeyframeOnlyImages? Something like that
I will try a pull request with maybe a better name and also update the
gitbook
…On Mon, Nov 11, 2024 at 23:29 Keukhan Kwon ***@***.***> wrote:
@hernanrz <https://github.com/hernanrz> @bchah <https://github.com/bchah>
@naanlizard <https://github.com/naanlizard>
Thank you for your patience. An option to decode only keyframes has been
added to significantly reduce CPU usage when only the thumbnail publisher
is used. It has been added to the master branch, but it has not been
released yet. Please test it and let us know if you have any suggestions
for improvements.
Please refer to the link below for usage instructions.
Gitbook :
https://airensoft.gitbook.io/ovenmediaengine/dev/transcoding#keyframe-decoding-only
Github : 4dff75a
<4dff75a>
Below are the results from my testing
*Before*
image.png (view on web)
<https://github.com/user-attachments/assets/d933633a-4cc8-47a5-b911-9f0b984d8f3b>
*After*
image.png (view on web)
<https://github.com/user-attachments/assets/749cc28d-1084-4e4b-bf52-9d4dead4846f>
—
Reply to this email directly, view it on GitHub
<#1447 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABV4BWPB4USQMXE4C5J6EJT2AF7ZXAVCNFSM6AAAAABJOM63GOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCMRSGEZDEMQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Lastly, and I'll probably open a new ticket, but are PNG and jpeg the only
options for image output now? Any hope of webp?
…On Tue, Nov 12, 2024 at 00:19 Garrett B ***@***.***> wrote:
A question about the implementation:
When the option is enabled and ome only decodes key frames, how does the
screenshot output profile framerate setting interact?
If my stream has a keyframe interval of 1s and the target output is 1s, I
assume it works as expected and the image updates every 1s
If the KFI is 10s and the framerate is set to 1s, I think it would update
every 10s?
Similarly, KFI=1s, framerate 10s, image updates every 10s?
I think the flag name is confusing and will think of a better one.
KeyframeOnlyImages? Something like that
I will try a pull request with maybe a better name and also update the
gitbook
On Mon, Nov 11, 2024 at 23:29 Keukhan Kwon ***@***.***>
wrote:
> @hernanrz <https://github.com/hernanrz> @bchah <https://github.com/bchah>
> @naanlizard <https://github.com/naanlizard>
>
> Thank you for your patience. An option to decode only keyframes has been
> added to significantly reduce CPU usage when only the thumbnail publisher
> is used. It has been added to the master branch, but it has not been
> released yet. Please test it and let us know if you have any suggestions
> for improvements.
>
> Please refer to the link below for usage instructions.
>
> Gitbook :
> https://airensoft.gitbook.io/ovenmediaengine/dev/transcoding#keyframe-decoding-only
> Github : 4dff75a
> <4dff75a>
>
> Below are the results from my testing
>
> *Before*
> image.png (view on web)
> <https://github.com/user-attachments/assets/d933633a-4cc8-47a5-b911-9f0b984d8f3b>
>
> *After*
> image.png (view on web)
> <https://github.com/user-attachments/assets/749cc28d-1084-4e4b-bf52-9d4dead4846f>
>
> —
> Reply to this email directly, view it on GitHub
> <#1447 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABV4BWPB4USQMXE4C5J6EJT2AF7ZXAVCNFSM6AAAAABJOM63GOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCMRSGEZDEMQ>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***
> .com>
>
|
Beta Was this translation helpful? Give feedback.
-
On our website, we have noticed that enabling the thumbnail publisher (see config) increases OME's cpu usage a lot, when compared to a script that periodically runs ffmpeg to generate thumbnails by pulling the hls stream from OME. Any reasons this might happen and how can we reduce it?
Server.xml https://gist.github.com/hernanrz/0defd82474647685bc02bfe7e50c513a
thumbnail script for comparison https://gist.github.com/hernanrz/f9db82df1796b95209b425d51cab372b
Beta Was this translation helpful? Give feedback.
All reactions