FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour how to fix Black frame start with WMPlayer.OCX? *Fixed*
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
how to fix Black frame start with WMPlayer.OCX? *Fixed*
Posted: Sat Sep 14, 2019 08:42 AM
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.
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: how to fix Black frame start with WMPlayer.OCX?
Posted: Sat Sep 14, 2019 12:59 PM

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

Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: how to fix Black frame start with WMPlayer.OCX?
Posted: Sat Sep 14, 2019 03:00 PM
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 :-)
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: how to fix Black frame start with WMPlayer.OCX?
Posted: Sat Sep 14, 2019 03:43 PM

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

Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: how to fix Black frame start with WMPlayer.OCX?
Posted: Sat Sep 14, 2019 04:01 PM

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

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: how to fix Black frame start with WMPlayer.OCX?
Posted: Sat Sep 14, 2019 04:03 PM

Dutch,

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

regards
Uwe :D

Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 375
Joined: Tue Feb 10, 2015 09:48 AM
Re: how to fix Black frame start with WMPlayer.OCX?
Posted: Sun Sep 15, 2019 06:28 AM
I tryied too, and the only solution I found is do manually the loop:

Code (fw): Select all Collapse
      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.
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: how to fix Black frame start with WMPlayer.OCX?
Posted: Sun Sep 15, 2019 11:07 AM
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 (fw): Select all Collapse
      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.
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: how to fix Black frame start with WMPlayer.OCX?
Posted: Sun Sep 15, 2019 01:14 PM
Dear AntoninoP and Uwe,

I can fix it now.

- Show in TIMER
Code (fw): Select all Collapse
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 (fw): Select all Collapse
   oActiveX = TActiveX():New( oDlg, "WMPlayer.OCX",  nTop, nLeft, nWidth, nHeight )
   oActiveX :Hide()
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: how to fix Black frame start with WMPlayer.OCX? *Fixed*
Posted: Sun Sep 15, 2019 01:54 PM

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 :?:

Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 375
Joined: Tue Feb 10, 2015 09:48 AM
Re: how to fix Black frame start with WMPlayer.OCX?
Posted: Sun Sep 15, 2019 02:49 PM
dutch wrote:Dear AntoninoP and Uwe,

I can fix it now.

- Show in TIMER
Code (fw): Select all Collapse
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 (fw): Select all Collapse
   oActiveX = TActiveX():New( oDlg, "WMPlayer.OCX",  nTop, nLeft, nWidth, nHeight )
   oActiveX :Hide()

Great
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: how to fix Black frame start with WMPlayer.OCX? *Fixed*
Posted: Mon Sep 16, 2019 10:23 AM
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 :-)
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: how to fix Black frame start with WMPlayer.OCX? *Fixed*
Posted: Thu Oct 03, 2019 04:35 AM
hi,

did you use
Code (fw): Select all Collapse
   
   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 (fw): Select all Collapse
   
   oActiveX:Settings:AutoStart := .F.
   bOldError := ERRORBLOCK( { | e | BREAK( e ) } )
   BEGIN SEQUENCE
      oActiveX:URL := cPlayFile
      oActiveX:controls:currentPosition := nFirstFrame
      oActiveX:Controls:Play()
greeting,

Jimmy
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: how to fix Black frame start with WMPlayer.OCX? *Fixed*
Posted: Thu Oct 03, 2019 04:36 AM
hm ... where does those sign come from ... :-)

i have to disable BBCode

Code (fw): Select all Collapse
   
   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 (fw): Select all Collapse
   
   oActiveX:Settings:AutoStart := .F.
   bOldError := ERRORBLOCK( { | e | BREAK( e ) } )
   BEGIN SEQUENCE
      oActiveX:URL := cPlayFile
      oActiveX:controls:currentPosition := nFirstFrame
      oActiveX:Controls:Play()
greeting,

Jimmy

Continue the discussion