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

Post Reply
User avatar
dutch
Posts: 1395
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

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

Post 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
Last edited by dutch on Sun Sep 15, 2019 1:16 pm, edited 1 time in total.
Regards,
Dutch

FWH 19.01 / 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)
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

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

Post 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
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.
User avatar
dutch
Posts: 1395
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

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

Post 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
Regards,
Dutch

FWH 19.01 / 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)
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

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

Post 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
Last edited by ukoenig on Sat Sep 14, 2019 4:01 pm, edited 1 time in total.
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.
User avatar
dutch
Posts: 1395
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

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

Post 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
Regards,
Dutch

FWH 19.01 / 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)
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

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

Post by ukoenig »

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.
AntoninoP
Posts: 347
Joined: Tue Feb 10, 2015 9:48 am
Location: Albenga, Italy
Contact:

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

Post 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.
User avatar
dutch
Posts: 1395
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

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

Post 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.
Regards,
Dutch

FWH 19.01 / 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)
User avatar
dutch
Posts: 1395
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

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

Post 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()
 
Regards,
Dutch

FWH 19.01 / 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)
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

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

Post 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 :?:
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.
AntoninoP
Posts: 347
Joined: Tue Feb 10, 2015 9:48 am
Location: Albenga, Italy
Contact:

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

Post 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
User avatar
dutch
Posts: 1395
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

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

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

FWH 19.01 / 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)
User avatar
Jimmy
Posts: 165
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

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

Post 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()
 
greeting,
Jimmy
User avatar
Jimmy
Posts: 165
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

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

Post 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]
greeting,
Jimmy
Post Reply