Re: Re: Playing mp4 with mci

"[email protected] [gui4cli]" <[email protected]> 24 May 2014 11:53:52 -0700
Newsgroups gmane.comp.windows.gui4cli
Message-ID <[email protected]>
Hi Dimitris,

> ie you define it as type "mpegVideo". This makes it work for MP4, but it also works with AVI (haven't tried any
> others yet). How come? Does mpegVideo work with everything or would I have to parse the file extension and
> use different "type" every time?

mpegVideo is a bit of a odd name for using the DirectShow system. This means that it in general will play
everything that "Windows Media Player" plays. It actually depends on what DirectShow codecs
you have (or are by default) installed on your system. For me it also plays mkv's and flv's any many more.
Note that mp4, avi. mkv, flv, etc. are containers that can hold several different video and audio formats
like e.g.; h264 mpeg2, mpeg4, flash, ac3, aac, mp2, pcm. A program like "MediaInfo" can show what is
actually in the container.

> Also, if I use my "original" gui, adding the above "type" argument, the mp4 video starts off black and then
> slowly resolves to the image it's supposed to show. But if I use the gui you provided
> "mci_video_player_v2.gui" it plays perfectly.. Do you know why? Does it have something to do with the
>  dll  you provided?

I suppose you mean some kind of fade in? I have no idea why this happens.
It has nothing to do with the dll. It is indeed a short routine that simply sends the MCI strings, probably
comparable with what you use in g4c. I only don't use the MCI notify option but return the things I need
to know like frame size and duration from that same call to the gui.
Don't be confused by the notify additions in the MCI commands. They are actually not checked.

I had my own dll function for it becaue I needed to maintain three different players for which I had a
mci1, mci2 and mci3 copy of the funtion in the dll.
I think everything in the video player script can be translated back to g4c MCI and system metrics
commands. Almost all "mcicom32.mci" dll calls in the script can be simply replaced with the g4c mci
command.

Chris
 

---In [email protected], <gui4cli@...> wrote :

 Hi Chris, 

 Sorry about the "original". I meant the one I use which is a supped up version of the one used by GCView. Its only "original" to me :)
 

 Also, by "full screen window", I meant to be able to show it in a G4C window (which I see now that it can) so I can handle it, make it full screen and zoom, etc using:
 - mci 'put movie destination at 0 0 $$gui.width $$gui.height'


 

 I want to understand this well, but I'm kind of swamped by other work, so it may take a while.. 
 

 From what I see the main change is that instead of:
 - mci 'open "$%path" alias movie'

 you give:

 - mci 'open "$%path" type mpegVideo alias movie'

 

 ie you define it as type "mpegVideo". This makes it work for MP4, but it also works with AVI (haven't tried any others yet). How come? Does mpegVideo work with everything or would I have to parse the file extension and use different "type" every time?
 

 Also, if I use my "original" gui, adding the above "type" argument, the mp4 video starts off black and then slowly resolves to the image it's supposed to show. But if I use the gui you provided "mci_video_player_v2.gui" it plays perfectly.. Do you know why? Does it have something to do with the dll you provided?
 

 Also, what does the dll do? Not the part you added now for handling full screen, but the previous one. From what I saw it just sends the command line to mci. Is it a replacement for the MCI command, and what does it add?
 

 Thanks,
 Dimitris
 


 

 On Fri, May 23, 2014 at 6:09 PM, chris.kevany@... mailto:chris.kevany@... [gui4cli] <[email protected] mailto:[email protected]> wrote:
   Hi Dimitris,

I uploaded "MCI_AUDIO_VIDE0_PACK_v2.7z" to the file/gui section.

It contains a much better video player example that fixes the fullscreen issue on Win7
by using a borderless window. All files are new also the dll with source code and the
 readme text file. 

I found the last MCI player before I swiched over to DirectShow which fixes several
errors in the aspect ratio calculations, compared to the earlier upload.

It now swiches properly back to windowed display when you double-click. No black screen
 anymore. When you swich to fullscreen, there's a short delay (approx. 1 sec max) before
the taskbar disapears. I wasn't able to fix that. Navigarion info is at the file load gui and
the video clip path is saved in the ini file.
 
Note that the actual player is in the same gui as NEWFILE AVSHOW but can also be
used separately from a more advanced custom video clip manager (for example).

Chris

 

---In [email protected] mailto:[email protected], <gui4cli@...> wrote :
 
 Hi Chris,
 

 I ran the gui in the package you uploaded and it does run mp4 files, but not full screen.
 

 Is it possible to do it full-screen as the original gui does?
 

 Dimitris