Page 1 of 1
Showing a Sprite (or similar) over a Movie ?
Posted: Tue Oct 31, 2023 4:47 pm
by Rings
Since "Rendermovieframe" is gone (since ages)
it seems that there is no method/way to paint a sprite,png or text
over a movie (or beside a movie would also work)
If anyone has a working solution, it could save me time and a lot of hairs.
PS: I'm running linux mint on the targetmachine, so a windows api code will not work later.
Re: Showing a Sprite (or similar) over a Movie ?
Posted: Wed Nov 01, 2023 1:56 am
by idle
Rings wrote: Tue Oct 31, 2023 4:47 pm
Since "Rendermovieframe" is gone (since ages)
it seems that there is no method/way to paint a sprite,png or text
over a movie (or beside a movie would also work)
If anyone has a working solution, it could save me time and a lot of hairs.
PS: I'm running linux mint on the targetmachine, so a windows api code will not work later.
nope think your going to go bald
vlc or ffmpeg could be options perhaps.
I found a repo with some c examples for ffmpeg
https://github.com/Javernaut/FFmpegExam ... de_video.c
vlc
https://videolan.videolan.me/vlc/group_ ... 021d714bf0
or maybe there's a way to add a frame call callback to SDL?
Re: Showing a Sprite (or similar) over a Movie ?
Posted: Wed Nov 01, 2023 3:34 am
by RASHAD
Hi
Tested with Windows
Maybe it works too with Linux
Code: Select all
If InitMovie() = 0
MessageRequester("Error", "Can't initialize movie playback !", 0)
End
EndIf
LoadFont(0,"tahoma",12)
Procedure watermark(par)
Repeat
x+1
StartDrawing(WindowOutput(1))
DrawingFont(FontID(0))
DrawingMode(#PB_2DDrawing_Transparent )
DrawText(0,0,"TEST",$0000FF)
StopDrawing()
Until x > 5000
EndProcedure
MovieName$ = OpenFileRequester("Choose the movie to play", "", "Movie files|*.avi;*.mpg|All Files|*.*", 0)
If MovieName$
If LoadMovie(0, MovieName$)
OpenWindow(0, 400, 300, MovieWidth(0), MovieHeight(0), "PureBasic - Movie")
OpenWindow(1, 420, 350, 80,24, "",#PB_Window_BorderLess)
StickyWindow(1,1)
CreateThread(@watermark(),30)
PlayMovie(0, WindowID(0))
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
Else
MessageRequester("Error", "Can't load the movie...", 0)
EndIf
EndIf