Home | Our Services | Software - PRHelper for PC | Software - Project Tools for PC and Mac

Encoding Apple ProRes on a Windows PC with Redcine X Pro and FFMPEG

June 6th, 2012 / By Angelo Lorenzo / 11 Comments

Why deal with all this setup? Skip Python, QTChange, and Process Lasso and simplify the process.

PRHelper for PC is available

Apple ProRes encoding on Windows PC

If you run a Windows system like I do, then I’m sure you cringe when you work with a client or Final Cut editor who requests ProRes. You grab your phone and scramble to find a friend with a laptop and Final Cut. The problem is even worse if you’re transcoding R3D files on a system without a Red Rocket card; excruciatingly slow.

I’ve found an alternative workflow that is semi-automated and cheap using FFMPEG (or more specifically, a version called FFMBC with extra features for broadcast formats) and a neat Python script to bridge it with Redcine X Pro, or any other batch media encoder like Adobe Media Encoder or Sorrenson Squeeze.

Why didn’t I decide to use a frame server like Avisynth or DebugMode? I wanted to transcode multiple files without supervision, or at least minimal supervision.

This system isn’t for the faint of heart but if you’re a DIT and computer nerd like I am, I think you’ll find it easy enough.

You’ll need:

  • Python 2.7. Python is an interesting and extensive scripting language and shouldn’t feel entirely foreign if you’ve ever touched PHP, Javascript, or Visual Basic. Python 3.2 is available but reports show that my script is not compatible.
  • Komodo Edit. An awesome text editor I recommend. You can use Notepad++ or any other souped up text editor.
  • FFMPEG or FFMBC. This is a command line encoder and decoder for many video formats including ProRes.
  • Redcine X Pro. Do I need to explain this one?
  • Blackmagic Design’s 10bit uncompressed Quicktime codec. According to this forum post, select any DeckLink product from the dropdown menu and go to the Desktop Video download page. Install and you’re set.
  • QtChange. An interesting tool from Video Toolshed. Since FFMPEG and FFMBC have a difficult time with Quicktime’s timecode track, QtChange will reinsert it before you do stringouts, sync sound, and so on. $24.95 Demo available.
  • Process Lasso. Unless you have a quick RAID0 setup, you may run into disk i/o errors that will stop our Python script dead in its tracks. Process Lasso sets default process priorities to bypass that problem. $18.95 – $24.95 Demo available.

Step 1

Download the RedToProRes. Open it up in Komodo Edit and look at the settings area, but specifically line #20:

command_string = r'C:\path\to\ffmbc.exe -threads 16 -i FILE -vcodec prores -profile lt -acodec copy "C:\path\to\prores\FNAME" & del FILE'

You’ll need to edit this gingerly. Do not remove the r or the single quotes, but edit your path to FFMBC. What follows is mostly command switches for FFMBC: 16 threads is acceptable on a quadcore machine, the input which is filled in automatically, the ProRes codec andprofile (You can encode proxy, lt, standard, hq, and 444. Learn more about editing the profile switch here.), the audio codec which just copies the audio from our source file, and the path where the ProRes file will end up. For the destination path, FNAME represents the filename of the ProRes file, this is filled in automatically and is the same as the original uncompressed file we’ll create in Redcine X Pro. For now, your source path and destination path should not be the same folder and, for better speed, ideally they shouldn’t even be on the same hard drive.

Step 2

Install Blackmagic Design’s 10bit Quicktime codec.

Step 3

Open Redcine X Pro and create the following export preset with these compression settings: Quicktime, Blackmagic 10bit, current fps, uncompressed audio. You’ll want to set your audio settings to whatever is natively recorded, 16bit 48000Hz for instance; set the channel settings to stereo but Redcine X Pro will encode as many channels as are in the original audio in case, lets say, you have 6 channels from an external recorder. When you hit ok, it may label video quality as “medium”, ignore that. Set your output path, you’ll need to edit the Python script on line #16 to match.

Step 4

Start your batch, then double-click on the Python script. The Python script will open a command prompt window, let this run the entire time. As the uncompressed video files complete, they will be transcoded by FFMBC, and as they finish transcoding the original uncompressed file will be deleted to save hard drive space.

Step 4.5

Open Process Lasso the first time FFMBC starts to encode a file, find ffmbc.exe on the process list, right-click it and select Default Priority Class > Below Normal. This will stop FFMBC from fighting with Redcine X Pro for hard drive access which can lead to problems like corrupt uncompressed files or a frozen Redcine X Pro. These settings are sticky so FFMBC will always start with a below normal priority.

Step 5

After the encoding is finished, create an export preset in Redcine X Pro with the file format Avid AAF & MXF. Click Setup and select ALE Only and ignore the codec quality. Process the same batch of files in the previous step.

Step 6

Open QtChange and on the left click Source Folder. Find the folder containing your ProRes files. Next click Use ALE Data and load the ALE file we created in the previous step. You’ll notice that QtChange is propagating all the timecode that was stripped by FFMBC. On the far right hit Do It! to save your timecode.

Additional notes

This script is designed to run concurrently with Redcine X Pro. It works by monitoring for files that are growing in size, then as they stop they are considered ready to be fed to FFMBC. Because of this, I highly recommend letting your batches run undisturbed. If you pause a batch in Redcine X Pro, the file that is transcoding may prematurely be processed by FFMBC, causing it to error out. If this happens, just close the Python window and restart the script.

Final Thoughts

You’re all set! The initial setup and learning curve is a little tricky, but the process is beautifully automated after that. Do I hope to program something a bit more turn-key in the future? Yes, but for now this works and it’s worth sharing.

Full disclosure: All software was researched and purchased personally. I did not receive any payment or incentives to mention any of the software used in the above post. I also like long walks on the beach.

11 Comments

  • Charlie says:

    Doesn’t work. Right out of the gate there’s a syntax error on line 61 for column 15.

  • Charlie says:

    2.7 is needed! doesn’t work with 3.2! Works great with alexa footage as well

    • angelo says:

      Hey Charlie,
      Thanks for confirming the incompatibility with Python 3.2. I also removed line ~60-61 and updated the file. Those Print commands were for my debugging purposes to make sure the loop was working correctly. Glad you got it working too!

  • Charlie says:

    Actually ignore my other comments, it doesn’t work with 3.2, you need 2.7! I got this to work, although it converts everything to ProResLT. Any way to set what you want in the code somewhere?

  • Blake says:

    Having issues sometimes doing a batch export. I notice the script will sometimes just close after it’s done transcoding to prores, and sometimes it wont. Is there a way to make sure it stays on?

    • Angelo Lorenzo says:

      I’ve experienced this same behavior. Nothing in the script directly tells Python to close off when complete. It may be a Python controlled timeout limit or something else not as obvious. I’m not sure if I’ll be fixing the issue as I’m working on a replacement for this system; a custom GUI for ffmbc/ffmpeg that will forgo the use of Python entirely. Much less cumbersome. I know I’m about two weeks late on that promise, but I was sidetracked by some traveling work.

      Off the top of my head, on line 51 you can try changing “while True:” to “while 1==1:” as the latter is far more concrete in terms of the program language.

  • John says:

    I use a tool from Cinemartin Cinec as for prores encoding on my windows 7

    • I haven’t used it personally, but it does seem like a friendly general purpose encoder; I wouldn’t be surprised if FFMPEG’s code is built-in.

      You should also check out the features of our product PRHelper. It’s streamlined for ProRes only and has some batching features that allows you to work with uncompressed video without having a huge amount of disk space. I like to think it’s a bit more specialized for a DIT or assistant editor.

Leave a Reply to angelo

css.php