Page 2 of 3

Re: How can i fix MCI Video playback on Win10?

Posted: Sat Oct 03, 2020 8:00 am
by BarryG
novablue wrote:if i leave the handle open and load the same video again or any other video after that it plays perfectly fine.
So the SAME video works in the same media player process instance on the SECOND play? That definitely isn't a codec problem, then. Any chance of a link to the video so we can test?

Re: How can i fix MCI Video playback on Win10?

Posted: Sat Oct 03, 2020 8:03 am
by novablue
But why would only the first load fail if it was a codec problem? I don't get it, i just have to except this workaround until windows 10 breaks it even more lol.

Re: How can i fix MCI Video playback on Win10?

Posted: Sat Oct 03, 2020 8:07 am
by novablue
BarryG wrote:
novablue wrote:if i leave the handle open and load the same video again or any other video after that it plays perfectly fine.
So the SAME video works in the same media player process instance on the SECOND play? That definitely isn't a codec problem, then. Any chance of a link to the video so we can test?
Yess exactly thank you! i can load 10 videos after that and they all will work. and i really don't need to send an example it happens with any video/png/jpg. the first time there wont be a picture but if i leave the handle open to the loaded video and keep loading more videos with a new handle it will all work from that point on and give me a picture.

Re: How can i fix MCI Video playback on Win10?

Posted: Sat Oct 03, 2020 8:14 am
by BarryG
Have you tried your problem on a different PC (sorry if you said this)? Just to rule out if your single PC is the problem, rather than PureBasic or codecs and so on.

Re: How can i fix MCI Video playback on Win10?

Posted: Sat Oct 03, 2020 8:16 am
by novablue
I have 2 windows 10 machines it doesnt work on either of them, in windows 7 vm it works fine like it used to.

i hope i am explaining myself good enough,
here is another example anyone can use:

Code: Select all

InitMovie()

#Film1 = 0
#Film2 = 1
#Film3 = 2

MovieName$ = "C:\Program Files\PureBasic\Examples\Sources\Data\PureBasicLogo.gif"

OpenWindow(0, 100, 150, 381, 381, "PureBasic - Movie")

