-
Notifications
You must be signed in to change notification settings - Fork 2
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
ffmpeg with nice/ionice #1192
base: main
Are you sure you want to change the base?
ffmpeg with nice/ionice #1192
Conversation
@@ -25,6 +25,7 @@ func MuxTStoMP4(tsInputFile, mp4OutputFile string) ([]string, error) { | |||
// transmux the .ts file into a standalone MP4 file | |||
ffmpegErr := bytes.Buffer{} | |||
err := ffmpeg.Input(tsInputFile). | |||
SetFfmpegPath("/path/to/ffmpeg-nice.sh"). |
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.
@@ -81,7 +82,7 @@ func MuxTStoFMP4(fmp4ManifestOutputFile string, inputs ...string) error { | |||
|
|||
timeout, cancel := context.WithTimeout(context.Background(), 10*time.Minute) | |||
defer cancel() | |||
cmd := exec.CommandContext(timeout, "ffmpeg", args...) | |||
cmd := exec.CommandContext(timeout, "/path/to/ffmpeg-nice.sh", args...) |
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.
This is pseudo-code or just a starting point for discussion. I'm not even sure if these two places are the correct ones for VOD processing
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.
This is just the MP4 generation step. There's ffmpeg usage in different places for for segmenting, thumbnailing, clipping, etc. Just grep-ing ffmpeg
or CommandContext | grep ffmpeg
should get you most of the instances.
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.
So we're not fully sure yet but it looks like some ffmpeg
for big VODs are congesting both disk writes on datapacket servers and generate big egress spikes resulting in entire server slowdown and k3s restarts.
We're testing with Rafał if moving VOD processing onto just one of the nodes in the cluster results in less or zero restarts of the rest of the nodes.
What problem are we trying to solve? nice-ing to such a low priority may make the full transcode cycle much slower. Did this change make some problems go away? |
33e8784
to
752e8a1
Compare
No description provided.