Hints/examples re: ImageMagick plugin integration?

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

Charles Duffy

  • Posts: 6
  • Joined: Mon Dec 28, 2020 12:13 pm
  • Real Name: Charles Duffy

Hints/examples re: ImageMagick plugin integration?

PostSat Jan 02, 2021 1:16 am

Howdy --

When doing a first pass through the documentation on using Davinci Resolve's Python API, I noticed ImageMagick in the list of suggested libraries.

That's actually perfect: I'm working on a project where I want to animate actions recorded on a UNIX terminal, projecting them into a 3d scene; the pipeline I'm currently considering is ttyrec (to record to a file with timing data, sync'd to a concurrently-recorded soundtrack of a proper mechanical/clacky keyboard) -> ttyplay+termtosvg (to convert that file to an animated SVG with a customizable template) -> ImageMagick (to convert that animated SVG into something that can be imported into the media pool) -> Fusion.

Plan A was to have ImageMagick be responsible for emitting a video format that Fusion can read, and manually adding that content to the media pool; but if there's a simpler path, I'd be glad of any suggestions on offer.

Suggested reading? Alternately, does someone have a better idea with respect to a means to generate a high-quality render of a UNIX terminal session in a format that Resolve will accept as input?

Many thanks,
-- Charles
Offline

Charles Duffy

  • Posts: 6
  • Joined: Mon Dec 28, 2020 12:13 pm
  • Real Name: Charles Duffy

Re: Hints/examples re: ImageMagick plugin integration?

PostTue Jan 05, 2021 7:43 pm

FWIW, I ended up not worrying about trying to do this in-line with the plugin API; instead, I modified termtosvg to allow the 1ms minimum time between frames to be eliminated (to make frame numbers line up perfectly with the time metadata in its input file), leveraged the existing option to emit a separate SVG file per state, and then wrote a wrapper to call inkscape to render those frames that would actually be included in the recording and then duplicate them in an output stream (to ffmpeg, creating an intermediate file) as many times as necessary to have the timings work out for an arbitrary framerate.

It's a kludge, and a lot slower than it could be, but it's a kludge that does what I needed -- and I'd be glad to share parts of it with anyone who happens to have similar needs.

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 7 guests