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

Scaling of Transcoder #74

Closed
cjagadis opened this issue Feb 19, 2020 · 11 comments
Closed

Scaling of Transcoder #74

cjagadis opened this issue Feb 19, 2020 · 11 comments
Assignees

Comments

@cjagadis
Copy link

We tried the transcoder with a Single CPU (1.6 GHz, 3.75 GB) and one 480P RTMP Stream. It was CPU bound with 100% usage. And then next we tried with 4 core CPU (1.6 GHz, 3.75 GB) with 4 480P Streams and the CPU usage was again 100% for the transcoder. Does the transcoder scale linearly? The output to the player was pretty bad with 4 RTMP Stream and we were unable to get the streams to the player. If we just sent a single stream (single CPU), the behavior is perfect but CPU usage is 100%.

Any ideas on how to scale the transcoder? We always try to scale with the cheapest servers on GCP Compute Engine for we know to manage allocation/deallocation at a massive scale.

BTW, can we avoid transcoding if we stream RTMP with H264, OPUS? If we stream this, my hope is you can extract H264/OPUS and no transcoding is required for webRTC. Does this make sense?

I do appreciate your help in advance.

@Keukhan
Copy link
Member

Keukhan commented Feb 24, 2020

Hello, @cjagadis

Transcoding requires a lot of CPU performance. So, It's expensive in a GCP environment.

Fortunately, I committed the bypass function today.

If you do not change the resolution, the video codec can bypass and only audio can be transcode to Opus.

Below is a sample encode configuration.
<Encode> <Name>video_bypass_audio_opus</Name> <Video> <Bypass>true</Bypass> </Video> <Audio> <Codec>opus</Codec> <Bitrate>64000</Bitrate> <Samplerate>48000</Samplerate> <Channel>2</Channel> <Bypass>false</Bypass> </Audio> </Encode>
Try the latest dev branch.

One important thing is that required encoder(Such as OBS) setting.

1) H264.KeyInterval = 1~2 (recommend)
2) H264.BFrames = 0 (must)

If you have any more questions, feel free to contact us.

Thank you.

@duiniuluantanqin
Copy link

Hello, @cjagadis

Transcoding requires a lot of CPU performance. So, It's expensive in a GCP environment.

Fortunately, I committed the bypass function today.

If you do not change the resolution, the video codec can bypass and only audio can be transcode to Opus.

Below is a sample encode configuration.
<Encode> <Name>video_bypass_audio_opus</Name> <Video> <Bypass>true</Bypass> </Video> <Audio> <Codec>opus</Codec> <Bitrate>64000</Bitrate> <Samplerate>48000</Samplerate> <Channel>2</Channel> <Bypass>false</Bypass> </Audio> </Encode>
Try the latest dev branch.

One important thing is that required encoder(Such as OBS) setting.

1) H264.KeyInterval = 1~2 (recommend) 2) H264.BFrames = 0 (must)

If you have any more questions, feel free to contact us.

Thank you.

hello, i have the same question, and i use it in docker.i need to confirm that bypass is supported in docker or not.
Thank you.

@getroot
Copy link
Member

getroot commented Mar 3, 2020

It also works with Docker.
You can find the image at airensoft / ovenmediaengine: latest on DockerHub. It is installed by default in / opt / ovenmediaengine / bin.

@cjagadis
Copy link
Author

cjagadis commented Mar 3, 2020 via email

@cjagadis
Copy link
Author

cjagadis commented Mar 3, 2020 via email

@getroot
Copy link
Member

getroot commented Mar 3, 2020

Thank you!

@getroot getroot closed this as completed Mar 3, 2020
@duiniuluantanqin
Copy link

It also works with Docker.
You can find the image at airensoft / ovenmediaengine: latest on DockerHub. It is installed by default in / opt / ovenmediaengine / bin.

hello,
i had test the Bypass with docker. CPU usage dropped from 150% to 30%. But, the video clip, and the audio is normal.

@getroot
Copy link
Member

getroot commented Mar 5, 2020

@duiniuluantanqin
Thanks for sharing your experience.

@duiniuluantanqin
Copy link

@duiniuluantanqin
Thanks for sharing your experience.

How can I solve this problem?
I do appreciate your help in advance.

@getroot
Copy link
Member

getroot commented Mar 6, 2020

Sorry, I didn't understand your problem.
You said "Video clip and the audio is normal." and CPU usage dropped from 150% to 30%.
What is the problem? Please upload your Server.xml with the problem.

@getroot getroot reopened this Mar 6, 2020
@getroot
Copy link
Member

getroot commented Mar 30, 2020

This issue has been closed since it has been inactive for quite some time. If you want to continue discussing this issue, please feel free to reopen it.

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

No branches or pull requests

4 participants