Page 1 of 3

Video playback

Posted: Mon Feb 23, 2015 10:19 pm
by djrikki
Any idea why video playback of the 480P, (the 720P version exhibits the same behaviour) Buck Bunny I downloaded ages from the Blender site is only playing in Grayscale? Works fine in mplayer/other players.

Here is my code function, nothing especially exciting going on the code.

Code: Select all

Function filemanager:PlayVideo(activefile)
    Calendar:ClearInterval()
    HideDisplay()
    CtrlCQuit(False)
    
    ExitOnError(False)
    StopMusic(1)
    CloseMusic(1)
    ExitOnError(True)
        
	OpenVideo(1, activefile)
	SetVideoVolume(1,"100%")
	video.width = GetAttribute(#VIDEO, 1, #ATTRWIDTH)
	video.height = GetAttribute(#VIDEO, 1, #ATTRHEIGHT)
		
	Local d, h, m, s = base:Milliseconds( GetAttribute(#VIDEO,1,#ATTRDURATION) )
	Local duration
	
	d = base:RoundTo(d,0)
	h = base:RoundTo(h,0)
	m = base:RoundTo(m,0)
	s = base:RoundTo(s,0)
	
	If d > 0
	    duration = d .. ":"
	EndIf
	
	If h > 0
	    duration = duration .. h .. ":"
	EndIf
	
	duration = duration .. m .. ":" .. s
	
    CreateDisplay(#VIDEOPLAYBACKWINDOW, {Width = video.width, Height = video.height, Title = activefile .. "   (" .. GetAttribute(#VIDEO,1,#ATTRFORMAT) .. ") Duration: " .. duration, Active = True, nomodeswitch=true, nohide=true, Pubscreen = application.pubscreen})
    SelectDisplay(#VIDEOPLAYBACKWINDOW)
    
    GetVideoFrame(#STARTVIDEOFRAME, 1, 1)

	ExitOnError(False)
	OpenDisplay(#VIDEOPLAYBACKWINDOW)
	If GetLastError() = 0
		ExitOnError(True)
		DisplayBrush(#STARTVIDEOFRAME, 0,0)
		PlayVideo(1)	

    	SetInterval(1, filemanager_VideoMouse,2000)
	
		base:InstallEventHandler(#VIDEOPLAYBACKWINDOW)
	Else
	    ExitOnError(True)
	    base:SystemRequest(locale[688],locale[689],locale[4],#REQICON_WARNING)
		filemanager:CloseVideo()
	EndIf
	
EndFunction

Re: Video playback

Posted: Mon Feb 23, 2015 10:33 pm
by djrikki
I can confirm with the new attribute, #ATTRLOADER, that indeed 'avcodec' was being selected and used as the Loader.

Re: Video playback

Posted: Tue Feb 24, 2015 4:20 pm
by airsoftsoftwair
Have you tried to play it using the VideoPlayer examples that comes with Hollywood? Is it gray there as well?

Re: Video playback

Posted: Tue Feb 24, 2015 8:39 pm
by djrikki

Re: Video playback

Posted: Wed Feb 25, 2015 5:54 pm
by airsoftsoftwair
Tried this one

http://download.blender.org/peach/bigbu ... nd-fix.avi

with the VideoPlayer and it's not gray but in full nice colours with Hollywood 6 on OS4.

Re: Video playback

Posted: Wed Feb 25, 2015 8:56 pm
by djrikki
Well what the devil is going on... :lol:

Re: Video playback

Posted: Wed Feb 25, 2015 9:18 pm
by airsoftsoftwair
Maybe check that you're using a color monitor ;)

Re: Video playback

Posted: Mon Sep 28, 2015 4:16 am
by mbrantley
Any headway on this problem? I created a project in Designer more than a year ago that plays an avi video file.... always played in color before. Now it plays in B&W. Of course all my computer monitors are color. ;) Any ideas? Thanks!

Re: Video playback

Posted: Mon Sep 28, 2015 5:44 pm
by airsoftsoftwair
Is the problem clearly reproducable on your system or does it only happen sometimes? Does the video also play in B/W when using the VideoPlayer example that comes with Hollywood?

Re: Video playback

Posted: Tue Sep 29, 2015 5:44 am
by mbrantley
In my case the code was generated by Designer and once was color playback as it should be but now is greyscale 100 percent of the time. I will have some time to test it some more tomorrow and try the videoplayer example code you mention. Thanks for your attention.