It is currently Tue Dec 01, 2020 4:20 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 33 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: How can i fix MCI Video playback on Win10?
PostPosted: Sat Oct 03, 2020 8:00 am 
Offline
Addict
Addict

Joined: Thu Apr 18, 2019 8:17 am
Posts: 1091
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: How can i fix MCI Video playback on Win10?
PostPosted: Sat Oct 03, 2020 8:03 am 
Offline
User
User

Joined: Sun Nov 27, 2016 6:38 am
Posts: 37
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: How can i fix MCI Video playback on Win10?
PostPosted: Sat Oct 03, 2020 8:07 am 
Offline
User
User

Joined: Sun Nov 27, 2016 6:38 am
Posts: 37
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: How can i fix MCI Video playback on Win10?
PostPosted: Sat Oct 03, 2020 8:14 am 
Offline
Addict
Addict

Joined: Thu Apr 18, 2019 8:17 am
Posts: 1091
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: How can i fix MCI Video playback on Win10?
PostPosted: Sat Oct 03, 2020 8:16 am 
Offline
User
User

Joined: Sun Nov 27, 2016 6:38 am
Posts: 37
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:
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


Top
 Profile  
Reply with quote  
 Post subject: Re: How can i fix MCI Video playback on Win10?
PostPosted: Sat Oct 03, 2020 8:29 am 
Offline
Addict
Addict

Joined: Thu Apr 18, 2019 8:17 am
Posts: 1091
Your code works normally here on Win 10 (the PureBasic logo rotates).


Top
 Profile  
Reply with quote  
 Post subject: Re: How can i fix MCI Video playback on Win10?
PostPosted: Sat Oct 03, 2020 10:16 am 
Offline
Addict
Addict

Joined: Sat Feb 08, 2014 3:26 pm
Posts: 956
:idea: Check your DirectX installation

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

:wink:


Top
 Profile  
Reply with quote  
 Post subject: Re: How can i fix MCI Video playback on Win10?
PostPosted: Sat Oct 03, 2020 3:35 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Fri Apr 25, 2003 4:34 pm
Posts: 1012
Location: Canada
Quote:
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

_________________
Image Image


Top
 Profile  
Reply with quote  
 Post subject: Re: How can i fix MCI Video playback on Win10?
PostPosted: Sun Oct 04, 2020 1:04 am 
Offline
User
User

Joined: Sun Nov 27, 2016 6:38 am
Posts: 37
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:
Quote:
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: How can i fix MCI Video playback on Win10?
PostPosted: Sun Oct 04, 2020 1:23 am 
Offline
PureBasic Expert
PureBasic Expert

Joined: Sun Apr 12, 2009 6:27 am
Posts: 3733
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

_________________
Egypt my love


Top
 Profile  
Reply with quote  
 Post subject: Re: How can i fix MCI Video playback on Win10?
PostPosted: Sun Oct 04, 2020 3:14 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Fri Apr 25, 2003 4:34 pm
Posts: 1012
Location: Canada
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.

_________________
Image Image


Top
 Profile  
Reply with quote  
 Post subject: Re: How can i fix MCI Video playback on Win10?
PostPosted: Sun Oct 04, 2020 7:09 am 
Offline
User
User

Joined: Sun Nov 27, 2016 6:38 am
Posts: 37
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:
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:
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:


Last edited by novablue on Sun Oct 04, 2020 7:33 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: How can i fix MCI Video playback on Win10?
PostPosted: Sun Oct 04, 2020 7:30 am 
Offline
PureBasic Expert
PureBasic Expert

Joined: Sun Apr 12, 2009 6:27 am
Posts: 3733
Hi novablue
Make sure that NT4.0 and DirectX v7.0 are installed

_________________
Egypt my love


Top
 Profile  
Reply with quote  
 Post subject: Re: How can i fix MCI Video playback on Win10?
PostPosted: Sun Oct 04, 2020 8:02 am 
Offline
User
User

Joined: Sun Nov 27, 2016 6:38 am
Posts: 37
RASHAD wrote:
Hi novablue
Make sure that NT4.0 and DirectX v7.0 are installed


On Windows 10? :shock:


Top
 Profile  
Reply with quote  
 Post subject: Re: How can i fix MCI Video playback on Win10?
PostPosted: Sun Oct 04, 2020 8:09 am 
Offline
PureBasic Expert
PureBasic Expert

Joined: Sun Apr 12, 2009 6:27 am
Posts: 3733
:mrgreen:
- Search the web for dxwebsetup.exe it may help

_________________
Egypt my love


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 33 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 44 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye