RVMedia 8.0 has been released.
A brief list of changes since RVMedia 7.0:
Main changes since the last release (RVMedia 7.5.1)
As you can see, in this release I decided to complete, optimize and improve existing features.
New features (such as ONVIF, reading remote sound streams, Linux FMX) are moved to future updates.
Local cameras in Linux
Note: currently, only Lazarus (Free pascal) version of RVMedia supports Linux. Linux FireMonkey support is planned for future.
In this update we completed support of USB webcams in Linux.
Before this update, in Linux, TRVCamera could only display video from local cameras. It could not change their properties, even video resolution.
Now, a complete set of features is implemented.
Listing cameras (video capture devices)
Previously, TRVCamera.VideoDeviceList[] listed paths to cameras, like ‘/dev/video1’, ‘/dev/video2’, etc.
Now, this property returns user-friendly names of devices.
Paths are accessible using TRVCamera.VideoDeviceIdList[] property.
TRVCamera.FillVideoDeviceList method uses user-friendly names of devices as well.
Only supported video capture devices are included in the property (previously, it might include other devices).
Video modes
Since this version, TRVCamera methods for managing camera video modes work not only in Windows, but also in Linux.
In Linux, TRVCamVideoMode structure contains only 3 fields: Width, Height (frame size) and PixelFormat.
To get a name of pixel format, use GetWebCamPixelFormat method defined in mrvlcl_lin_WebCamera.pas
The screenshot shows the demo in Demos\Lazarus\Cameras\WebCamera.
You can see a list of cameras and a list of video modes.
When you switch TRVCamera to a web camera, the initial video mode is chosen according to VideoResolution property (the most similar video mode is selected).
Later, you can change video mode using SetCamVideoMode method.
Color control
Since this version, the color managing properties and methods of TRVCamera work for video capture devices in Linux (of course, if they support these properties), including:
Dialog for changing properties
TRVWebCamDialog is now available in Linux version as well.
It looks differently from the Windows version:
As you can see, the dialog lists properties supported by the camera, and allows changing their values.
Values of integer, boolean, menu type are represented using a trackbar, checkbox, combobox respectively.
For a comparison, this is how Windows dialog looks like:
In Windows, the dialog is localized completely (see Language property].
In Linux, property names are read from the system, they are English only (other controls on the dialog are localized).
On request, we can localize names of most frequently used properties.
To-do
the only feature that was not implemented for local cameras in Linux is their movement. If you have a PTZ local camera and wish to help us to test its movement control in Linux, please let me know.
GStreamer support
RVMedia 7.3 implemented support of GStreamer 1.0. So now we support both version 1.0 and outdated version 0.1. Of course, version 1 is highly recommended.
RVMedia can use GStreamer to display remote video streams, if TRVCamera.DeviceType = rvdtRTSP or rvdtHTTP.
All the new features below are for GStreamer 1, they do not work with GStreamer 0.1.
Protocol recognition
Since this update, when GStreamer 1 is used, TRVCamera recognizes a protocol by the value of URL property, so rvdtRTSP and rvdtHTTP work identically (like with FFmpeg).
TRVCamera checks for http://, https://, rtsp://, udp://
UDP video streams
We implemented a special processing for UDP video streams in GStreamer. There is no UDP option in DeviceType, but you can specify rvdtRTSP or rvdtHTTP, UDP will be recognized by ‘udp://’ in URL.
If you want to listen the specific port for UDP video stream, you can specify an empty URL host name, only a port, e.g. ‘udp://:5000’.
Two formats of UDP streams are supported:
– MJPEG (if VideoFormat = rvvfMJPEG)
– H.264 (otherwise)
Custom video source and video decode
When displaying video using GStreamer, RVMedia builds a GStreamer pipeline string, which consists of:
1. video source
2. video decoding
3. converting video frames to the format supported by RVMedia
4. displaying video (by implementation of appsink)
Normally, this process is performed behind the scenes, the programmers can use high-level properties to control it.
Video source is defined by the properties: DeviceType, URL, CameraPort, RTSPPort, UserName, UserPassword, ProxyProperty.
Video decoding is defined by VideoFormat property.
The example of GStreamer pipeline string containing video source and video decode commands is:
souphttpsrc location="https://www.trichview.com/videotest/h264.avi " ! avidemux ! h264parse ! avdec_h264
But what if you want to implement another video source or a video format that is not listed in VideoFormat property?
Since this version, RVMedia allows you to do it using a low-level property: TRVCamera.GStreamerProperty.LaunchString.
If it is assigned, it is used for defining video source and decoding instead of the properties listed above.
Please consult the GStreamer manual for pipeline format and available elements.
Inserting custom commands in GStreamer pipeline
What if you do not want to change video source and decoding, but want to add additional functionality? For example, you may wish to implement a streaming server or to record video to a file, in addition to displaying video.
(you can use TRVCamRecorder component for recording, but an alternative way may be useful).
Since this version, RVMedia allows you to do it using TRVCamera.GStreamerProperty.LaunchStringMiddle.
It is inserted in the pipeline between the step 2(decoding) and the step 3 (converting).
In this string, you can use ‘tee’ element to split the pipeline into two or more branches.
Please consult the GStreamer manual for pipeline format and available elements.
Additional buffering options
A customer provided us with the devices for testing:
These are two Raspberry Pi boards connected wirelessly. One of them has a camera and should be installed on a quadcopter. Another one is connected to a computer via the ethernet cable, and sends an UDP video stream to the specific port.
This stream is displayed successfully with RVMedia using GStreamer, however, artifacts appears regularly.
After several experiments, I found a way to solve this problem, by adding additional buffers (‘queue2’ element) before the final step 4 (RVMedia appsink).
So I added a new property TRVCamera.GStreamerProperty.UseQueue.
It maybe useful for other video sources as well.
Specifying GStreamer folder
Normally, GStreamer is installed by its setup application, which adds a path to GStreamer files to an environment variable.
RVMedia uses this variable to find the GStreamer location.
But what if you do not want to use the setup and to add environment variables?
Since this version, you can load GStreamer from the specific folder using LoadGStreamerLibraries procedure. This procedure works both for GStreamer 1 and 0.1.
Also, since this version, RVMedia adds the path to GStreamer DLLs to the application %PATH% environment variable (without modifying the system variable). It helps GStreamer libraries to find each other, if the path to them is not in the system %PATH% variable.
FFmpeg support
New properties for FFmpeg
In this update, the following properties are added to TRVCamera.FFmpegProperty:
Other changes related to FFmpeg
1. Delays between video frames is calculated with higher precision.
2. When loading FFmpeg from the specific path, RVMedia adds the path to DLLs to the application %PATH% environment variable (without modifying the system variable). It helps FFmpeg libraries to find each other, if the path to them is not in the system %PATH% variable.
MJpeg streams
If FFmpeg and GStreamer are not used, RVMedia can display MJpeg video streams from a file or via HTTP protocol.
Since this update, TRVCamers uses larger buffers when reading network MJpeg streams.
If video frames are large, it makes reading much more faster and efficient (lower CPU use), and eliminates latency that was possible in previous versions of RVMedia.
IP camera control
The code that controls IP cameras and changes their properties is rewritten completely.
Previously, all commands were spread all over MRVCamera unit inside TRVCamera class.
Now, they are separated into classes: TRVFoscamAPI_Ver1, TRVFoscamAPI_Ver1_2, TRVPanasonicAPI, TRVDLinkAPI, TRVAxisAPI.
TRCamera component interacts with TRVIPCameraAPI class that encapsulates the classes listed above.
The new code is much more compact, clear, and more easy to modify.
Several operations are implemented more efficiently, especially a user list management.
Brightness control is now supported for Panasonic cameras (and compatible).
There is a change that affects compatibility. All operations on TRVCamera.Users collection property are applied to the IP camera immediately. It is not always desirable (for example, it makes sense to add a user as a single operation, instead of adding a new user, then changing user name, password and role).
Previously, you could disable sending changes to IP camera, then call TRVCamera.UpdateUsers to apply all changes. This ways is not optimal for most cameras. So we removed UpdateUsers, and added AddUser and ModifyUser methods instead.
Changes in demo projects
1) Demos\Lazarus\Cameras\WebCamera\
“Properties” button is added to the Lazarus version of this demo, like in VCL and FMX versions.
It displays a webcam properties dialog, which is cross-platform since this version.
This demo supports a list of video modes both in Windows and Linux, see the screenshot above
2) Demos\*\Cameras\MediaTest\
“Brightness” and “Contrast” trackbars are fixed. Now they are implemented properly, using GetColorControlPropertyRange method. Now they are available both for IP cameras and local video capture devices (USB webcams)
AddUser and ModifyUser are used instead of UpdateUsers to manage a user list for the selected IP camera.
(because of UpdateUsers, the old version of this demo cannot be compiled using RVMedia 8 )
3) The list of sample cameras (which is used in many demos) is updated. Dead cameras are removed, new public cameras are added. Descriptive names are assigned to both new and old cameras.
We have released TRichView 23.2 and updates of related components The main new feature in…
RVMedia 11.1 has been released Main new features: UDP streaming with FFmpeg improved error handling…
We have released TRichView 23.1 and updates of related components The main new feature in…
We've released our installer program as freeware with source code:http://www.trichview.com/ideinstall/ It was updated to version…
We have released TRichView 23 and updates of related components This update is free for…