Recent

Author Topic: Paint picture over video  (Read 3168 times)

TollMan76

  • Newbie
  • Posts: 1
Paint picture over video
« on: November 26, 2017, 10:53:07 pm »
Hi,
I am a newbie in lazarus, but before I made some simple programs in Delphi. Now I need to help with my new project.
I have mplayer component playing fullscreen video and want to show some pictures over (on top) this video. If I put a Timage component over a mplayer component, video is allways on top. I found a solution with "bmovl", but it runs only in command line.
Is there any video playing component where when I put picture then the picture will be on top and video playing as background?

Thankx.

Mr.Madguy

  • Hero Member
  • *****
  • Posts: 844
Re: Paint picture over video
« Reply #1 on: November 28, 2017, 07:54:55 am »
On most modern video cards video is hardware-accelerated and is played on overlay, not on your window, that is used for clipping only, i.e. you can't put anything in front of it. Same with OpenGL/Direct3D graphics.
Is it healthy for project not to have regular stable releases?
Just for fun: Code::Blocks, GCC 13 and DOS - is it possible?

soerensen3

  • Full Member
  • ***
  • Posts: 213
Re: Paint picture over video
« Reply #2 on: November 28, 2017, 12:50:54 pm »
It seems it can be done using sdl. I found a player using FFMPEG and sdl and rendering it in to the screen.
The code is open source but in written c++ (the sdl code however should be the same): https://github.com/pockethook/player
But it still does not work with TImage. You habe to load your image into a texture and draw in top.
As a beginner this is probably not a good project to start with. It would also be complicated to implement to work with lazarus forms so you would have a separate window.
Lazarus 1.9 with FPC 3.0.4
Target: Manjaro Linux 64 Bit (4.9.68-1-MANJARO)

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: Paint picture over video
« Reply #3 on: November 28, 2017, 01:36:17 pm »
You can do it with ffmpeg, but it will modify the video.  May be if you can get the ffmpeg output as stream it can be done without modifying the video source.
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

Ramona G. Smith

  • Newbie
  • Posts: 5
Re: Paint picture over video
« Reply #4 on: December 13, 2017, 12:49:49 am »
Try to do with FFmpeg which is one of the leading multimedia frameworks. Would love to see the output after you do it.

 

TinyPortal © 2005-2018