Sorry guys, but I’m getting a bit frustrated here and I’m SERIOUSLY considering completely skipping this Draft nonsense and use a completely different solution (EVEN NUKE for that matter) so a super simple timecode burn in. Draft just doesn’t make any sense to me. It seems as if Draft was supposed to be a Pythonic module, but was written by somebody deeply rooted in C++ or other programming language (kinda like raw Python implementation in Maya felt). Passing objects, returning objects, somehow, nothing MAKES ANY SENSE and I don’t think I am a complete Python beginner here.
Ok, se here’s my, incomplete, Draft template code that I just cannot really think of ANY way putting together from the examples in the documentation:
from DraftParamParser import ReplaceFilenameHashesWithNumber
tmpFilesToProcess = [r"D:\V1880007_lens_A.MP4"]
Create a Draft.ImageInfo object to extract a Draft.Timecode object
imageInfo = Draft.ImageInfo()
decodedVideo = Draft.VideoDecoder(tmpFilesToProcess)
frameImage = Draft.Image.CreateImage(decodedVideo.width, decodedVideo.height)
now, what the hell do I do here?!!! Why do I have to work with single images suddenly? And, ok, if so, WHERE THE HELL DO I REFERENCE THE IMAGE?
#OK, WHERE DO I REFERENCE THE frameImage object?! Where do I use it? How? Is it always overwritten in memory, meaning
the object refreshes with each DecodeNextFrame call? Why can’t I index it? Or at least Yield it? HOW DOES IT WORK?!
# If first frame and a timecode is found, specify the timecode parameter when creating the encoder
# WHAT IS THIS?!! why am I encoding a video with no parameters and mainly no reference to the frameImage object?!
encoder = Draft.VideoEncoder( ‘C:\myMovie.mov’, timecode = imageInfo.timecode )
encoder = Draft.VideoEncoder( ‘C:\myMovie.mov’ )
# Add current frame to the video.
I’m sorry, but this is just one huge mess. I don’t understand the Draft structure, its logic and I am really frustrated by it not doing anything remotely logical.
I’d much rather work around Draft than work with it, to be quite honest.