Skip to content

Alternative Formats

Hugh Mackworth edited this page Dec 30, 2019 · 6 revisions

Alternative Formats

User-contributed Alternative Video Formats

This page is intended to act as a resource for folks wishing to share their video formats exported from cTiVo.

Notes on modifying the Default Format:

The Default Format uses a script (ffmpeg_edl_ac3.sh) to drive ffmpeg. This extra level adds commercial cutting capability, by adding EDL (Edit Decision List) compatibility for comskip or cTiVo's SkipMode processing, as well as dual stereo/5.1 audio tracks capabilities. You can modify it by adding your own ffmpeg options in the Edit>Edit Formats window. Select Default and then Duplicate to create one you can then modify.

First it calls ffmpeg to get duration and audio stream information about the input file.

  • If a 5.1 audio stream exists, both it and a derived AAC-stereo stream will be copied through.
  • To avoid AC3 passthrough, just add -noAC3 to Video Options.
  • To avoid stereo creation, just add -noStereo to Audio Options (note single dash, not -- as it may say within script)!
  • For EDL, use the -edl filename.edl option. It calls ffmpeg multiple times, once for each segment indicated by the EDL, then assembles the pieces into the final video.

Other options from cTiVo will be simply passed through, with a few limitations:

  • If -edl is provided, the video will be encoded in several chunks, so don't assume anything about duration.
  • In particular, don't use -ss, -to, or any filters that select or cut segments, as these are likely to conflict with the script's own ffmpeg options used to implement the -edl option
  • By default, the stereo track is encoded with ffmpeg's aac codec, and the 5.1 track is encoded with ffmpeg's ac3 codec with no additional options.
  • Any audio encoder options will apply to both the 5.1 and stereo streams. If a video is known to include an ac3 5.1 track, it can be assumed that the stereo stream in the output will be audio 0 and the 5.1 stream will be audio 1. For example -b:a 128k will set a bitrate of 128k on both streams, which is probably not desirable; instead, if a custom bitrate is desired, it should be set on both streams separately, e.g. -b:a:0 128k -b:a:1 396k (5.1 requires a higher bitrate than stereo).

Obviously, you are also free to modify the script itself, but you should then store the modified script elsewhere in your file system and select it in the Encoder to use section. It's in the cTiVo bundle at cTiVo.app/Contents/Resources/ffmpeg_edl_ac3.sh The script does some complicated text processing to achieve its goals, so any changes will require advanced shell scripting knowledge. Be sure to mark it as executable.

Clone this wiki locally