RVMedia 9.0 - video sound, FFmpeg 5, wait animation, ALSA

News about TRichView, ScaleRichView, ReportWorkshop, RVMedia
Post Reply
Sergey Tkachenko
Site Admin
Posts: 17553
Joined: Sat Aug 27, 2005 10:28 am
Contact:

RVMedia 9.0 - video sound, FFmpeg 5, wait animation, ALSA

Post by Sergey Tkachenko »

RVMedia 9.0 has been released.

Trial version can be downloaded from https://www.trichview.com/download/

Full version: can be found in the protected section of the forum. This update is free for customers who ordered/renewed RVMedia in 2020, 2021, and 2022, and for customers with RVMedia subscription.

In this update:
  • new component: TRVCamSound for playing sound from videos
  • video displaying: a new animation displayed when waiting for a frame
  • FFmpeg 5 is supported
  • designtime: update checker
  • viewing and recording videos and sound with use of FFmpeg: ability to specify codec names
  • viewing videos with use of FFmpeg: ability to choose audio/video stream (by index)
  • Lazarus for Linux: sound playing and recording is rewritten and improved
Details can be found in the help file: https://www.trichview.com/help-media/ve ... istory.htm

Previous version:
https://www.trichview.com/forums/viewtopic.php?t=10229
Sergey Tkachenko
Site Admin
Posts: 17553
Joined: Sat Aug 27, 2005 10:28 am
Contact:

TRVCamSound

Post by Sergey Tkachenko »

Image TRVCamSound

This component allows reading sound from video streams and files. It works together with TRVCamera component.
This component is an audio source component: it provides audio data for other components. It can be used in all places where another audio source component (TRVMicrophone) can be used.
With TRVCamSound, you can:
  • play sound and record sound files using TRVAudioPlayer component
  • record video with sound files using TRVCamRecorder component
  • send sound to the network using TRVCamSender component
In the current version of RVMedia, TRVCamSound is used only when reading video with help of FFmpeg.
In future, we plan to use it when displaying videos using GStreamer and DirectX as well.

Limitation: supported formats: 8 and 16 bit sound samples, mono or stereo. Other sound formats are converted to the closest supported format.
Sergey Tkachenko
Site Admin
Posts: 17553
Joined: Sat Aug 27, 2005 10:28 am
Contact:

RVMedia 9.0 and FFmpeg

Post by Sergey Tkachenko »

RVMedia 9.0 and FFmpeg

FFmpeg 5

RVMedia 9 supports the new version 5 of FFmpeg (as well as all old FFmpeg versions).
RVMedia 8 supported FFmpeg versions up to 4.

Ability to specify FFmpeg codecs

By default, when displaying videos, FFmpeg decoders are auto-chosen. When recording video or sound files, FFmpeg encoders are chosen by the specified video/audio format.
This is the recommended way. Alternatively, in RVMedia 9, you can specify the exact codec name for encoding or decoding.
New properties: To get a list of available codecs, use the functions: GetListOfVideoDecoders, GetListOfAudioDecoders, GetListOfVideoEncoders, GetListOfAudioEncoders

There are the following reasons to specify the exact codec names:
  • to use video/audio format that is not listed in RVMedia's TRVAudioCodec and TRVVideoCodec (however, it's better to contact me and ask to add the format)
  • to use alternative codecs (such as codecs that require special hardware)
Ability to choose audio/video stream

A video file may contain multiple audio streams (for example, in different languages).
Multiple video streams is a less common feature, but they are possible.
Previous versions of RVMedia always chose the first video stream (and they were not able to read sound from videos).
In RVMedia 9, new events are added: In these events, you can choose a video/audio stream index.
Limitations:
- these events are called in a thread context, you cannot use user interface in them
- these events are called at the beginning of video playback, once; to choose another stream, you need to restart video.
Currently, these events are called only when video is played with FFmpeg. In future, we plan to call them for GStreamer and DirectX as well.
Sergey Tkachenko
Site Admin
Posts: 17553
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Wait animation

Post by Sergey Tkachenko »

Wait animation

In older versions of RVMedia, a video viewer window did not show its state. Is it waiting for a video to start? Is this video aborted, or is the window waiting for a next video frame for too long?
Well, it was possible to show information to the user using events (and RVMedia demo projects show how to do it), but more noticeable hints would be very useful.

