Many of you are probably wondering what the heck is frame serving. Well it's a method of serving video from one application to another without having to render to an intermediate first. It's useful when you're pressed for time, need to render to a format your software doesn't support, want to render using a different encoder (Handbrake instead of Main Concept) or you need to import a clip that's in a format your software doesn't accept.
HitFilm does not support frame serving but it can still be useful to users especially those that use another NLE like Vegas or Premiere Pro or have footage in a format HitFilm doesn't like. Frame serving can also help with things like taking an OpenEXR sequence rendered with HitFilm and converting it to a deep color format for encoding as a 10 bit ProRes, DNxHD or Cineform video.
Hopefully this thread will grow with more useful examples but for now I'm going to start with frame serving from Sony Vegas to HitFilm because it could come in handy when your version of HitFilm isn't the right one for integrating with Vegas. The requirements for this example are:
Not needed but recommended
NOTE: Premiere users can follow along too. If you have an older version of Premiere Pro the DebugMode FrameServer might work but for newer versions there is the Advanced FrameServer which is an updated fork of DebugMode just for Premiere.
Before you get started on downloading things I have a warning - Do not get distracted by the 64 bit and/or multi-threaded versions of Avisynth! The 32 bit single threaded version is stable and generally works with everything if slow on complex operations. The other versions - not so much. Start out slow with the version listed here and once everything is working and your comfortable with Avisynth then and only then move on to other versions if you really feel the need.
Let's start by downloading and Installing the DebugMode FrameServer. The installation is very straight forward and when it's done Vegas will have a new rendering option called DebugMode FrameServer. Not very imaginative but it works.
Next move on to Avisynth. During installation just accept the defaults.
Now the Pismo File Mount Audit Package. Again you can just accept the defaults.
Finally AVFS. This does not have an installer, just a zip file that contains the code source and a small exe file. This exe file needs to be placed in a location covered by your system PATH. The documentation says the Windows folder works so if you're comfortable with that copy it there. Note you'll get a warning form Windows requiring administrator approval to do that and if you aren't comfortable with that remember any location covered by PATH is fine.
Now that all the important bits are installed there are a few things to consider before digging in. One is that DebugMode is now a Render as option with only one default template that can't be customized because the frame server gets all of its properties from your Vegas project properties. That means if you want progressive output your project properties should be set to progressive (not necessarily - more on this later). If you want alpha channel output your project needs to be set to 32 bit float, video levels. IMPORTANT: If you do set your project to 32 bit float be sure to check your video levels!!! See Glenn Chan's excellent article on Color Spaces and Levels in Sony Vegas for more info on this. Last thought on this part - If your doing a lot of complex things to whatever you want to frame serve your serving speed will only be as fast as Vegas can render it. This is fine if your goal is to use a foreign encoder like Handbrake but it will make editing in another app painful so consider and plan accordingly.
It's also a REALLY good idea to get organized and plan ahead on where you're going to keep your working files. I made a folder on my C: drive called frameserver with two more folders in it called scripts and debugmodeout. You should also make notes on your project in case you ever have to go back to it. Frame serving means there are no intermediate files left so you have to keep track of what clips you served. If you took my advice and installed Timeline Tools too it has a "Notes" tab just for this kind of thing.
Can we finally get to actually doing something?? Umm yeah sure
Anyway for this first example we will not be dealing with audio for reasons I'll cover in a bit so for now fire up Vegas, set your project properties for the output you want and drop a clip on the timeline. Like rendering with any other project you can render the entire project or set a loop region and render just that. When you're ready select File-->Render as, set your output path and file name, select Project Default under DebugMode FrameServer (*.avi), check whether to render the whole project or just the loop region under Render Options and then click Render. If everything is working you should see the following window:
Select RGB24 when you aren't dealing with alpha channel data or RGB32 when you are dealing with alpha channel data. Make sure Write audio as PCM samples in signpost AVI is not checked and click Next. After a few seconds you should be greeted with this:
Congratulations! You are now frame serving from Vegas! What's happened is DebugMode has created a signpost or stub AVI file that represents the served output. Applications that support frame serving like VirtualDub can open and work with this file just like it was a real AVI file. Others that don't like HitFilm need more help and that's where Avisynth comes in.
As briefly mentioned in the requirements above Avisynth takes scripts for input and has it's own language with a whole bunch of internal functions, internal filters and can use hundreds of external filters but we're not doing anything that complex so all we need to do is create a script that defines a source video and a source filter, something like a codec, to use to read the source video. The scripts are just simple text files with AVS as the extension instead of TXT and if you accepted the defaults when you installed Avisynth you should now have a new right click option to create a new Avisynth script. Browse to where you're saving your scripts, right click and select New then Avisynth script and name the script however you like. If you double click it, it should open in Notepad and be blank. Now you can define your source filter and the path to your source video like so: (Make sure it's all on one line)
OpenDMLSource ("C:\Path\To \served.avi").KillAudio
OpenDMLSource is the internal source filter we want to use. Avisynth deals mainly with AVI files and OpenDMLSource is an AVI source filter that works well with stub files like we have here. The next part is just the path to the Debugmode stub file enclosed by (" "). The .KillAudio is there for insurance. don't forget the . and I promise I will talk about audio soon. Once you have everything entered save the file. Not Save As, just save. If you do a Save As, Notepad will default to saving it as a regular text (.txt) file.
Now you have to make a choice. Either open a command prompt and execute avfs.exe followed by the name and path to your AVS file or right click the AVS file and select Open with and then browse to where you stashed avfs.exe. If you do the Open with option you can set it up so that every time you double click an AVS file it gets mounted as a virtual folder but if you do that you will no longer be able to edit a file just by double clicking it. On the other hand opening a command prompt and typing everything in is a pain too. For what it's worth I set it so that double clicking an AVS file automatically mounts it and I use the Open with option to open one in an editor. Either way you go you should end up with a command prompt window that tells you to press CTRL+C to quit (don't until you're done with the clip) and a new folder on your C: drive called Volumes that has your frame served video mounted as a virtual folder in it. If everything went well the virtual folder will have three files, the video, a copy of the AVS file and an error.log file. The error log is created even when everything is fine. If you don't see an AVI file then check the error log for clues as to what isn't working.
If everything is working you now have a frame served video that can be opened in HitFilm along with most any other program that handles video or even another instance of Vegas. When you're done with the clip just bring up that command prompt window and CTRL+C to stop Avisynth. Debugmode can be stopped by clicking the Stop button. All that leaves is talking about audio.
Apparently Debugmode has a bug that'll glitch served audio. The fix is to add an empty event to the end of whatever is being served that's exactly 1 second in length. To me that's just annoying and you're better of rendering a separate wave file first then importing both it and your served video into HitFilm but if you run into a situation where you absolutely have to have the audio in the served content Avisynth will help you there too. To start go ahead and render out your audio as a wave file then frame serve the video like normal only this time change your Avisynth script to something like this:
Video = OpenDMLSource("C:\Path\To \served.avi").KillAudio
Audio = WAVSource("C:\Path\To\audio.wav")
And mount it. This time you'll have a clip with audio and separate audio files mounted in the virtual folder.
Since I've already written way too much I'm going to stop here for now. This is just barely scratching the surface of frame serving so if you have questions or are just bored be sure to check out the Avisynth Wiki