Skip to content

Conversation

@pwilczynskiclearcode
Copy link
Contributor

No description provided.

// transmux the .ts file into a standalone MP4 file
ffmpegErr := bytes.Buffer{}
err := ffmpeg.Input(tsInputFile).
SetFfmpegPath("/path/to/ffmpeg-nice.sh").
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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...)
Copy link
Contributor Author

@pwilczynskiclearcode pwilczynskiclearcode Mar 26, 2024

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

Copy link
Collaborator

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.

Copy link
Contributor Author

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.

@emranemran
Copy link
Collaborator

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?

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.

3 participants