wiki:Encode/PremierePro

How to encode with ffmpeg from Adobe Premiere Pro

Adobe Media Encoder can lack the quality, flexibility, and control that ffmpeg can provide. There are two main methods to get your movie from Premiere to ffmpeg:

  • Output to a lossless intermediate file, or
  • Use a frameserver

Creating a lossless intermediate file and using it as an input for ffmpeg might seem simpler, but it has two obvious downsides: you have to wait for the file to be encoded, and the output file size can be very large. A frameserver will transfer the data to ffmpeg without the need for a large temporary file, but it is a more complicated method. Both methods have their uses and this guide will show how to do both.

Note: These instructions were written using Adobe Premiere Pro CS6.

Output to a lossless intermediate file

  1. Save your project and close Premiere Pro
  1. Install Ut Video. It is a fast, lossless video encoder (and decoder), and is natively supported by ffmpeg.
  1. Open Premiere, select your sequence, and choose "File > Export > Media" (or hit Ctrl+M).
  1. Under "Export Settings" choose "Format: AVI" and make sure "Export Video" and "Export Audio" are both checked. Then under "Video Codec" choose "Ut Video Codec YUV420". Lastly, check your "Basic Video Settings" to make sure Premiere did not screw around with the frame size, frame rate, etc, as it is apt to do.

Premiere Export Settings (lossless)

  1. Now you can encode with ffmpeg using your lossless file as an input. See the H.264 Encoding Guide for more information. You can then delete the temporary lossless file once you are satisfied with your ffmpeg output.

Use a frameserver

  1. Install Debugmode FrameServer, Avisynth (32-bit), and ffmpeg (32-bit static build).
  1. Create an Avisynth script named frameserver.avs by opening a text editor and adding the following (assuming your working directory is c:\encode):
AviSource("c:\encode\output.avi")
  1. Open Premiere, select your sequence, and choose "File > Export > Media" (or hit Ctrl+M).
  1. Under "Export Settings" choose "Format: DebugMode FrameServer" and make sure "Export Video" and "Export Audio" are both checked. Give your file the same name and path as shown in your Avisynth script (output.avi in c:\encode for this example).

Premiere Export Settings (frameserver)

  1. The FrameServer setup window will appear. Choose "Next".

Debugmode FrameServer

  1. Now you can encode with ffmpeg using your Avisynth script as an input. Example:
ffmpeg -i encode/frameserver.avs -c:v libx264 -preset medium -crf 23 -pix_fmt yuv420p -c:a libfdk_aac -vbr 4 output.mp4

See the H.264 Encoding Guide for more encoding details and examples.

FAQ

ffmpeg gives me an error

[avs @ 0000000001ffde40] AVIFileOpen failed with error -2147221164
encode/frameserver.avs: Operation not permitted

This means you are probably trying to use 64-bit ffmpeg with 32-bit Avisynth. For simplicity this guide demonstrates usage of 32-bit builds.

The "Export Settings" window in Premiere does not show up

Probably a bug in Premiere when using Debugmode FrameServer. Save your project (as a new project file) and restart Premiere.

The audio is out of sync after I encode with ffmpeg from the frameserver

You can output the audio from Premiere and mux it with the ffmpeg encoded video from the frameserver. This example will ignore any audio from the first input (video.mp4):

ffmpeg -i video.mp4 -i audio.wav -c:v copy -c:a libfdk_aac -vbr 5 -map 0:v:0 -map 1:a:0 -shortest output.mp4

Also See

Last modified 10 years ago Last modified on Aug 19, 2014, 7:39:25 PM

Attachments (3)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.