Video playback

Blitz3D Forums/Blitz3D Programming/Video playback

Sake906(Posted 2008) [#1]
I have a really annoying problem with this on Blitz3D... it appears to work on my machine, but then it freezes up on someone else's machine, plays the sound but doesn't display the video and then makes the program stop working, or gives a crash.

My guess is that they might be having bad codecs, but it appears that they can play the video itself in media player and other players...

Main problem is not being able to tell if they have the RIGHT codec (MPEG 4 Xvid for avi) which could be the reason why it has to fail like that...


Function Play_Intro_Video()
	
	Local video=OpenMovie(Ex("effects\at1logo.avi"))
	Local pastbuffer=GraphicsBuffer()
	
	SetBuffer BackBuffer()
	
	If video<>0
		
		
		
		While MoviePlaying(video)=True
			DrawMovie(video,0,0,GraphicsWidth(),GraphicsHeight())
			Flip
		Wend
		
		CloseMovie video
		
	Else
		
		RuntimeError("Dingo crap happens with the intro video..")
		
	EndIf
	
	
	SetBuffer pastbuffer
	
	
	
End Function



How would you do the above?


Ross C(Posted 2008) [#2]
Video playback in blitz has always been it's weakness. Someone created a video lib for blitz, BlitzVideo, i believe it was called. You best bet is to code the movie as MPEG2, then most, if not all, computers can play it.


markcw(Posted 2008) [#3]
I think Ross C means BlitzMovie, which you can get here.
http://www.blitzmax.com/logs/userlog.php?user=8652&log=1737

BlitzMovie uses DirectShow 9, whereas Blitz3D uses DirectShow 7. BlitzMovie doesn't really offer anything better though and was dropped in an unfinished state by it's author a few years ago.

I would recommend using only Mpeg-1 or Mpeg-2 video encoding as everyone should be able to play that.