-
-
Notifications
You must be signed in to change notification settings - Fork 867
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
Add support for h264_rkmpp #3864
Comments
Every codec needs to be added to Owncast individually, it's not just about adding it to the dropdown. If there's enough interest, or somebody wants to work on this, or I get my hands on a device that natively supports |
I see in the code:
well, when I exec in my machine this command:
the result is:
but, If i exec this command:
the result is:
maybe chaning the contains to an regex will solve the list |
Like I mentioned above, It's not about knowing if the codec is available, it's about actually adding support for the codec in Owncast. Owncast doesn't magically know how to use a codec just because it's on your system. You're looking at the file that defines all the codecs, so you can see how each one is configured. |
I understand, I will check the code and I'm going to make changes to add this support after probing it works, if you think it's fine, I will make a pull request. |
you can see the rockchip encoder working, if you want i can do a pull request, thank you very much: video: my changes: |
That's awesome, nice job! What benefits are you seeing using this codec over libx264? I'm assuming there's a CPU usage drop? How much of one? I should probably get myself an Orange Pi if this codec is going to go in and be supported going forward. It's one thing for it to go in, but I will have to continue to maintain it, and currently I can't do that. To release a new codec with Owncast it'll need a lot of testing with all the settings, and it seems like you're the only one who can test it right now. All the different video settings, and presets, buffer settings, etc need to be validated. From your changes, it looks like this codec uses the same options and settings as libx264, so that's good. That makes it less risky. Also, all the documentation on how to use this codec will need to be written, explaining where it can be used and what you need to have to use it like we do for nvenc, for example. But with all of that, a PR would be wonderful. Thanks for working on this! |
Offtopic context: Orange Pi is a single board computer with a SoC: rockchip 35xx more powerful than raspberry pi 5. This project added the hardware acceleration support for this kind of chips: https://github.com/nyanmisaka/ffmpeg-rockchip I compiled it and make it running apart of original ffmpeg just in case. I used to stream in twitch local videos with this project: https://github.com/ZiTAL/twitch-ffmpeg Well, We are preparing a local radio in our town and one of the idea is to stream locally with your owncast project, and we think that orange pi is a good one to do this task, for that, we need hardware support in ffmpeg. Anyway, you don't need to buy any orange pi, I can give you access to my server and you can probe ffmpeg-rockchip by your own. The benefits using this encoder to libx264 is that the encoder is via hardware instead of via software, it's faster, it's like using h264_nvenc for nvidia gpus. |
I'm sorry, I should have been clearer. I understand the high level benefits, but I'm asking about the tangible benefits. What are you seeing as far as performance? You mentioned you needed this support, what was that looking like before vs now with it? I hope you understand the challenge here is that you might put up a PR today, but I'm the one who has to maintain this support starting tomorrow and forever. And right now I can't test this codec. If the codec changes a parameter and something needs to be changed, there's no way for me to do that. So that's the concern right now. |
Hi @gabek , well I streamed using libx264 and the stream was bad and the signal wasn't stable due to encoding, using hardware based encoding it was fine like you can see in the video. So, I need less CPU and I can add more qualities to the streaming for example. ARM it's not only about rpi, there are more kind of devices :) I understand your point, and if you want I can do all the test you required, and I have prepared the server to add access to you; I have written to you in mastodon :) Anyway, my point is to make this part flexible to be easy to change ffmpeg arguments to probe different encoders and params, make it customizable, because the pc builds are so different and little changes maybe increase performance. Thanks for your time :) |
I'm not sure what you're thinking, but there's already a framework in place for adding codecs to Owncast that supports everything that's needed. So I encourage you to add it just like the rest of the codecs, and not change the foundation of anything. |
You weren't able to answer my question about the actual benefits. Did CPU usage go from 50% to 10% vs libx264? What are you actually getting out of this codec? What are you actually seeing? |
the benefits are that with hardware encoder works and with libx264 the streaming doesn't work, as simple as it, anyway i will post more information as son as possible, it's weekend :) |
What do you mean by there's already a framework in place for adding codecs? |
That's clearly not what I meant. We were talking about source code and submitting a PR above. |
So you were specifically talking about the proposal of changing the way that OwnCast detects the codecs. Now I think I understood (correct me if I'm wrong). So the PR looks kind of ok to you but you need to justify the CPU usage and add relevant docs, right? |
rockchip support pull request: #3869 documentation pull request: owncast/owncast.github.io#180 |
Share your bug report, feature request, or comment.
I'm using an orange pi arm, and I have installed a custom ffmpeg to enable hardware acceleration for encoding videos called: h264_rkmpp, but I can't use it due to fixed selector.
The text was updated successfully, but these errors were encountered: