While TouchDesigner is a real-time engine, there are tons of use cases where you might want to output video in TouchDesigner. This could be for rendering out previz for your client, making content for your website & Instagram, or giving your users a cool memory from their experience. Whatever the reason, it’s something you need to know how to do in TouchDesigner. Let’s dive in!
Isn’t it easy to export movies in TouchDesigner?
Yes…..and no…. You might be thinking: “Don’t we just use the Movie File Out TOP??” Yes! Of course we’re going to use that, but there are tons of small tricks you can do to maximize the quality of your outputs and some common pitfalls you should avoid. First and foremost, let’s talk audio.
Turn up the bits!
One area new TouchDesigner users stumble is setting up the audio. Let’s start with quickly connecting the audio to the actual output. This is as easy as taking a CHOP with audio in it, and dragging and dropping it onto the Audio CHOP parameter of the Movie File Out TOP.
This will ensure that once you start recording your movie, your audio will also be embedded into the clip. So far, so good! The second thing we always recommend is changing the default codec and bit rate. It’s set to MP3 at 128 kb/s which would generally be considered pretty low quality audio. We recommend either using a higher bit rate of audio, such as 320 kb/s or switching over to uncompressed PCM if file size isn’t a huge concern.
Making either of these changes will greatly increase the audio quality of the output movie.
Framerate defaults consideration when exporting movies in TouchDesigner
This may seem obvious, but even pro developers sometimes forget to update the Movie FPS parameter to match the actual project FPS at the bottom left corner of the project. By default, a TouchDesigner project is set to run at 60 FPS, while the default recording rate of the Movie File Out TOP is 30 FPS…dun dun dunnnnnnnn! If you just went ahead with pure defaults, you’d have an output movie file that only saves one of every 2 frames out! That’s no good. So one of them has to change. We recommend changing the Movie FPS to match your project, as this will incur less weird changes in your network. An even cooler trick that we do is use some Python to dynamically get the framerate of the project so that the Movie File Out TOP is always right. That expression is me.time.rate and we can just enter that right into the parameter:
Choose codecs wisely on TouchDesigner Movie File Out!
Here’s another case of defaults-that-need-changing. The default output codec of the Movie File Out TOP is set to Photo / Motion JPEG. This is fine but definitely not a modern choice for a codec. If you want small file sizes and have an nVidia GPU in your system, we highly recommend changing this to be H.264 (NVIDIA GPU).
This will create high-quality H.264 video files for you without stressing out your CPU. If you don’t have an nVidia GPU and still want small files that are easy to send around, we recommend changing the codec to MPEG 4 (Part 2). If you need to output something that will be played back later and you want the best performance, we recommend HAP or HAP Q.
We all know and love TouchDesigner as a realtime engine, but what if the content you’re generating isn’t made for real time usage? What if you’re rendering a music video or a stitched 360-degree video or you’re rendering dailies in a production environment? Whatever it is, if you’re creating a piece of art that is too heavy to run in realtime, it can be almost impossible to render it out without getting lots of stutters…unless you disable the realtime engine. OMG WHAT?! If you haven’t seen it before, there’s a button at the top of the app named Realtime. See here:
It’s not hidden but I don’t think most people know about it. It does something quite amazing. It changes the fundamental paradigm of how TouchDesigner works. When it’s on (by default) TouchDesigner will always prioritize “real world time.” This means that if the processing in the project becomes too heavy, TouchDesigner starts dropping frames of rendering so that it can stay running and keeping up with the passing of real world seconds. This might sound bad, but it’s actually what you need in real time installations that are getting sensor inputs or doing other things. It’s better to drop the frame and stay running in parallel with real world time clocks.
Get Our 7 Core TouchDesigner Templates, FREE
We’re making our 7 core project file templates available – for free.
These templates shed light into the most useful and sometimes obtuse features of TouchDesigner.
They’re designed to be immediately applicable for the complete TouchDesigner beginner, while also providing inspiration for the advanced user.
Now if you turn that button off, you all of a sudden have a total change of dynamics. TouchDesigner starts to prioritize frame rendering instead of keeping up with real world time. That means if you have a really heavy projects running, it will make sure every single frame gets rendered before moving to the next. In most realtime situations, this isn’t helpful because it makes your system look like it’s running in some kind of weird slow-mo. BUT for rendering out your videos this is perfect, because then TouchDesigner will make sure every single frame of your content is rendered correctly and is output into the movie file without ever creating a stutter because of the amount of processing. The Movie File Out TOP works great with this because it will just go along with the project as it renders frames, and then when you play back your rendered movie, it will run at the right speed and look frame perfect. This trick doesn’t work as well if you have a ton of live input streams like Kinect cameras or similar, but if all of your sources are inside of TouchDesigner (such as audio files playing in TouchDesigner) then they’ll all correctly slow down together to make sure every frame of data is created perfectly. It’s a high-level pro trick that you probably haven’t heard of before but we highly recommend you check it out.
TouchDesigner Export Movie Wrap up
Although outputting movies can be very easy, there are a ton of tricks and techniques you can use to get a better quality output with much less effort. Between updating defaults for audio, framerate, and codecs, these things are small but make a huge difference. As well, leaning into the Realtime button can be a game changer that allows you to frame-perfectly render out those heavy TouchDesigner scenes without skipping a beat. We hope you enjoy your new found super powers when it comes to rendering videos in TouchDesigner!