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

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

Postby dutch » Sat Sep 14, 2019 8: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.
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
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

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

Postby ukoenig » 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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

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

Postby dutch » Sat Sep 14, 2019 3: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 :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
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

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

Postby ukoenig » Sat Sep 14, 2019 3: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
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
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

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

Postby dutch » Sat Sep 14, 2019 4: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 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: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

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

Postby ukoenig » Sat Sep 14, 2019 4: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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

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

Postby AntoninoP » Sun Sep 15, 2019 6:28 am

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

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

Postby dutch » 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: 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.
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: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

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

Postby dutch » Sun Sep 15, 2019 1:14 pm

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()
 
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: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

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

Postby ukoenig » Sun Sep 15, 2019 1: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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

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

Postby AntoninoP » Sun Sep 15, 2019 2:49 pm

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()
 

Great
AntoninoP
 
Posts: 375
Joined: Tue Feb 10, 2015 9:48 am
Location: Albenga, Italy

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

Postby dutch » 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 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: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

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

Postby Jimmy » Thu Oct 03, 2019 4:35 am

hi,

did you use
Code: Select all  Expand view
 
   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  Expand view
 
   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: 1730
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

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

Postby Jimmy » Thu Oct 03, 2019 4:36 am

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 71 guests