"""Generate 10 blank frame videos.""" from video.constants import assets from video.constants import mediaconvert from video.logic.activities.validate_metadata import OUTPUT_FRAMERATES create_commands = [ 'ffmpeg -f lavfi -i color=black:s={w}x{h}:r={frame_rate} -vcodec jpeg2000 -vframes {num_frames} {file_name} -y' # noqa .format( w=resolution['w'], h=resolution['h'], frame_rate=frame_rate, num_frames=10, file_name=assets.BLANK_VIDEO_FILE_NAME_TEMPLATE.format( w=resolution['w'], h=resolution['h'], frame_rate=frame_rate, num_frames=10 ) ) for frame_rate in OUTPUT_FRAMERATES for resolution in [ { 'w': mediaconvert.MAX_WIDTH_SUPPORTED_BY_MEDIACONVERT, 'h': mediaconvert.MAX_HEIGHT_SUPPORTED_BY_MEDIACONVERT, }, ] ] print('\n'.join(create_commands))