Trying to record in HD resolutions but I'm capped at 640x360

606 views
Skip to first unread message

Remus Negrota

unread,
Jan 18, 2017, 6:07:03 AM1/18/17
to kurento
Hello,

I'm using the latest Kurento 6.6.0 and JavaScript, and I'm trying to record video streams in HD resolutions, specifically 720p (1280x720) but to no avail. The maximum recording resolution i can attain for a 16:9 ratio is 640x360.

Important to note that I can record with absolutely no issue at lower resolutions like 320x240 or 640x480 for a 4:3 aspect ratio.

I've done some research and i know that Kurento by default restricts BW for WebRTC endpoints to 500Kbps and restricts BW on transcodings to 300Kbps.

To note that I am using Kurento to transcode VP8 directly to H.264 when recording by specifying the MP4 mediaProfile.



I am using basic constraints and when just accessing the camera in the browser the resolution is correct:

var constraints = {
   audio: true,
   video: {
              width: 1280,
      height: 720,
      framerate: 30
    }
};





Here is what I've tried to so far  based on the code from this kurento tutorial


1. I've set an unrestrained bandwidth to the webRTC endpoint like so:
pipeline = yield client.create('MediaPipeline');
var webRtc = yield pipeline.create('WebRtcEndpoint');

webRtc.setMinVideoSendBandwidth(0);

2. I've set a desired output bitrate directly from JS:
var recorder = yield pipeline.create('RecorderEndpoint', {mediaProfile: 'MP4', uri: args.file_uri});
recorder.setOutputBitrate(5000000);

3. I've set a desired output bitrate directly from Kurento's config file MediaElement.conf.ini

The only thing that had any effect was point 3. The bitrates of the recordings did indeed change, but i still could not attain the desired HD resolution and couldn't see any change in quality even though the recordings had around 5000 Kb/s , still capped at 640x360.

Points 1 and 2 didn't have any effect.


Any help would be greatly appreciated

Thank you



Message has been deleted

Remus Negrota

unread,
Jan 20, 2017, 6:25:26 AM1/20/17
to kurento
Any tips on this?

I'm still unable to make Kurento record in HD. 

Sagar Pilkhwal

unread,
Jan 20, 2017, 6:54:16 AM1/20/17
to kurento
Hi,

If you wish to record just one video from one WebRtcEndpoint then yes you can record HD video but it wont start recording right away from HD quality.
Recording will depend on your internet connection, where your KMS is located and couple of other constraints. Also as WebRtc follows slow start, you video will start from low quality and then after some time if the network permits the video will be recorded in HD quality.

If you use composite to record video then your video will be capped at 800x600 max resolution.

Regards,
Sagar Pilkhwal

Remus Negrota

unread,
Jan 20, 2017, 7:29:21 AM1/20/17
to kurento
Thank you for your answer

What are you referring to when you talk about 'composite' to record video?

Remus Negrota

unread,
Jan 20, 2017, 7:35:34 AM1/20/17
to kurento
Do you know how much time does it take before the resolution switches to HD?

I have a 50 Mbps connection between me and KMS, so i don't think it is bandwidth related.


vineri, 20 ianuarie 2017, 13:54:16 UTC+2, Sagar Pilkhwal a scris:

Sagar Pilkhwal

unread,
Jan 20, 2017, 8:34:44 AM1/20/17
to kurento
Hi,

If you want to record multiple videos into one video file you will need to use "composite" which is a gstreamer plugin.
For me it takes about 10-15 seconds to switch to HD in the sample. You can check the resolution of the output video file in VLC media player by checking the Media Information (Ctr+I)

Remus Negrota

unread,
Jan 25, 2017, 4:03:39 AM1/25/17
to kurento
I recorded a 2 minute long video, but the resolution did not upscale to HD.

Addy D

unread,
Jan 25, 2017, 6:06:55 AM1/25/17
to kurento
@Sagar what do you mean by using "composite" lets say if I am communicating with 4 people at a time and I want to record, their side of video, then I have to use Composite ? Is this not supported (I mean recording all 4 peers at a time) in Kurento?

Sagar Pilkhwal

unread,
Jan 25, 2017, 6:50:38 AM1/25/17
to kurento
Hi Addy,

Yes, in order to record 4 users at a time in one final output file you will have to use composite which will output video of 600x800 resolution. But iff you wish, you can also record 4 separate videos and then later by post processing you can merge four different videos into one.

Addy D

unread,
Jan 25, 2017, 6:58:28 AM1/25/17
to kur...@googlegroups.com
@Sagar, thanks for answering this quickly, my usecase requires to
record 4 or more individual videos simultaneously, it is a relief to
know it supports that :).
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "kurento" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/kurento/O8v35pFYbfE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> kurento+u...@googlegroups.com.
> To post to this group, send email to kur...@googlegroups.com.
> Visit this group at https://groups.google.com/group/kurento.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/kurento/3e279aaa-8bf7-4f68-a396-865bad06f73b%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

Remus Negrota

unread,
Jan 25, 2017, 7:11:52 AM1/25/17
to kurento
I've done some more tests.

It seems that if no mediaProfile is specified (no transcoding necessary) and the video codec used is VP8, then indeed the video upscales to a HD resolution after approximately 10 seconds.

But I personally need to use the MP4 mediaProfile, which converts the video to H.264.

Could this be a bug or is there something that I'm missing?

Zeba Momin

unread,
Jan 25, 2017, 8:39:20 AM1/25/17
to kurento
Hi Sagar,
I am trying to Record Room using Composite, but cannot get Video.
Can you please help me with this?
https://groups.google.com/forum/#!topic/kurento/qwRtlukFoYk

Thanking in Advance.

Remus Negrota

unread,
Jan 25, 2017, 8:46:20 AM1/25/17
to kurento
@Addy and @Zeba can you please stop distracting possible answers for the original question? 
Don't hijack this thread with other unrelated questions please.

miercuri, 18 ianuarie 2017, 13:07:03 UTC+2, Remus Negrota a scris:

Addy D

unread,
Jan 25, 2017, 11:25:19 AM1/25/17
to kur...@googlegroups.com
I am extremely sorry Remus Negrota, didn't mean to do that :( :(
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "kurento" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/kurento/O8v35pFYbfE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> kurento+u...@googlegroups.com.
> To post to this group, send email to kur...@googlegroups.com.
> Visit this group at https://groups.google.com/group/kurento.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/kurento/5ac1cafe-6c7e-4314-8e5e-cefbf97adb23%40googlegroups.com.

Remus Negrota

unread,
Jan 30, 2017, 3:57:44 AM1/30/17
to kurento
Any other suggestions on this issue?


miercuri, 18 ianuarie 2017, 13:07:03 UTC+2, Remus Negrota a scris:
Reply all
Reply to author
Forward
0 new messages