Cheers,
what would be the best option to create a new video stream from a given one? The new video stream should have different resolution and framerate.
Any suggestions welcome!
Recode Video in TRVMediaServer
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Recode Video in TRVMediaServer
TRVCamRecorder always records using its own framerate, specified in VideoFramePerSec property.
To specify a resolution, assign VideoAutoSize = False, and specify VideoWidth and VideoHeight properties.
Do you want to record video received by a server (TRVMediaServer)? The server itself does not decode video/audio data, it just receive them from clients and send to other clients. So, to record video, you need a client (a pair of TRVCamSender + TRVCamReceiver). You can add them to your server application (to create a special client embedded in the server).
To specify a resolution, assign VideoAutoSize = False, and specify VideoWidth and VideoHeight properties.
Do you want to record video received by a server (TRVMediaServer)? The server itself does not decode video/audio data, it just receive them from clients and send to other clients. So, to record video, you need a client (a pair of TRVCamSender + TRVCamReceiver). You can add them to your server application (to create a special client embedded in the server).
-
- Posts: 4
- Joined: Sat Mar 28, 2020 10:49 am
Re: Recode Video in TRVMediaServer
Hi Sergey,
thank you for your response.
The intention is to recode the stream on the server to, let's say, 160x120px and 5 fps in order to have a low bandwidth stream that can be received by low bandwidth users.
As far as I can see, I may use a RVCamReceiver, pipe it to a RVCamRecorder with the apropriate settings and then? As I see I may adjust the resolution on the RVCamSender, but not the framerate, which I would like to.
thank you for your response.
The intention is to recode the stream on the server to, let's say, 160x120px and 5 fps in order to have a low bandwidth stream that can be received by low bandwidth users.
As far as I can see, I may use a RVCamReceiver, pipe it to a RVCamRecorder with the apropriate settings and then? As I see I may adjust the resolution on the RVCamSender, but not the framerate, which I would like to.
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Recode Video in TRVMediaServer
So you want not to record, but modify video before sending to other users.
As I said, the TRVMediaServer cannot do it, because it does not decode video and audio data (we try to keep CPU usage on the server as low as possible). It can be done only on some client (which can be implemented in the same application as TRVMediaServer).
One of possible approaches:
- when the client receives a video frame (TRVCamReceiver.OnGetImage event), it resamples it to low resolution and stores it somewhere
- this client sends video using TRVCamera with DeviceType = rvdtUserData. In this mode, TRVCamera sends images provided by you (in TRVCamera.OnNewImage event) with the specified framerate (TRVCamera.FramePerSec property). So this is a way to send frames at new framerate.
As I said, the TRVMediaServer cannot do it, because it does not decode video and audio data (we try to keep CPU usage on the server as low as possible). It can be done only on some client (which can be implemented in the same application as TRVMediaServer).
One of possible approaches:
- when the client receives a video frame (TRVCamReceiver.OnGetImage event), it resamples it to low resolution and stores it somewhere
- this client sends video using TRVCamera with DeviceType = rvdtUserData. In this mode, TRVCamera sends images provided by you (in TRVCamera.OnNewImage event) with the specified framerate (TRVCamera.FramePerSec property). So this is a way to send frames at new framerate.
-
- Posts: 4
- Joined: Sat Mar 28, 2020 10:49 am
Re: Recode Video in TRVMediaServer
Cool, thanks, I'll try this!