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

Transcoding Bitrate Not in control #27

Closed
jacksonvm opened this issue Jun 3, 2019 · 16 comments
Closed

Transcoding Bitrate Not in control #27

jacksonvm opened this issue Jun 3, 2019 · 16 comments
Assignees
Labels
bug Confirmed as bug

Comments

@jacksonvm
Copy link

jacksonvm commented Jun 3, 2019

Hi Team,

I'm ingesting an RTMP feed with 1280x720p and Video Bitrate 1M, but in the OME server.xml also I have mentioned the H264 video bitrate as 500K ,RES 620x360 and Opus audio 96k. The output from OME are webrtc and HLS. I notice that the bandwidth of the output is always between 1.5M to 2.5M. But the resolution is getting changed which means Transcoding is working. I assume there is an issue with Bitrate Control.

Regards,

Jackson

@getroot
Copy link
Member

getroot commented Jun 3, 2019

We have been discussing the solution of the problem a while ago. This is an alternative to low latency and quality issues. Maybe we have to replace the encoder with OpenH264 to x264. If we solve the problem, I will reply again. Thank you for your contribution.

@getroot getroot added the bug Confirmed as bug label Jun 3, 2019
@jacksonvm
Copy link
Author

Thanks @JehoenHan for looking into the issue. I appreciate your contribution to the opensource community.

Is there any workaround where we can ingest RTMP and take webrtc out without transcoding?
If yes, Can you provide a sample conf xml for this?

Also i too agree and think that the Encoding should be replaced with HW accelerated NVENC or QSV.
Both have lowlatency capabilities and good bitrate control.

Regards,

Jackson

@getroot
Copy link
Member

getroot commented Jun 4, 2019

RTMP supports H.264 and AAC. However, to support WebRTC in most browsers, VP8 and OPUS are required. So we do not yet support bypass (or codec copy). We are going to support more ingest protocols (such as MPEGTS / UDP) and we plan to support bypass function at that time.

@Ape
Copy link

Ape commented Jun 10, 2019

I just wanted to leave a comment that I am really looking forward to having support for direct streaming without transcoding. UDP would be just fine as the input protocol.

@getroot getroot mentioned this issue Jun 11, 2019
@getroot
Copy link
Member

getroot commented Jun 11, 2019

We decided to develop the Bypass Profile (#28) feature in v1.0

@getroot
Copy link
Member

getroot commented Jun 11, 2019

Hardware accelerated transcoding is planned for #23 .

@sfreet
Copy link
Contributor

sfreet commented Jun 21, 2019

Hello @jacksonvm.
Bitrate issues have been fixed in version 1cc160f of the dev branch.
However, please note that this is not a release version but a development version.
If you want to test this, you need to run prerequisites script(misc/prerequisites.sh) before to run make.
Feedback is always welcome. :)

@janyo1201
Copy link

janyo1201 commented Jun 24, 2019

hi @sfreet
i download the dev version , and run misc/prerequisites.sh no probmel , but when i run make release , get the error message cannot find -lopenh264

make[1]: Entering directory '/ome/OvenMediaEngine-dev/src/projects/third_party/pugixml-1.9/scripts' ==== Building pugixml (release) ==== Creating gmake Creating gmake/Release pugixml.cpp Linking pugixml make[1]: Leaving directory '/ome/OvenMediaEngine-dev/src/projects/third_party/pugixml-1.9/scripts' [199/201| 99%] [prebuilt] Copying prebuilt library projects/third_party/pugixml-1.9/scripts/gmake/libpugixml.a to intermediates/RELEASE/prebuilt/libpugixml.a [200/201| 99%] [executable] Linking OvenMediaEngine... => bin/RELEASE/OvenMediaEngine /usr/bin/ld: cannot find -lopenh264 collect2: error: ld returned 1 exit status core/build_executable.mk:7: recipe for target 'bin/RELEASE/OvenMediaEngine' failed make: *** [bin/RELEASE/OvenMediaEngine] Error 1

@sfreet
Copy link
Contributor

sfreet commented Jun 24, 2019

Hello @janyo1201
Thank you for reporting this issue.
The problem was that the lopenh264 syntax remained which had to be removed.
I have fixed the issue now.
Could you get the latest source and try again?

@janyo1201
Copy link

@sfreet
i download new dev version and install it , so far so good .
thank you !

@jacksonvm
Copy link
Author

Hi Han,

I was able to solve it temporarily by setting RC_BITRATE_MODE in the file src/projects/transcode/codec/transcode_codec_enc_avc.cpp. Will soon test the libx264 built and update.

Regards,

Jackson

@sfreet
Copy link
Contributor

sfreet commented Jun 25, 2019

Hello @jacksonvm
Thank you for your feedback.
As you mentioned, using RC_BITRATE_MODE mode in openh264 can solve some of the problems.
However, that method was accompanied by a frame drop, so we were looking for alternatives.

@rubu
Copy link
Contributor

rubu commented Nov 29, 2019

@jacksonvm @Ape - are you still interrested in the video bypass feature? I actually implemented that for my needs, so if that is useful I can share a feature branch with you.

@jacksonvm
Copy link
Author

@rubu , Thats great, yes Im very much interested in the video bypass feature as re scaling and transcoding was eating up my CPU. Also I have tested out the x264 thread and it works flawless on the bitrate control side.

Regards,

Jackson

@rubu
Copy link
Contributor

rubu commented Dec 16, 2019

@jacksonvm - so I have a branch (https://github.com/rubu/OvenMediaEngine/tree/feature/dynamic-fragmentation-header) where I made the video bypass derived from master (seems to work in our uses cases, just set true in the video encode you need to bypass. I will try and integrate these changes in upstream dev, so that it is released as a part of the official release, but if you wan't to try it out, you can simply clone that branch.

@getroot
Copy link
Member

getroot commented Mar 31, 2020

This has been patched in version 0.10.0.
https://github.com/AirenSoft/OvenMediaEngine/releases/tag/v0.10.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed as bug
Projects
None yet
Development

No branches or pull requests

7 participants