The HW Blog

Want to be updated? @opencoconut | Feed

Specifying codecs in dynamic format IDs

Bruno Celeste (@brunoceleste)

April 15, 2014 Features

With Dynamic format IDs, you could use standard formats such as MP4 with H264 / AAC codecs by just naming the format_id mp4. Very handy. But if you want to use another codec instead, like H263, you had to create a new format the old way.

Today, we updated the dynamic format feature to let you choose the video codec and audio codec of your choice. The new naming becomes:

$CONTAINER:$VCODEC:$ACODEC_$SIZE_$VBITRATE_$ABITRATE

$VCODEC and $ACODEC are absolutely not mandatory, use them only if you need to.

Let's say you want to use the H263 codec with an MP4 container:

$ coconut format:info mp4:h263
{
  "container": "mp4",
  "audio_channels": 2,
  "owner": false,
  "audio_codec": "aac",
  "category": null,
  "fps": 0.0,
  "name": "mp4:h263",
  "width": 640,
  "video_bitrate": 800.0,
  "video_codec": "h263",
  "id": "mp4:h263",
  "sample_rate": 44000,
  "two_pass": false,
  "height": 0,
  "audio_bitrate": 128.0
}

Another format with the Matroska container and H264 / MP3:

$ coconut format:info mkv:h264:mp3_720p
{
  "owner": false,
  "category": null,
  "container": "mkv",
  "height": 720,
  "name": "mkv:h264:mp3 720p",
  "width": 1280,
  "fps": 0.0,
  "sample_rate": 44100,
  "video_codec": "h264",
  "id": "mkv:h264:mp3_720p",
  "video_bitrate": 1500.0,
  "audio_bitrate": 128.0,
  "two_pass": false,
  "audio_channels": 2,
  "audio_codec": "mp3"
}

Read our article to learn more about Dynamic Format IDs.



Any Comment? Send us a message on Twitter @opencoconut
If you have questions or feedbacks, you can also contact us via our contact page