In RVMedia 9, we added a wait animation.
camera-wait-animation.jpg
camera-wait-animation.jpg (73.09 KiB) Viewed 52631 times
In the screenshot above, you can see circles in the middle of the video window. This is a wait animation, it is displayed because a frame was not received for time that exceeds TRVCamView.WaitAnimationDelay (3 seconds by default). A similar property is added to a multi-view component.
Usually you will see this animation at the beginning of video stream playback (when TRVCamera is connected to a video stream and waits for the first frame).
To disable this feature, assign 0 to TRVCamView.WaitAnimationDelay.

The animation uses circles in Delphi 2009+ and Lazarus, and squares in older versions of Delphi.
Sergey Tkachenko
Site Admin
Posts: 17553
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Frame scaling quality

Post by Sergey Tkachenko »

Frame scaling quality

When displaying video, one of the most CPU-intensive operations may be drawing a stretched bitmap (containing a video frame).
Frames are stretched to fit a viewer window according to TRVCamView.ViewMode (or a similar property of multi-viewer windows).

In FireMonkey version of RVMedia, this stretch-drawing is fast, because it uses DirectDraw features.
VCL and LCL version of RVMedia uses Windows GDI functions (there are options for using DirectX and OpenGL, but they are currently deprecated - we will restore them in future updates), and they are slow and may use noticeable CPU time.

If it becomes a problem (on a slow computer, or if there are many videos), you can lower video scale quality using the new TRVCamView.FrameScaleQuality property (or a similar property of multi-viewer windows).

(an alternative solution: when video is displayed using FFmpeg or GStreamer, you can pre-scale it using these libraries (see TRVCamera.GStreamerProperty and TRVCamera.FFMpegProperty)
Sergey Tkachenko
Site Admin
Posts: 17553
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Linux audio

Post by Sergey Tkachenko »

Linux audio

Sound processing in Linux (Lazarus) is re-worked (both for input and output audio devices). Now it properly supports all available devices and all applicable properties of TRVAudioPlayer and TRVMicrophone components.

By default, RVMedia for Linux uses Advanced Linux Sound Architecture (ALSA), and it is highly recommended.

Linux-sound-play.png
Linux-sound-play.png (31.88 KiB) Viewed 52619 times

If ALSA is not available, RVMedia uses Open Sound System (OSS), but the set of features is limited.
Sergey Tkachenko
Site Admin
Posts: 17553
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Update checker

Post by Sergey Tkachenko »

Update checker

RVMedia 9 includes a design-time tool that can check for new available RVMedia versions. An Internet connection is required (otherwise it fails).
This version checker is included in VCL and LCL for Windows versions.

When Delphi/Lazarus IDE starts the first time after installing RVMedia, you will see this window:
version-check-first-time.png
version-check-first-time.png (10.16 KiB) Viewed 52615 times

When you click "Check for update", the tool connects to the TRichView web server to get the last available version number.
version-check-results.png
version-check-results.png (8.76 KiB) Viewed 52615 times

If a new version is found, the tools suggests to download it.

If you leave "check for updates on start", the tool will check for updates when Delphi/Lazarus IDE starts (but no more than once a day). This window will be displayed only if a new version is found, so it will not annoy you unnecessarily.

If you disabled checking on start, you can always check manually (right click any RVMedia component and click "Check for RVMedia update" in the context menu).

This tool does not upload any data on TRichView server, only the fact of checking and your IP address can be found in the server logs.

I am considering closing mailing lists for registered users, and this tool will replace them.
Sergey Tkachenko
Site Admin
Posts: 17553
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Demo projects

Post by Sergey Tkachenko »

Demo projects

There are only minor changes in the demo projects.
The main of them: RVMedia setups now include FFmpeg 5 library for Windows 64-bit platform, and all demos that need FFmpeg use it. These demos have Windows 64-bit platform active by default, other demos still use Windows 32-bit by default.
Since some demos use common files, it is necessary to rebuild the project completely when switching between 32-bit and 64-bit demos.
Sergey Tkachenko
Site Admin
Posts: 17553
Joined: Sat Aug 27, 2005 10:28 am
Contact:

RVMedia 9.1

Post by Sergey Tkachenko »

RVMedia 9.1

We've updated RVMedia to version 9.1.

This is mainly a maintenance release. It fixes some problems with playing local video files and composing a title string in video viewer windows.

New property: TRVCamera.Parameters.AutoUpdateAlias, it allows to keep a value assigned to TRVCamera.Parameters.Alias (it turns off updating Alias from cameras). Alias can be displayed in a title of a video viewer window.
Post Reply