Bitrate is not equal targetbitrate

47 views
Skip to first unread message

Egor Larichev

unread,
May 13, 2020, 5:43:41 PM5/13/20
to medooze

Could you please suggest :
1) Video bitrate:
at loopback: targetbitrate 4686399
at ffmpeg output:
frame= 1498 fps= 30 q=-1.0 size= 15616kB time=00:01:02.17 bitrate=2057.4kbits/s speed=1.24x

code for init video session:

function initVideoChannel() {

	const streamer = MediaServer.createStreamer();

	//Create new video session codecs
	const video = new MediaInfo("video","video");

	//Add h264 codec
	video.addCodec(new CodecInfo("h264",96));
	video.setBitrate(50000); //seems like doesn't work
	//Create session for video
	const session = streamer.createSession(video,{
		local  : {
			port: 5004
		},
		remote : {
			ip : "127.0.0.1",
			port: 8321
		}
	});

	return session
}

videoSession.getOutgoingStreamTrack().attachTo(incomingStream.getVideoTracks()[0]);



input.sdp

c=IN IP4 127.0.0.1
m=video 8321 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1


How to set bitrate fully passthrough, it speeds up just before 2500kbit ?

Sergio Garcia Murillo

unread,
May 13, 2020, 5:48:01 PM5/13/20
to med...@googlegroups.com

The media server will forward whatever media it receives, it doesn't transcode, so can't change bitrate. The setBitrate on the CodecInfo only works on webrtc SDP O/A, not on the streamer session

In chrome check chrome://webrtc-internals for the actual bitrate sent, 2mbps seems the correct bitrate for an h264 stream sent by webrtc.

Best regards

Sergio

--
You received this message because you are subscribed to the Google Groups "medooze" group.
To unsubscribe from this group and stop receiving emails from it, send an email to medooze+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/medooze/1f9b0081-2a1e-445e-bded-b80936fbad8e%40googlegroups.com.


Egor Larichev

unread,
May 13, 2020, 6:16:59 PM5/13/20
to medooze
Yes, u right. We have 2.5 there, in webrtc logs.
Just confused a little bit, why have see in logs ((

transport.on("targetbitrate", bitrate=>console.log("targetbitrate " + bitrate));

targetbitrate 5124277
targetbitrate 5137576
targetbitrate 5143224
targetbitrate 5116635
targetbitrate 5124991
targetbitrate 5133026
targetbitrate 5128975
targetbitrate 5143841
targetbitrate 5136366
To unsubscribe from this group and stop receiving emails from it, send an email to med...@googlegroups.com.
Screenshot from 2020-05-14 01-14-41.png

Sergio Garcia Murillo

unread,
May 13, 2020, 6:18:19 PM5/13/20
to med...@googlegroups.com
That is the bandwidth estimation calculated on the media server about how much bitrate it is available for sending to the browser.
To unsubscribe from this group and stop receiving emails from it, send an email to medooze+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/medooze/ff8c6b10-5ffc-4935-a10b-ef997cd4a9f8%40googlegroups.com.


Egor Larichev

unread,
May 13, 2020, 6:26:10 PM5/13/20
to medooze
Ok, thanks ! Maybe i will reach more then 2.5 when apply another profile for h264 )
Reply all
Reply to author
Forward
0 new messages