VIDEO

This forum is for eXpress++ general support.
Post Reply
Message
Author
MIGUELON
Posts: 135
Joined: Wed Feb 10, 2010 10:55 am

VIDEO

#1 Post by MIGUELON »

Hi everyone, I need to play a VIDEO
Any idea how to do it
Thank you

Miguel

User avatar
Auge_Ohr
Posts: 1405
Joined: Wed Feb 24, 2010 3:44 pm

Re: VIDEO

#2 Post by Auge_Ohr »

MIGUELON wrote:Hi everyone, I need to play a VIDEO
Any idea how to do it
use XppFd,EXE (Formdesigner) and DragDrop WMP (Windows Media Player) Control to Forum.

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 )
to load File and Play

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

MIGUELON
Posts: 135
Joined: Wed Feb 10, 2010 10:55 am

Re: VIDEO

#3 Post by MIGUELON »

Thank you very much Jimmy, I thought Roger had some function to visualize Video like the one he has to see images "DC_BitMapDraw"
But your code is also very useful to me. :clap:

Thank you
Michael

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: VIDEO

#4 Post by rdonnay »

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.
The eXpress train is coming - and it has more cars.

MIGUELON
Posts: 135
Joined: Wed Feb 10, 2010 10:55 am

Re: VIDEO

#5 Post by MIGUELON »

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

User avatar
Auge_Ohr
Posts: 1405
Joined: Wed Feb 24, 2010 3:44 pm

Re: VIDEO

#6 Post by Auge_Ohr »

hi,
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.
i guess it is not a Problem to place a ActiveX into eXpress++ dialogs ... just change the Parent.

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.
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
to play more than 1 Video it need "more"

you need to recognize when Video "End" so you have to look at

Code: Select all

::oWMP:currentMedia:Duration
and compare it with

Code: Select all

 ::oWMP:Controls:CurrentPosition
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.
WMP_Darkmode.jpg
WMP_Darkmode.jpg (364.46 KiB) Viewed 10059 times
greetings by OHR
Jimmy

Post Reply