LoadMovie(#Film1, MovieName$)  ; load as "dummy video" to fix future videos
PlayMovie(#Film1, WindowID(0)) ; Broken! will play a Blank video, the following videos also work with this line commented out
;FreeMovie(#Film1)             ; If i close here Film2 won't have a picture either and only Film3 will play fine, otherwise both work

LoadMovie(#Film2, MovieName$)
PlayMovie(#Film2, WindowID(0))  ; Plays Fine with picture

LoadMovie(#Film3, MovieName$)
PlayMovie(#Film3, WindowID(0))  ; Plays Fine with picture
ResizeMovie(#Film3, 0, 0, 100, 100)

Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow

Re: How can i fix MCI Video playback on Win10?

Posted: Sat Oct 03, 2020 8:29 am
by BarryG
Your code works normally here on Win 10 (the PureBasic logo rotates).

Re: How can i fix MCI Video playback on Win10?

Posted: Sat Oct 03, 2020 10:16 am
by Marc56us
:idea: Check your DirectX installation

:arrow: Win + R then type dxdiag and wait some seconds

:wink:

Re: How can i fix MCI Video playback on Win10?

Posted: Sat Oct 03, 2020 3:35 pm
by Paul
Yess exactly thank you! i can load 10 videos after that and they all will work. and i really don't need to send an example it happens with any video/png/jpg. the first time there wont be a picture but if i leave the handle open to the loaded video and keep loading more videos with a new handle it will all work from that point on and give me a picture.
I can confirm this exact behavior on Windows 10.
Yes it is quite frustrating and the only way I have been able to solve this issue is to do exactly what you have done, load a dummy file first then everything after that plays as expected... 4k down to SD

Re: How can i fix MCI Video playback on Win10?

Posted: Sun Oct 04, 2020 1:04 am
by novablue
Marc56us wrote::idea: Check your DirectX installation

:arrow: Win + R then type dxdiag and wait some seconds

:wink:
I recently just updated my DirectX version but it didn't change anything. I am running a fresh Win10 install with latest drivers and windows updates and so on.
Paul wrote:
Yess exactly thank you! i can load 10 videos after that and they all will work. and i really don't need to send an example it happens with any video/png/jpg. the first time there wont be a picture but if i leave the handle open to the loaded video and keep loading more videos with a new handle it will all work from that point on and give me a picture.
I can confirm this exact behavior on Windows 10.
Yes it is quite frustrating and the only way I have been able to solve this issue is to do exactly what you have done, load a dummy file first then everything after that plays as expected... 4k down to SD
Would you mind telling what exact version of Windows 10 you are running? Maybe it is a problem with LTSC?

Re: How can i fix MCI Video playback on Win10?

Posted: Sun Oct 04, 2020 1:23 am
by RASHAD
Hi novablue
This problem happened to me before but I do not remember how I fixed it
- Run PB x86
- run any snippet
- Open another tab
- Insert MCI code into the second tab and run it

Then please report

Re: How can i fix MCI Video playback on Win10?

Posted: Sun Oct 04, 2020 3:14 am
by Paul
novablue wrote: Would you mind telling what exact version of Windows 10 you are running? Maybe it is a problem with LTSC?
Main computer is Windows 10 Home build 1909. Also tested on another computer running Windows 10 Home build 2004.

I have a laptop running Windows 8.1 Home and another running Windows 7 Home Premium and the same code on those play back video perfectly.
It's only my Windows 10 machines which require the "load a null clip first" hack before it will play all other video.
The videos I am playing are all 1080P, 2K & 4K ... MP4 format.

Re: How can i fix MCI Video playback on Win10?

Posted: Sun Oct 04, 2020 7:09 am
by novablue
RASHAD wrote:Hi novablue
This problem happened to me before but I do not remember how I fixed it
- Run PB x86
- run any snippet
- Open another tab
- Insert MCI code into the second tab and run it

Then please report
Interesting, running "any snipped" did not work BUT i found out the "dummy file" does not even have to be in the same process to fix it.

Example first i run this and don't close the program:

Code: Select all

InitMovie()

#Film1 = 0

MovieName$ = "C:\Program Files\PureBasic\Examples\Sources\Data\PureBasicLogo.gif"

OpenWindow(0, 100, 150, 381, 381, "PureBasic - Movie")

LoadMovie(#Film1, MovieName$)

Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
then i run in a new tab this and it will correctly play both videos:

Code: Select all

InitMovie()

#Film1 = 0
#Film2 = 1

MovieName$ = "C:\Program Files\PureBasic\Examples\Sources\Data\PureBasicLogo.gif"

OpenWindow(0, 100, 150, 381, 381, "PureBasic - Movie")

LoadMovie(#Film1, MovieName$)
PlayMovie(#Film1, WindowID(0))

LoadMovie(#Film2, MovieName$)
PlayMovie(#Film2, WindowID(0))
ResizeMovie(#Film2, 0, 0, 100, 100)

Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
In both programs it does not even have to be the same video again. this means to fix this globally, running a program at windows startup that loads a random video and then stays open in the background would fix any other program with this issue. All these workarounds work fine but the question to WHY this even happens remains :lol:

Re: How can i fix MCI Video playback on Win10?

Posted: Sun Oct 04, 2020 7:30 am
by RASHAD
Hi novablue
Make sure that NT4.0 and DirectX v7.0 are installed

Re: How can i fix MCI Video playback on Win10?

Posted: Sun Oct 04, 2020 8:02 am
by novablue
RASHAD wrote:Hi novablue
Make sure that NT4.0 and DirectX v7.0 are installed
On Windows 10? :shock:

Re: How can i fix MCI Video playback on Win10?

Posted: Sun Oct 04, 2020 8:09 am
by RASHAD
:mrgreen:
- Search the web for dxwebsetup.exe it may help