Page 1 of 1

Play video from TMemoryStream

Posted: Mon Feb 26, 2024 6:39 pm
by Elivaldo
Hi,

Is it possible to play a video from a TMemoryStream?

Thanks!

Re: Play video from TMemoryStream

Posted: Tue Feb 27, 2024 9:34 am
by Sergey Tkachenko
Sorry, it's not supported, you need to save it to a temporary file.
What's the format of this video?

Re: Play video from TMemoryStream

Posted: Sat Mar 02, 2024 5:57 pm
by Elivaldo
Thank you Sergey for your answer.

This TMemoryStream is a MP4 video. After saving it to a file, how can I play it?

Re: Play video from TMemoryStream

Posted: Sat Mar 02, 2024 6:55 pm
by Sergey Tkachenko
Assign:
RVCamera.SourceFileName = path to this file
RVCamera.DeviceType = rvdtFile.
Call RVCamera.PlayVideoStream.

In Windows, RVCamera can play local files either using FFmpeg or using DirectX.
The main difference is in processing sound from videos.

FFmpeg is used, if FFmpeg libraries are available, and RVCamera.FFMpegProperty.UseFFMPEG=True.
In this case, sound from video can be read by TRVCamSound component linked to this TRVCamera (and then played or recorded using TRVAudioPlayer component),

Otherwise, DirectX is used. In this case, sound is just played using DirectX.

Re: Play video from TMemoryStream

Posted: Sat Mar 02, 2024 10:35 pm
by Elivaldo
Thank you so much, Sergey! :)