Recent

Author Topic: Creating a video editor  (Read 2751 times)

zhogar

  • Newbie
  • Posts: 1
Creating a video editor
« on: October 03, 2018, 07:28:29 pm »
Hi,

What components to use when creating a video editor?

1) Preview support required.
2) Storyboard video file.
3) The ability to read the audio track for data analysis.
4) Cutting video data into chunk.

Thanks you!

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1030
    • Burdjia
Re: Creating a video editor
« Reply #1 on: October 05, 2018, 11:20:21 am »
This is quite complex.  AFAIK there's no standar component to reproduce video in a TForm.  By the way Castle Game Engine is able to play videos (don't know what formats or if it allows streaming video).  Besides that you'll have to create your own components (or most them).

On the other hand, you may use ffmpeg as back-end.  There are a lot of video editors that uses it (Cinelerra, OpenShot...) because it is very easy to interface (you can use stdin-stdout pipes and command-line calls to send commands) and works with professional quality.

I know there's a video editor build with Lazarus but I don't remember the name right now.  Also I don't remember if it is open-sourced.
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

trev

  • Hero Member
  • *****
  • Posts: 823
  • Former Delphi 1-7 and 10.2 User
Re: Creating a video editor
« Reply #2 on: May 26, 2020, 08:27:42 am »
The mentioned application is, as previously noted, large and complex, especially when no specific details are provided or even the operating system. As it strands, it is a question which is unlikely to receive many responses - just one since late 2018.

See the Wiki article on Multimedia Programming which does a reasonably good job of covering the technologies involved for native and cross-platform multimedia.

o Lazarus v2.1.0 r63598, FPC v3.3.1 r45778, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (Parallels VM)
o FPC 3.0.4, FreeBSD 12-STABLE r361007 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

metis

  • Full Member
  • ***
  • Posts: 172
Re: Creating a video editor
« Reply #3 on: June 15, 2020, 06:35:58 pm »
Quote
The mentioned application is, as previously noted, large and complex
Oh, yes !  :o
Apart from this, any Kind of extended Multimedia-Processing will be quite slow with FPC.
It's much better and easier to use some C-Libs or -CLIs, that already exist.

@zhogar (if still here)

The Best, I know for this Purpose is 'FFmpeg', which was already mentioned above: www.ffmpeg.org.
It does everything, You need for Editing Audio-/VideoFiles and -Streams (and much, much more ! ).

Quote
There are a lot of video editors that uses it (...) because it is very easy to interface
This is only true for the FFmpeg-CLIs:
http://www.ffmpeg.org/documentation.html -> see "Command Line Tools".

The FFmpeg-Libraries are not that easy to use, as You may see if You take a Look at
my FFmpeg-DataReader 'FFInfo4Laz':
https://forum.lazarus.freepascal.org/index.php/topic,22038.msg208700.html#msg208700  or
my FFmpeg-MediaPlayer 'FFPlay4Laz':
https://forum.lazarus.freepascal.org/index.php/topic,26666.msg337046.html#msg337046.
Both link directly to the FFmpeg-Libs - Advantage: Faster and more flexible.

If You decide for the FFmpeg-CLIs, You only have to apply the adequate CommandLines, and
'FFmpeg' will do the entire Job for You w/o bigger ProgrammingEfforts: http://www.ffmpeg.org/ffmpeg-all.html.

Quote
you can use stdin-stdout pipes and command-line calls to send commands
Some Time ago, I wrote a small App to easily work with FFmpeg-CommandLines and read out the Outputs:
https://forum.lazarus.freepascal.org/index.php/topic,43411.msg303762.html#msg303762
-> GoTo "RunFFmpeg".

This App shows the Basics for how to do it with the Lazarus-TProcess-Component, and it's expandable to what ever You want.
I use it mostly for Recording TV via USB-AV-Grabber and for Transcoding AV-Streams, like 'mpeg' -> 'mp4'.
You may take the SourceCode and modify or extend it for Your Needs.

BTW: Of course, You may do the same with Scripts, but then You cannot read out the Outputs directly, e.g.
to show diverse StreamData or for ProgressBars, and so on...
« Last Edit: June 17, 2020, 04:12:50 pm by metis »
Life could be so easy, if there weren't those f*** Details.

 

TinyPortal © 2005-2018