* * *

Author Topic: How to create video from Component canvas?  (Read 226 times)

Ronan

  • Full Member
  • ***
  • Posts: 116
How to create video from Component canvas?
« on: March 18, 2017, 09:22:02 am »
Dear All,

I need to create the video from the canvas of any component which has rendering context, that is any TPanel, TBitmap etc..

I've read Video Playback Library section in Lazarus web site and tried to use the SysRec for that purpose. With respect to that I have the following questions:

#1) It seems that totally don't understand how the video is created from any device, googling reveals that creating the snap 
shots from devices and combining later to form the video is enough. Is this the decent way of creating the videos or is there any other more efficient way of doing it with the help of libraries and components.
 
#2) I have used the Sysrec but it seems that it is only capable to capture the video from physical devices, not capable to create video from component canvas. Can you just shed some light on that, is it possible to configure it to produce videos from components canvases ?



Regards,


User137

  • Hero Member
  • *****
  • Posts: 1678
    • Nxpascal home
Re: How to create video from Component canvas?
« Reply #1 on: March 18, 2017, 03:38:23 pm »
I just found something like MediaPlayer component for Lazarus. I don't know if it works or if files in that folder are all it needs:
https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/mplayer/

Judging from example project's source code it should support video
Code: Pascal  [Select]
  1. MPlayerControl1.StartParam := '-vo direct3d -nofontconfig';
« Last Edit: March 18, 2017, 03:40:17 pm by User137 »

Ronan

  • Full Member
  • ***
  • Posts: 116
Re: How to create video from Component canvas?
« Reply #2 on: March 18, 2017, 03:51:13 pm »
Thanks in advance I'll take a look at that, for the time being I'm trying to figure out how to record using  PasVLCLib.

Generally there are many libraries and components but they all seem to be dealing with playing the medias from devices but not record them from components canvas, which is what I want.

User137

  • Hero Member
  • *****
  • Posts: 1678
    • Nxpascal home
Re: How to create video from Component canvas?
« Reply #3 on: March 18, 2017, 05:45:29 pm »
It might be technically too slow to show realtime video in canvas, at least in FullHD. Video libraries might have other functions if you want access to the data. But all depends on what are your goals for the project?

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus