Hi everyone, I need to play a VIDEO
Any idea how to do it
Thank you
Miguel
VIDEO
Re: VIDEO
use XppFd,EXE (Formdesigner) and DragDrop WMP (Windows Media Player) Control to Forum.MIGUELON wrote:Hi everyone, I need to play a VIDEO
Any idea how to do it
Code: Select all
bOldError := ERRORBLOCK( { | e | BREAK( e ) } )
BEGIN SEQUENCE
// Create an ActiveX instance in the Form client area, and wrap it in an Xbase++ class instance
oWMP := XBPACTIVEXCONTROL() :new( oAnzeig,, { 0, 0 - nHidepanel }, aSize )
// oWMP:CLSID := "WMPlayer.OCX.7"
oWMP:CLSID := "{6BF52A52-394A-11D3-B153-00C04F79FAA6}"
oWMP:create()
RECOVER USING oError
IF oError:subCode == 6500
MSGBOX( "Error creating ActiveX Control." + CRLF + ;
"Please make sure M$ Mediaplayer 9 Componends" + CRLF + ;
"WMP.OCX are installed on your computer.", ;
"WMPlayer Sample" )
oWMP := NIL
QUIT
ENDIF
END SEQUENCE
ERRORBLOCK( bOldError )
Code: Select all
bOldError := ERRORBLOCK( { | e | BREAK( e ) } )
BEGIN SEQUENCE
oWMP:URL := cPlayFile
RECOVER
ERRORBLOCK( bOldError )
MSGBOX( cPathFile + " coud not be opend", "load URL" )
oWMP:Controls:stop()
RETURN
END SEQUENCE
ERRORBLOCK( bOldError )
greetings by OHR
Jimmy
Jimmy
Re: VIDEO
What kind of video do you have? Is it a MP4 file?
I haven't written any samples for that but it's very easy using DCACTIVEXCONTROL.
Jimmy's sample doesn't show how to do it using eXpress++ dialogs.
I haven't written any samples for that but it's very easy using DCACTIVEXCONTROL.
Jimmy's sample doesn't show how to do it using eXpress++ dialogs.
The eXpress train is coming - and it has more cars.
Re: VIDEO
Hi Roger that was my question, the type of video file can be mp4.
But I would like to play this video with the eXpress dialogs.
The idea is to play several videos that are in a folder to advertise on a second screen.
For now I have done it with "DC_BitMapDraw" teaching images but I want to change and be able to teach MP4 videos
Thank you
Michael
But I would like to play this video with the eXpress dialogs.
The idea is to play several videos that are in a folder to advertise on a second screen.
For now I have done it with "DC_BitMapDraw" teaching images but I want to change and be able to teach MP4 videos
Thank you
Michael
Re: VIDEO
hi,
MP4 is just a "Container" like AVI or MKV but it does not say anything about Video Codec which is need to decode.
Windows Media Player is limited in Audio/Video Codec. it can happen that WMP say : no Codec
so you need a "Codec Pack". i recommend FFDshow
https://sourceforge.net/projects/ffdshow-tryout/
FFDshow use Directshow and you can get Stream and "manipulate" it.
M$ don't want Directshow which do not support DRM so there own M$ Codec have highest "Merit".
you need something like Win7DSFilterTweaker.exe (work also unter Windows 10) to change to FFDshow and "override" M$ "Merit"
http://www.codecguide.com/windows7_pref ... weaker.htm
now we get Video but no Audio ... hm
it is while "Mixer" get no Direct-Audio Stream. we have to use MatroskaSplitter.exe to split Stream.
https://haali.su/mkv/
now you can play almost all Type of Video where Original WMP have fail before.
you need to recognize when Video "End" so you have to look at
and compare it with
as you see this are Property so it will not "fire" Event in this case
but there are Events like "EndOfStream", "PositionChange" or "DisplayModeChange" so it depend on what you want to do.
---
as i say 1st Step to play is easy but if you want "more" it get more complicate.
i guess it is not a Problem to place a ActiveX into eXpress++ dialogs ... just change the Parent.MIGUELON wrote:Hi Roger that was my question, the type of video file can be mp4.
But I would like to play this video with the eXpress dialogs.
MP4 is just a "Container" like AVI or MKV but it does not say anything about Video Codec which is need to decode.
Windows Media Player is limited in Audio/Video Codec. it can happen that WMP say : no Codec
so you need a "Codec Pack". i recommend FFDshow
https://sourceforge.net/projects/ffdshow-tryout/
FFDshow use Directshow and you can get Stream and "manipulate" it.
M$ don't want Directshow which do not support DRM so there own M$ Codec have highest "Merit".
you need something like Win7DSFilterTweaker.exe (work also unter Windows 10) to change to FFDshow and "override" M$ "Merit"
http://www.codecguide.com/windows7_pref ... weaker.htm
now we get Video but no Audio ... hm
it is while "Mixer" get no Direct-Audio Stream. we have to use MatroskaSplitter.exe to split Stream.
https://haali.su/mkv/
now you can play almost all Type of Video where Original WMP have fail before.
to play more than 1 Video it need "more"MIGUELON wrote: The idea is to play several videos that are in a folder to advertise on a second screen.
For now I have done it with "DC_BitMapDraw" teaching images but I want to change and be able to teach MP4 videos
you need to recognize when Video "End" so you have to look at
Code: Select all
::oWMP:currentMedia:Duration
Code: Select all
::oWMP:Controls:CurrentPosition
but there are Events like "EndOfStream", "PositionChange" or "DisplayModeChange" so it depend on what you want to do.
---
as i say 1st Step to play is easy but if you want "more" it get more complicate.
greetings by OHR
Jimmy
Jimmy