Camera background is opacity 0 when -t is passed in, otherwise 1

This commit is contained in:
Grant Sanderson 2018-08-08 11:50:34 -07:00
parent 3dc5b10e8b
commit f9ce36c6f6
3 changed files with 12 additions and 5 deletions

View file

@ -39,7 +39,7 @@ class Camera(object):
"frame_width": FRAME_WIDTH,
"frame_center": ORIGIN,
"background_color": BLACK,
"background_opacity": 0,
"background_opacity": 1,
# Points in vectorized mobjects with norm greater
# than this value will be rescaled.
"max_allowable_norm": FRAME_WIDTH,

View file

@ -106,16 +106,23 @@ def get_configuration():
"start_at_animation_number": args.start_at_animation_number,
"end_at_animation_number": None,
}
# Camera configuration
config["camera_config"] = {}
if args.low_quality:
config["camera_config"] = LOW_QUALITY_CAMERA_CONFIG
config["camera_config"].update(LOW_QUALITY_CAMERA_CONFIG)
config["frame_duration"] = LOW_QUALITY_FRAME_DURATION
elif args.medium_quality:
config["camera_config"] = MEDIUM_QUALITY_CAMERA_CONFIG
config["camera_config"].update(MEDIUM_QUALITY_CAMERA_CONFIG)
config["frame_duration"] = MEDIUM_QUALITY_FRAME_DURATION
else:
config["camera_config"] = PRODUCTION_QUALITY_CAMERA_CONFIG
config["camera_config"].update(PRODUCTION_QUALITY_CAMERA_CONFIG)
config["frame_duration"] = PRODUCTION_QUALITY_FRAME_DURATION
if args.transparent:
config["camera_config"]["background_opacity"] = 0
# Arguments related to skipping
stan = config["start_at_animation_number"]
if stan is not None:
if "," in stan:

View file

@ -591,7 +591,7 @@ class Scene(Container):
# This is if the background of the exported video
# should be transparent.
command += [
'-vcodec', 'png',
'-vcodec', 'qtrle',
]
else:
command += [