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

H.264 encoder support #76

Open
neilyoung opened this issue Jun 5, 2023 · 9 comments
Open

H.264 encoder support #76

neilyoung opened this issue Jun 5, 2023 · 9 comments

Comments

@neilyoung
Copy link

Thanks for making and sharing this nice lib. Well done and nice to read.

One question: My Android device supports H.264 hardware encoding. How can I make use of it? I was trying to set the "codec" parameter as I do in my JS realisation, but this seems to not be sufficient.

In my own apps using Google WebRTC directly I recall to have been forced to see some "PeerConnectionOptions" in order to support H.264 hardware codecs. How can this be done with the lib (w/o being forced to build libwebrtc from scratch)?

TIA

@neilyoung
Copy link
Author

Additional info:

In PeerConnectionUtils: This is what my encoderFactory provides as supportedCodecs:

image

So something is missing...

@neilyoung
Copy link
Author

neilyoung commented Jun 5, 2023

Same device, other application (based on libwebrtc M105, but I'm sure, H.264 hardware baseline support was already available with M94):

image

I already tried to set the "highProfileSupport" flag to false in order to gain at least baseline support to no avail.

@neilyoung
Copy link
Author

OK, removed the libwebrtc.aar from your package and replaced it with mine.

Now there should be also in the mediasoup landscape possible access to H.264 baseline HW codecs

image

To be continued

@neilyoung
Copy link
Author

neilyoung commented Jun 5, 2023

Hmm. I think I need some insight

This is what I get from encoderFactory.supportedCodecs() (just H.264 shown):

image

I'm trying to favour this H.264 (this kind of setup works in JS):

image image

EDIT: Meanwhile I found I have to provide the profile-level-id as string, not as hex number. But this doesn't change the output: No matching codec found

EDIT2: I also found some typos, but those didn't change the outcome ("level-asymmetry-allowed")

@neilyoung
Copy link
Author

@koxiong
Copy link

koxiong commented Jan 23, 2024

Author

hi neilyoung, do you have resolve the h264 issue? the link https://mediasoup.discourse.group/t/is-this-here-also-the-place-to-discuss-android-mediasoup-things/5266/13 can not visit now

@YatinGarg07
Copy link

Is mediasoup library actively maintained and can is it a prospective server for scaling, rtp and transcoding with users upto 10 in a room?

@neilyoung
Copy link
Author

Author

hi neilyoung, do you have resolve the h264 issue? the link https://mediasoup.discourse.group/t/is-this-here-also-the-place-to-discuss-android-mediasoup-things/5266/13 can not visit now

I think yes, but finally it was not only done with this part mentioned. I rolled my own mediasoup lib from a fork and also replaced libwebrtc with a more recent version. In the end H.264 worked, even with simulcast (but software encoder only, libwebrtc does something weird with hardware encoded H.264 and simulcast).

@neilyoung
Copy link
Author

Is mediasoup library actively maintained and can is it a prospective server for scaling, rtp and transcoding with users upto 10 in a room?

I think it is no longer actively maintained. Regarding your question: The mediasoup library is a client library for Android, organizing the signaling and media transfer to and from a Mediasoup server instance. Transcoding is not a task for this lib and IMHO also not the RTP for which it is using libwebrtc to my knowledge. The distribution to 10 or more users is task of the Mediasoup server's SFU functionality.

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

3 participants