and opera made this feature taht makes my website handle more bandwith Disable non-proxied UDP i needed to add turn to the webrtc to solve video not being able to be processed
Latest posts made by BOSSXXXL
-
RE: My problem is to add codec to my webrtcOpera GX
-
RE: My problem is to add codec to my webrtcOpera GX
@leocg no opera have all the codecs its like in chrome to open console you use f12 in opera different its same thing for opera they changed a lot of parameters even in codecs
-
RE: My problem is to add codec to my webrtcOpera GX
@leocg I'm not trying to add actually the codecs are already there but the parameters are different from chrome
-
My problem is to add codec to my webrtcOpera GX
hello guys im coding a new webrtc while the codec function works fine in chrome edge brave browsers it picks opus and H246 If i try opera gx it pick rtx and AUDIO G722
function forceH264Codec(sdp) { const lines = sdp.split('\r\n'); let mLineIndex = -1; for (let i = 0; i < lines.length; i++) { if (lines[i].startsWith('m=video')) { mLineIndex = i; break; } } if (mLineIndex === -1) { console.warn("No 'm=video' line found in SDP, cannot force H264"); return sdp; } const h264PayloadTypes = lines .filter(line => line.startsWith('a=rtpmap') && line.includes('H264')) .map(line => line.split(':')[1].split(' ')[0]); if (h264PayloadTypes.length === 0) { console.warn("No H264 payload types found in SDP, cannot force H264"); return sdp; } const originalMLine = lines[mLineIndex]; const mLineParts = originalMLine.split(' '); let preferredMLine = mLineParts.slice(0, 3); // 'm=video', port, protocol preferredMLine.push(...h264PayloadTypes); // Add H264 payload types first // Add back other non-H264 payload types if any were present (though usually not needed when forcing H264) const existingPayloadTypes = new Set(mLineParts.slice(3)); const otherPayloadTypes = [...existingPayloadTypes].filter(pt => !h264PayloadTypes.includes(pt)); // Ensure no duplicates preferredMLine.push(...otherPayloadTypes); lines[mLineIndex] = preferredMLine.join(' '); return lines.join('\r\n'); } Stats: {codec: {…}, packetsLost: 0, packetsReceived: 0, lossRate: '0%', bytesReceived: '0.00 MB', …} bytesReceived: "0.00 MB" codec: {mimeType: 'video/rtx', payloadType: 99, clockRate: 90000, channels: undefined} currentBitrate: "0 kbps" frameHeight: undefined frameWidth: undefined framesDropped: 0 framesPerSecond: 0 framesReceived: 0 lossRate: "0%" packetsLost: 0 packetsReceived: 0 [[Prototype]]: Object script.js:2445 Increasing bitrate to 3300 kbps script.js:2554 Audio Stats: {codec: {…}, packetsLost: 0, packetsReceived: 0, lossRate: '0%', bytesReceived: '0.00 MB', …} audioLevel: undefined bytesReceived: "0.00 MB" codec: {mimeType: 'audio/G722', payloadType: 9, clockRate: 8000, channels: 1} jitter: "0 ms" lossRate: "0%" packetsLost: 0 packetsReceived: 0 totalSamplesDuration: 0 [[Prototype]]: Object