Dear All,
I try to use WMPlayer.OCX and play loop for better solution than GIF file. But it has black frame before start playing the vdo.
How to fix black frame as vdo clip?
Thanks in advance for any help and suggestion.
ukoenig wrote:Dutch,
I noticed a short loading-time during the loops
here is a free Video-editor / cutter to check the frames
at the beginning and end.
32 and 64 bit-version
https://www.fosshub.com/Avidemux.html
regards
Uwe
if oActiveX :controls:currentPosition > oActiveX :currentMedia:duration - 0.01
oActiveX :controls:currentPosition := 0
endif
AntoninoP wrote:I tryied too, and the only solution I found is do manually the loop:
- Code: Select all Expand view
if oActiveX :controls:currentPosition > oActiveX :currentMedia:duration - 0.01
oActiveX :controls:currentPosition := 0
endif
https://stackoverflow.com/questions/25938149/windows-media-player-seamless-looping-of-video
As they suggest you can create a timer to do this check.
DEFINE TIMER oTimer INTERVAL 100 ACTION (if( oActiveX :controls:currentPosition > oActiveX :currentMedia:duration - 0.01, (oActiveX :controls:currentPosition := 0.01), if(oActiveX :controls:currentPosition > 0.1, oActiveX :Show() , ) ))
oActiveX = TActiveX():New( oDlg, "WMPlayer.OCX", nTop, nLeft, nWidth, nHeight )
oActiveX :Hide()
dutch wrote:Dear AntoninoP and Uwe,
I can fix it now.
- Show in TIMER
- Code: Select all Expand view
DEFINE TIMER oTimer INTERVAL 100 ACTION (if( oActiveX :controls:currentPosition > oActiveX :currentMedia:duration - 0.01, (oActiveX :controls:currentPosition := 0.01), if(oActiveX :controls:currentPosition > 0.1, oActiveX :Show() , ) ))
- Hide() at DIALOG INIT
- Code: Select all Expand view
oActiveX = TActiveX():New( oDlg, "WMPlayer.OCX", nTop, nLeft, nWidth, nHeight )
oActiveX :Hide()
ukoenig wrote:Dutch,
I'm just thinking about a possible dialog fade-in-effect
for the video that will cover the first frames
just a idea not tested yet.
regards
Uwe
oActiveX:Settings:AutoStart := .T.
bOldError := ERRORBLOCK( { | e | BREAK( e ) } )
BEGIN SEQUENCE
oActiveX:URL := cPlayFile
oActiveX:Settings:AutoStart := .F.
bOldError := ERRORBLOCK( { | e | BREAK( e ) } )
BEGIN SEQUENCE
oActiveX:URL := cPlayFile
oActiveX:controls:currentPosition := nFirstFrame
oActiveX:Controls:Play()
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 37 guests