How can I set the resolution of the recording without effecting the resolution while streaming?
I have used recordingMode as ALWAYS.
You can use a different resoulition if youâre using COMPOSED
recording in the resolution
body parameter of the recoding API call /api/recordings/start
: https://docs.openvidu.io/en/stable/reference-docs/REST-API/#post-apirecordingsstart
If youâre using Node or Java Client this section would be usefull too to check: https://docs.openvidu.io/en/2.15.0/advanced-features/recording/#2-configure-your-sessions-to-be-recorded
Hi Cruizba,
I am following https://docs.openvidu.io/en/2.15.0/deployment/deploying-on-premises/ and https://docs.openvidu.io/en/2.15.0/developing/
Is there any way I can set recording resolution in openvidu-call-back or openvidu-call-front application?
I have used recordingMode as ALWAYS.
Ok so if I understand you correctly what you did is to modify openvidu-call-back to start sessions with recordingMode: ALWAYS
In this case it is not possible to set resolution. But you can do this:
In your openvidu-call-back endpoint where the sessions are created:
- Create a session with recordingMode: ALWAYS
- Check if the session is recording: https://docs.openvidu.io/en/2.15.0/reference-docs/REST-API/#get-apirecordingsltrecording_idgt
- If it is not recording, start the recording with custom properties: https://docs.openvidu.io/en/2.15.0/reference-docs/REST-API/#post-apirecordingsstart. If it is recording, do nothing.
Recordings will be stopped automatically when no user is streaming in 120 seconds.
TLDR: This is not implemented. You need to manage your recordings in your openvidu-call-back with some logic that âautostartâ recordings with http requests instead of let OpenVidu manage recordings.
Youâre always free to do a âRequest for enhacementâ and we can consider implement this: https://openvidu.discourse.group/c/request-for-feature/11
Hi,
I do not want to keep a check of session has started or not, whenever call starts recording must start.
Where can I trigger the recording manual recording?
Can you let me know the file and function where I can put the REST api request to always start recording?
With custom resolution, it is not possible right now. The recodingMode: ALWAYS
donât accept custom properties.
With recodingMode: MANUAL, how can I trigger the video when session is initiated? which fucntion I can put my REST api to start the recording?
If I call the recording api in createSession function inside OpenviduService file. it gives me 406 error.
In callController.ts also same issue.
Find logs below:
socketPath: undefined,
method: âPOSTâ,
insecureHTTPParser: undefined,
path: â/api/recordings/startâ,
_ended: true,
res: IncomingMessage {
_readableState: [ReadableState],
readable: false,
_events: [Object: null prototype],
_eventsCount: 3,
_maxListeners: undefined,
socket: [TLSSocket],
connection: [TLSSocket],
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: â1.1â,
complete: true,
headers: [Object],
rawHeaders: [Array],
trailers: {},
rawTrailers: [],
aborted: false,
upgrade: false,
url: ââ,
method: null,
statusCode: 406,
statusMessage: ââ,
client: [TLSSocket],
_consuming: false,
_dumped: false,
req: [Circular],
responseUrl: âhttps://.com:4443/api/recordings/startâ,
redirects: [],
[Symbol(kCapture)]: false
},
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: '.comâ,
protocol: âhttps:â,
_redirectable: Writable {
_writableState: [WritableState],
writable: true,
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
_options: [Object],
_ended: true,
_ending: true,
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 412,
_requestBodyBuffers: [],
_onNativeResponse: [Function],
_currentRequest: [Circular],
_currentUrl: 'https://.com:4443/api/recordings/startâ,
[Symbol(kCapture)]: false
},
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype] {
accept: [Array],
âcontent-typeâ: [Array],
authorization: [Array],
âuser-agentâ: [Array],
âcontent-lengthâ: [Array],
âx-dynatraceâ: [Array],
traceparent: [Array],
tracestate: [Array],
host: [Array]
},
[Symbol(DynatraceEmbeddedData)]: [Object: null prototype] { clientRequest: undefined }
},
response: {
status: 406,
statusText: ââ,
headers: {
server: ânginx/1.18.0â,
date: âTue, 19 Jan 2021 05:05:50 GMTâ,
âcontent-lengthâ: â0â,
connection: âcloseâ,
vary: âOrigin, Access-Control-Request-Method, Access-Control-Request-Headersâ,
âset-cookieâ: [Array],
âx-content-type-optionsâ: ânosniffâ,
âcache-controlâ: âno-cache, no-store, max-age=0, must-revalidateâ,
pragma: âno-cacheâ,
expires: â0â,
âx-frame-optionsâ: âSAMEORIGINâ
},
config: {
url: 'https://*******.com:4443/api/recordings/startâ,
method: âpostâ,
data: â{âsessionâ:âMjAyMS0wMS0xOXx8MDk6MzB8fDIwMDBtaW58fHRydWV8fGh0dHA6Ly9kaWdpdGJvdC1kYXNoYm9hcmQuZ29kaWdpdC5jb206ODA4MC98fFNVUi1ETS1sb2FkLUphbjE4LTd8fEZST05Uâ,ânameâ:âMjAyMS0wMS0xOXx8MDk6MzB8fDIwMDBtaW58fHRydWV8fGh0dHA6Ly9kaWdpdGJvdC1kYXNoYm9hcmQuZ29kaWdpdC5jb206ODA4MC98fFNVUi1ETS1sb2FkLUphbjE4LTd8fEZST05Uâ,âoutputModeâ:âCOMPOSEDâ,âhasAudioâ:true,âhasVideoâ:true,âresolutionâ:â800x600â,ârecordingLayoutâ:âBEST_FITâ}â,
headers: [Object],
transformRequest: [Array],
transformResponse: [Array],
timeout: 0,
adapter: [Function: httpAdapter],
xsrfCookieName: âXSRF-TOKENâ,
xsrfHeaderName: âX-XSRF-TOKENâ,
maxContentLength: -1,
maxBodyLength: -1,
httpsAgent: [Agent],
validateStatus: [Function: validateStatus]
},
Thatâs because no users has joined to the session, it is stated here: OpenVidu Docs
Use OpenVidu Webhooks to listen to events in your server:
- Webhook: OpenVidu Docs
- Events: OpenVidu Docs
If you listen to participantjoined you can check by the sessionId if the recording is active and if not, start it.
Thanks a million.
Will try to achieve this.
Suggesting you to mention this in docs page