Friday, February 2, 2018

Tutorial - Using ShotCut as a ProRes transcoder

After the complexity of my previous tutorials, I thought I'd do something simpler this time, just in case there are some of you who aren't a fan of the complex AVISynth-FFMPEG workflow. It just uses one program, and a minimum of steps.

The program in question is ShotCut, a free, open-source editing program for Windows, MacOS and Linux. Like a lot of other open-source video editing apps, it uses the MLT Engine for timeline playback/editing, and FFMPEG for export. Unlike most of those apps, the Windows port is pretty stable, even with heavily compressed h.264 footage.

ShotCut is a fairly simple program, but it does have enough features that it can be used as a decent replacement for Windows Movie Maker or any of the slew of $15-$50 editing programs that flood the internet. It'll do multi-track editing, text, some basic color correction, and even supports some video output cards/devices like the Blackmagic Intensity Pro. If you're interested in learning how to do that, The ShotCut site has a tutorials page that's fairly comprehensive. For the purposes of this tutorial, I'm just treating ShotCut as a transcoding program.

BIG DISCLAIMER: 

This process may not work, may crash, or do other things to your system. I check for viruses before using any software, but malicious hackers have been known to break into developer accounts and insert code into previously benign programs.

If you are working on a professional production, the results may or may not be acceptable, especially if you're trying to send out a ProRes master to a TV station. Their QC department may reject ProRes files that haven't come from an official, licensed-by-Apple encoding app.

You have been warned. 



First, download ShotCut. I personally think the installer is the way to go, but if you want more control over were it installs everything, then you can grab the "portable" version.

Next, virus scan the file using VirusTotal or a major anti-virus/malware scanning program.

Then, install ShotCut. This is pretty easy, basically just click "next" a few times, then "finish". If you went with the portable version, extract the files into your location of choice.

Once ShotCut is installed, run it. You'll see a fairly simple interface with a few buttons at the top. At the moment, it's just showing the Source panel, and that's all we'll need to get started. Drag your video file of choice onto the blank area, and it will load and start playback. Pause it with the spacebar.

Click on the Export button, which will bring up the Export panel. Make sure that the resolution and framerate settings match your video file, then scroll the list of codecs on the left to get to "Intermediate-ProRes" and select it. If you want to change the subtype of ProRes, click on the Other panel and change the "vprofile=" number to your preference. If you need a refresher from the FFMPEG tutorial:

0 = ProRes Proxy
1 = ProRes LT
2 = ProRes 422
3 = ProRes 422HQ

If you change the codec to "Intermediate-ProRes-Kostoya", then you can also do:

4 = ProRes 444

Once you're happy with the settings, hit the Export button, name your file and save. Rendering will start, and once it's done, you should be good to go.

Best of all, because you didn't add anything to a timeline, you won't get a prompt to save your work when closing ShotCut.

The caveats to this process are that the encoder is slow - I only get about the equivalent of one core's performance, which is far slower than command-line FFMPEG. Not sure why that is, although I suspect it may have something to do with a bottleneck between the MLT engine and FFMPEG.

Also, deinterlacing is performed using YADIF, so don't expect the kind of high-res interpolation that AVISynth+QTGMC can provide, and don't expect it to frame-double. It's fine for quick and dirty conversions, but for pro work, you might want to consider using either the AVISynth+QTGMC method or Premiere Pro or Final Cut Pro X with the FieldsKit plugin installed.

Oh, and don't try to deinterlace and upscale. In my experience, it causes a chroma/colorspace shift. Upscaling progressive video should be fine, but check before using the exported video just in case.

UPDATE: I found the problem with upscaling, and it's a bug in FFMPEG. Solutions to it and other issues are covered in this post.

You can actually encode a number of different video files, but I don't recommend it. To do so, click on the Playlist button to give you a Project bin-like place to drop multiple files. Drag your files over, then switch to the Export panel. In the "From" drop-down, select "Each Playlist Item", then proceed as if you're working with a single file.

There are some significant downsides to encoding multiple files at once. You need to have the exact same resolution and framerate settings for all the files in the playlist, or the files that don't match the preset will be converted to those settings. It also doesn't automatically carry over the filenames from the original files, and will only let you enter a single filename for the exported videos with a "-1", "-2", etc appended to the end.

No comments:

Which deinterlacing algorithm is the best? Part 1 - HD interlaced footage

Before I began, I'd like to give a special thanks to Aleksander Kozak for his help in testing and providing the HD footage used in this ...