Follow

Open and Closed GOP files

A GOP (Group of Pictures) structure and size determines the I-, P-, and B-frames that will be used during transcoding.  While open GOPs provide slightly better compression than closed GOPs of the same size and structure, there are limitations to processing open GOP files in the cloud.

Pixvana supports closed GOP files for optimal cloud transcoding.  Here are some alternatives to uploading an open GOP file:

  • Convert your file to a different format for upload.  We suggest ProRes or an image sequence to maintain the quality of your video
  • Use the export settings in Adobe Media Encoder to create closed GOP MPEG-2 files
  • Use FFmpeg to encode your file to closed GOP.  See below for further details

FFmpeg Method

  1. Ensure FFmpeg is installed with the x265 library
    1. For Mac: install with brew install ffmpeg --with-x265
    2. For Windows: install using the executable file from https://www.ffmpeg.org/download.html#build-windows
  2. Run this FFmpeg command on your video, inserting your own video path in place of OpenGOPVideoPath:

    ffmpeg -i <<OpenGOPVideoPath>> -c:v libx265 -x265-params keyint=120:min-keyint=120:scenecut=0:no-open-gop=1:crf=16 <<OutputVideoPath>> 

The output video inherits the same FPS of the input video unless changed in the command.  In the example above, keyint refers to the GOP size in seconds x FPS of the video.  For a video of 30 FPS, the resulting GOP size will be 4 seconds.

0 Comments

Please sign in to leave a comment.