Play video from TMemoryStream

RVMedia support and discussion (components for displaying and controlling IP cameras, webcams, video conferencing, video chats, recording audio and video files)
Post Reply
Elivaldo
Posts: 3
Joined: Mon Feb 26, 2024 6:34 pm

Play video from TMemoryStream

Post by Elivaldo »

Hi,

Is it possible to play a video from a TMemoryStream?

Thanks!
Sergey Tkachenko
Site Admin
Posts: 17310
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Play video from TMemoryStream

Post by Sergey Tkachenko »

Sorry, it's not supported, you need to save it to a temporary file.
What's the format of this video?
Elivaldo
Posts: 3
Joined: Mon Feb 26, 2024 6:34 pm

Re: Play video from TMemoryStream

Post 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?
Sergey Tkachenko
Site Admin
Posts: 17310
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Play video from TMemoryStream

Post 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.
Elivaldo
Posts: 3
Joined: Mon Feb 26, 2024 6:34 pm

Re: Play video from TMemoryStream

Post by Elivaldo »

Thank you so much, Sergey! :)
Post Reply