Page 1 of 1

how to fix Black frame start with WMPlayer.OCX? *Fixed*

Posted: Sat Sep 14, 2019 8:42 am
by dutch
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.
Image

Re: how to fix Black frame start with WMPlayer.OCX?

Posted: Sat Sep 14, 2019 12:59 pm
by ukoenig
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 :D

Re: how to fix Black frame start with WMPlayer.OCX?

Posted: Sat Sep 14, 2019 3:00 pm
by dutch
Dear Uwe,

Thank you for your reply but there is not black frame in vdo (mp4). I try Avidemux but no black frame. I try another mp4, it has got the same result.
I guess, it is the frame of object before start.

This is the mp4 file.
https://ibb.co/ctkDSmY

Regards,
Dutch
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 :D

Re: how to fix Black frame start with WMPlayer.OCX?

Posted: Sat Sep 14, 2019 3:43 pm
by ukoenig
Dutch,

I tested the wmplayer as a exe-file.
the problem seems to be the ocx-usage.

Just a idea :
1. use avidemux and select the file
2. append the file as often to the needed length
3. save these loaded files, they will be all connected to just 1 file
storage settings :
Video- and Audio-codec = Copy
Autput-format = MP4 muxer
For the created longer file You don't need a loop

regards
Uwe :D

Re: how to fix Black frame start with WMPlayer.OCX?

Posted: Sat Sep 14, 2019 4:01 pm
by dutch
Dear Uwe,

Thank you so much for your idea. Firstly I try GIF file but it has 25 frames per second. It doesn't smooth as MP4. I try to get the best result.

Thanks once again for your solution.
Dutch

Re: how to fix Black frame start with WMPlayer.OCX?

Posted: Sat Sep 14, 2019 4:03 pm
by ukoenig
Dutch,

I just tested and works fine
just append as often to get the needed length.

regards
Uwe :D

Re: how to fix Black frame start with WMPlayer.OCX?

Posted: Sun Sep 15, 2019 6:28 am
by AntoninoP
I tryied too, and the only solution I found is do manually the loop:

Code: Select all

      if oActiveX :controls:currentPosition > oActiveX :currentMedia:duration - 0.01
         oActiveX :controls:currentPosition := 0
      endif
 
https://stackoverflow.com/questions/259 ... g-of-video

As they suggest you can create a timer to do this check.

Re: how to fix Black frame start with WMPlayer.OCX?

Posted: Sun Sep 15, 2019 11:07 am
by dutch
Dear AntoninoP,

Thank you so much AntoninoP and Uwe. It's fixed black frame flicker during loop. But It is still show black frame on start playing.

How do I fixed the first black frame?

Thanks in advance for any help and suggestion.
AntoninoP wrote:I tryied too, and the only solution I found is do manually the loop:

Code: Select all

      if oActiveX :controls:currentPosition > oActiveX :currentMedia:duration - 0.01
         oActiveX :controls:currentPosition := 0
      endif
 
https://stackoverflow.com/questions/259 ... g-of-video

As they suggest you can create a timer to do this check.

Re: how to fix Black frame start with WMPlayer.OCX?

Posted: Sun Sep 15, 2019 1:14 pm
by dutch
Dear AntoninoP and Uwe,

I can fix it now.

- Show in TIMER

Code: Select all

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

   oActiveX = TActiveX():New( oDlg, "WMPlayer.OCX",  nTop, nLeft, nWidth, nHeight )
   oActiveX :Hide()
 

Re: how to fix Black frame start with WMPlayer.OCX? *Fixed*

Posted: Sun Sep 15, 2019 1:54 pm
by ukoenig
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 :?:

Re: how to fix Black frame start with WMPlayer.OCX?

Posted: Sun Sep 15, 2019 2:49 pm
by AntoninoP
dutch wrote:Dear AntoninoP and Uwe,

I can fix it now.

- Show in TIMER

Code: Select all

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

   oActiveX = TActiveX():New( oDlg, "WMPlayer.OCX",  nTop, nLeft, nWidth, nHeight )
   oActiveX :Hide()
 
Great

Re: how to fix Black frame start with WMPlayer.OCX? *Fixed*

Posted: Mon Sep 16, 2019 10:23 am
by dutch
Dear Uwe,

I test my solution and it works well now. Thank you so much for your kindness help.
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 :?:

Re: how to fix Black frame start with WMPlayer.OCX? *Fixed*

Posted: Thu Oct 03, 2019 4:35 am
by Jimmy
hi,

did you use

Code: Select all

   
   oActiveX:Settings:AutoStart := .T.
   bOldError := ERRORBLOCK( { | e | BREAK( e ) } )
   BEGIN SEQUENCE
      oActiveX:URL := cPlayFile
 
this Way Video start from 0:00 but you can change it to

Code: Select all

   
   oActiveX:Settings:AutoStart := .F.
   bOldError := ERRORBLOCK( { | e | BREAK( e ) } )
   BEGIN SEQUENCE
      oActiveX:URL := cPlayFile
      oActiveX:controls:currentPosition := nFirstFrame
      oActiveX:Controls:Play()
 

Re: how to fix Black frame start with WMPlayer.OCX? *Fixed*

Posted: Thu Oct 03, 2019 4:36 am
by Jimmy
hm ... where does those sign come from ... :o

i have to disable BBCode

[code=fw]
oActiveX:Settings:AutoStart := .T.
bOldError := ERRORBLOCK( { | e | BREAK( e ) } )
BEGIN SEQUENCE
oActiveX:URL := cPlayFile
[/code]this Way Video start from 0:00 but you can change it to

[code=fw]
oActiveX:Settings:AutoStart := .F.
bOldError := ERRORBLOCK( { | e | BREAK( e ) } )
BEGIN SEQUENCE
oActiveX:URL := cPlayFile
oActiveX:controls:currentPosition := nFirstFrame
oActiveX:Controls:Play()
[/code]