Recording resolution

Hello,
How/where can we set/change the recorded video resolution?
We have tested webcams with different resolutions and the recorded videos still been recorded with same resolution even if the local device resolution is changed.
What we need to do to set the proper recording resolution for the stream?
 

Max

Administrator
Staff member
Please take a look at this example:
https://wcs5-eu.flashphoner.com/demo2/media-devices
As you can see you can change video resolution.
Here you can find documentation for this example:
https://flashphoner.com/docs/wcs5/w...-guide-2/index.html?media_devices_web_sdk.htm
Here is source code:
https://github.com/flashphoner/flas...examples/demo/streaming/media_devices_manager
Here you can see Session.createStream() method. You have to pass constraints object to this method to set resolution:
https://flashphoner.com/docs/api/WCS5/client/web-sdk/latest/Session.html

Eventually, video should be recorded with resolution which your set in the constraints.
If it is not, please report. We will check.
 
We tested the sample URL, but "Preview" playback is not working.
upload_2017-1-31_12-11-27.png


After that, we checked the documentation to be sure that all video parameters were set properly. Using parameters from docs and set the constraints values, all video-related objects in the browser logs, seems to be using the proper values (width: 1280, height: 720).
upload_2017-1-31_12-13-59.png


Local and remote video have the same aspect ratio and both use the resolution set in constraints.
upload_2017-1-31_12-15-37.png


But, the recorded video still having a 640x480 resolution:
upload_2017-1-31_12-23-8.png


upload_2017-1-31_12-24-43.png

What else can we test to fix it?

Thanks for your help
 

Max

Administrator
Staff member
Thanks for detailed report. We will check the same on our servers. I will update this thread with results.
 

Max

Administrator
Staff member
We have reproduced this issue with build 2060.
Please note that it is reproduced with VP8 codec only. If streaming codec is H.264, it is not reproduced.
In latest builds codec priority is changed in flashphoner.properties config:
Code:
codecs=opus,alaw,ulaw,g729,speex16,g722,mpeg4-generic,telephone-event,h264,vp8,flv,mpv
So H.264 has higher priority now. Please check your configuration.

Regarding VP8, it is generally used on Android phones and Android devices. Indeed, with webM (VP8) WCS uses fixed 640x480 resolution for video recording.
This issue is currently assigned. I will inform you once it is updated.

So to fix this for desktop Chrome browsers, you can change codec priority as described above.
 
Thanks for the update.
We are going to change the flashphoner properties to test it with Chrome and will be waiting for the final fix.
Thanks for your help
 

Max

Administrator
Staff member
Hello
Recording resolution is floating now.
It is due WebRTC nature. As you can see from charts, googFrameWidthSent and googFrameHeightSent (sent video resolution) is a variable value that is being changed by Chrome browser during streaming process.

webrtc-float-resolution.jpg


Since latest builds, we record video as it is. This means it can be variable in resolution within the recorded file.
For VLC it looks like:

webrtc-float-resolution-1280x720.jpg

webrtc-float-resolution-640x480.jpg

webrtc-float-resolution-960x540.jpg

Currently we are considering a settings which would set a fixed recording resolution to avoid such visible transformations on the fly.
 

Max

Administrator
Staff member
Working code sample for resolution 1280x720 (tested with server build 2078):
Code:
session.createStream({
        name: streamName,
        display: localVideo,
        record: true,
        receiveVideo: false,
        receiveAudio: false,
        constraints:
             {
                video:
                    {
                        width:1280,
                        height:720
                    },
                audio:true
             }
    }).on(STREAM_STATUS.PUBLISHING, function(stream) {
        setStatus(stream.status());
        onStarted(stream);
    }).on(STREAM_STATUS.UNPUBLISHED, function(stream) {
        setStatus(stream.status());
        showDownloadLink(stream.getRecordInfo());
        onStopped();
    }).on(STREAM_STATUS.FAILED, function(stream) {
        setStatus(stream.status());
        showDownloadLink(stream.getRecordInfo());
        onStopped();
    }).publish();
 
Top