VideoFFmpeg: deinterlace

deinterlace
  • set/get if the video image is using deinterlace.

Type:

  • Type: boolean
  • True = deinterlace the video image
  • False = don't deinterlace the video image.
Note:
  • Interlaced Scan: Displays all odd lines in the frame first and then all even lines.
  • Progressive Scan: Displays all the lines in the frame in sequence.
  • Deinterlaced Scan: Converts an interlaced image to a progressive scan image.
Sample Code

###################### get deinterlace status

# import bge module
import bge

# get the current scene
scene = bge.logic.getCurrentScene()

# get list of objects in scene
objList = scene.objects

# get object named MovieScreen
obj = objList["MovieScreen"]

# check to see if Video FFmpeg Texture was saved as an object variable
# in other words, was the movie started
if "Video" in obj: 

# get the saved video texture variable
video = obj["Video"]
   
# update the video texture
video.refresh(True)

else:
 
# get matID for the movie screen
# my material is named Display
matID = bge.texture.materialID(obj, "MADisplay")
   
# get the video texture
video = bge.texture.Texture(obj, matID)
      
# get the name of the movie
movieName = "BigBuckBunny.ogg"
      
# get movie path
# movie is in same directory as blend
movie = bge.logic.expandPath('//' + movieName)
      
# get video texture source
video.source = bge.texture.VideoFFmpeg(movie)

# deinterlace status
status = video.source.deinterlace
      
# save video texture as an object variable
obj["Video"] = video
   
# play the video
video.source.play()
 
Sample Code

###################### set deinterlace status

# import bge module
import bge

# get the current scene
scene = bge.logic.getCurrentScene()

# get list of objects in scene
objList = scene.objects

# get object named MovieScreen
obj = objList["MovieScreen"]

# check to see if Video FFmpeg Texture was saved as an object variable
# in other words, was the movie started
if "Video" in obj: 

# get the saved object variable
video = obj["Video"]
   
# update the video
video.refresh(True)

else:
 
# get matID for the movie screen
# my material is named Display
matID = bge.texture.materialID(obj, "MADisplay")
   
# get the video texture
video = bge.texture.Texture(obj, matID)
      
# get the name of the movie
movieName = "BigBuckBunny.ogg"
      
# get movie path
# movie is in same directory as blend
movie = bge.logic.expandPath('//' + movieName)
      
# get video texture source
video.source = bge.texture.VideoFFmpeg(movie)

# set deinterlace status to True
video.source.deinterlace = True
      
# save video as an object variable
obj["Video"] = video
   
# play the video
video.source.play()