libmediasoupclient icon indicating copy to clipboard operation
libmediasoupclient copied to clipboard

Change default return value of "getH264ProfileLevelId"

Open salmoncode opened this issue 3 years ago • 2 comments

hello!

I suggest getH264ProfileLevelId behavior when profile-level-id is not found in H264 codec parameters.

Now, it returns an empty string, so it will always not match when compared to codecs with a profile-level-id.

On the other hand, the H264 checker used in the JavaScript SDK returns an id of ConstrainedBaseline (Level3.1), which works differently from libmediasoupclient. https://github.com/ibc/h264-profile-level-id/blob/8f2eee9ed846113a58b9f562947f45cd9d8f7cb9/index.js#L78

I think the JavaScript SDK is more available and should be used that way.

With this fix, I have confirmed that H264 communication with mobile devices is possible even if profile-level-id is not included in the codec parameters on the mediasoup server.

salmoncode avatar Aug 03 '22 02:08 salmoncode

Could someone please review it? @jmillan ?

salmoncode avatar Aug 30 '22 00:08 salmoncode

I understand your concern but I'm not sure this is the right approach. If you check ortc.ts in mediasoup-client you'll see that it doesn't return a default value anywhere but it relies on the h264 profile level library, which BTW mimics the built-in h264 profile level utility in libwebrtc C++ code, so the inconsistency should be somewhere else.

So the thing is: is there some difference between ortc.ts in mediasoup-client and ortc.cpp in libmediasoupclient that is causing this problem in the latter? That's the thing to address AFAIS.

ibc avatar Oct 27 '22 12:10 ibc