-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Added NetInt Quadra Support #1539
base: master
Are you sure you want to change the base?
Conversation
Thanks for your contribution. Unfortunately we don't have this device so we can't test it. We have no choice but to rely on contributors for this equipment. We don't have a unit test template yet, and each developer is doing his own testing. AV1 cannot be tested because no publisher supports it yet. We will support this for WebRTC in the future. @nums Could you please review this? |
Yes, I will do a review. I was also not able to test directly: unfortunately my netint card is a "logan" but not a "quadra" |
hello @n8o , I did a quick check and I noticed this line: It's probably normal but in case it's forgotten after a test... |
What line are you referring to? L7 is a copyright header line. I haven't actually tested HEVC decode and encode. I'll do that today and should be done before merging. |
sorry, bad copy and paste: https://github.com/n8o/OvenMediaEngine/blob/master/src/projects/transcoder/codec/encoder/encoder_avc_niquadra.cpp#L78 |
I should be able to enable that line. I don't think it matters. I believe i disabled it while debugging issues before i got it working. the low latency setting is probably nice for webrtc. not sure if it affects quality or not for ABR HLS. I believe OME already forces keyframes when they are needed. so the keyframe param may not be needed. |
For the |
I tried enabling it and got a bunch of errors. Looking at the documentation for quadra it reports: lowDelay NOTE – That when enabled, the gopPresetIdx must be 1, 3, 7, 9, 10, or 0 with a consecutive order gop pattern, lookaheadDepth must be 0, and multicoreJointMode must be 0. Supported values for gopPresetIdx are: -1: Adaptive Gop (default) So with that, I set it to 1 and 1: that seems to work. |
Any more changes or requests? |
Sorry, a little bit busy this week. @getroot, on my side it's ok and ready to be merge :) |
Actually i just noticed that gopPresetIdx 1 is all i-frames. I need to change that. Either idx 9 or 10? |
yes, 10 seems to be the same than 2 (https://github.com/AirenSoft/OvenMediaEngine/blob/master/src/projects/transcoder/codec/encoder/encoder_avc_nilogan.cpp#L48C2-L48C17) on logan so better than 1 |
…ays to use 9 with lowDelay
Fixed. Documentation said to use 9 with lowDelay. |
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.
Just a few comments.
@@ -0,0 +1,45 @@ | |||
# Instruction: Build local OvenMediaEngine Dev Environment. Can be used with CLion dev environment as a toolchain | |||
# Information on hot to setup: https://www.jetbrains.com/help/clion/clion-toolchains-in-docker.html#sample-dockerfile |
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.
hot to
should probably be how to
@@ -0,0 +1,45 @@ | |||
# Instruction: Build local OvenMediaEngine Dev Environment. Can be used with CLion dev environment as a toolchain |
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.
To be honest, I am not too fond of having yet another Dcokerfile here which will have to be manually updated each time to keep in sync with the other Dockerfiles and the docker-compose.yml. There already exists the Dockerfile.local for local building and developing.
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.
That makes sense. I will merge them and maybe add a comment on how to only do a build image vs release image.
https://docs.docker.com/build/building/multi-stage/
@@ -0,0 +1,111 @@ | |||
# Instruction: Build OvenMediaEngine with Netint Quadra support |
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.
Instead of having many Dockerfiles, please consider moving anything hardware acceleration specific which is not an environment parameter into one of the misc/prerequisites scripts to keep it easy to get OME running in those environments which are either not using Docker or are not one of the "standard" supported environments.
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.
I'll investigate this
|
||
#yasm install | ||
WORKDIR /NI_Release | ||
RUN wget -c http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz |
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.
please change this to https, there is no hash / checksum checking here.
cd $NETINT_QUADRA_XCODER_COMPILE_PATH && bash build.sh && ldconfig #the compilation of libxcoder can be done before | ||
fi | ||
ADDI_LIBS+=" --enable-ni_quadra --enable-avfilter --enable-pthreads " | ||
ADDI_ENCODER+=",h264_ni_quadra,h265_ni_quadra" |
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.
What are the license implications of this? Is releasing a pre-built docker container with this compliant wit AGPL?
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.
I'm not sure about licensing and how this works for AGPL. wouldn't this be the same as all the others? Nvidia driver is proprietary. so is the logan and quadra. OME uses it through ffmpeg which is compiled with nvidia and netint support. i do believe the one header file that ffmpeg uses for nvidia is open source. but everything else is close source. I'm not affiliated with netint. so i'm not sure
I just assumed since you already had logan support that quadra would be fine. this section is basically just a copy of how logan's prerequisites work..
switch (input_module_id) | ||
{ | ||
case cmn::MediaCodecModuleId::NIQUADRA: { // Zero Copy | ||
//TODO: Exception handling required if Device ID is different. |
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.
Please finish this before merging, thanks
|
||
output_track->SetColorspace(encoder->GetSupportedFormat()); | ||
} | ||
} |
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.
was this indentation change on purpose? If not, please revert
Also, might be worth it to update this PR to ffmpeg 6 or newer |
ffmpeg 6 will take some time for us. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This PR adds basic support for NetInt Quadra.
Needs: