Problem playing .mp4 files with openmovie / drawmo

Blitz3D Forums/Blitz3D Programming/Problem playing .mp4 files with openmovie / drawmo

Matty(Posted 2016) [#1]
Hi there.

I get an error "Invalid Movie Graphics handle" everytime I try and play an mp4 (that I know works because I play it in other games on my android phone).
(MAV only on blitz3d, full error message on blitzplus)
Sample code:

Graphics 1280,720,0,2
SetBuffer BackBuffer()
movie = OpenMovie(CurrentDir()+"mainmov.mp4")
;edit I've tried without specifying the full path and just putting the relative path to the movie but that doesn't work either and there is commentary in the documentation online for this command that that doesn't work.
While(Not(KeyHit(1)))
Cls
DrawMovie movie,0,0;,1280,720
Flip
Wend 
CloseMovie movie


I'm wondering if perhaps it is because maybe blitz3d / blitzplus doesn't like certain formats of mp4? Although it is a pretty standard format as far as I know.


Matty(Posted 2016) [#2]
Edit - tried with an uncompressed .avi - works perfectly...bit of a bother if I can't use an mp4 since all my movies are in that format that I wish to use for my game....don't really want to have to use uncompressed formats or less suitable formats....oh well I'm tempted to indicate this is a bug since there is nothing in the documentation that says certain formats are not catered for.


degac(Posted 2016) [#3]
Question: did you changed the file extension to .avi? Maybe (just maybe! Its 10 years I don't touch b3d!) this could be the solution.


Dan(Posted 2016) [#4]
are you using some codec packs ? like k-lite codec pack ?

Maybe installing it could fix some problems. (im not using the windows builtin media player but the mediaplayer classic.)


col(Posted 2016) [#5]
If I'm not wrong I think blitz3d uses 'directshow' to play movies, so as long as you have an mp4 'directshow' filter codec installed then it should automatically pick up the filter to play the movie.