Videos with Version 6.21

Everything else that doesn't fall into one of the other PB categories.
k3pto
User
User
Posts: 87
Joined: Sat Jan 17, 2015 5:24 pm

Videos with Version 6.21

Post by k3pto »

I have a program which plays videos using v6.20. They do not play using v6.21. I am using Windows 10 pro. The video files I use are mostly .mp4. I have version 19.0.1 of KLight installed and version 12 of Direct X.

Using the example program that comes with PB (movie.pb) slightly modified so I can debug:

H = MovieHeight(0)
W = MovieWidth(0)
OpenWindow(0, 100, 150, W, H, "PureBasic - Movie")

and putting a breakpoint on the OpenWindow statement:
with 6.20 both H and W get good values, with 6.21 they both come back with -1.

Please help.
User avatar
Piero
Addict
Addict
Posts: 923
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: Videos with Version 6.21

Post by Piero »

Try open a windows' "cmd/terminal/console" and DROP ffmpeg and your video file on it, to get something like this:

Code: Select all

ffmpeg.exe -i yourVideo.mp4 yourVideoCOPY.mp4
(note the spaces, -i and copy.mp4)
If it works, should be the fastest way to fix it…
k3pto
User
User
Posts: 87
Joined: Sat Jan 17, 2015 5:24 pm

Re: Videos with Version 6.21

Post by k3pto »

Hello Piero,

That worked. Thank you.

However, why should I have to do that since 6.20 worked with any video? Is there something else that needs to be done inside PB to make it work like 6.20?

How can I "install" ffmpeg so that Windows knows where to find it and its libraries?
Fred
Administrator
Administrator
Posts: 18220
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Videos with Version 6.21

Post by Fred »

6.21 use MediaFundation instead of the deprecated DirectShow API, so it's probably a codec issue. I don't think we can act on this
k3pto
User
User
Posts: 87
Joined: Sat Jan 17, 2015 5:24 pm

Re: Videos with Version 6.21

Post by k3pto »

My PC is currently running Windows 10 Pro. I have Klite CODEC Pack 19.0.1 Standard installed. When I attempt to install MediaFoundation on my W10 Pro machine I get an error message that the update is not applicable.
Fred
Administrator
Administrator
Posts: 18220
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Videos with Version 6.21

Post by Fred »

Media foundation is built-in in win10, so I don't think you can install something more
Post Reply