Common presets¶
It is not always straightforward to construct a transcode preset that result in output with the desired format. Here are some guidelines for some of the most common formats.
H264¶
The codec
element should be set to h264
. The default profile is Baseline.
This can be overridden using the preset
element. The following values are
accepted:
baseline
ipod
main
high
There are also AVC-Intra specific profiles, see below.
Example¶
An MP4 using the Main profile:
<TranscodePresetDocument xmlns="http://xml.vidispine.com/schema/vidispine">
<format>mp4</format>
<audio>
<codec>mp3</codec>
<framerate>
<numerator>1</numerator>
<denominator>44100</denominator>
</framerate>
<channel>0</channel>
<channel>1</channel>
<stream>2</stream>
</audio>
<video>
<scaling>
<width>1280</width>
<height>720</height>
</scaling>
<codec>h264</codec>
<bitrate>3000000</bitrate>
<framerate>
<numerator>1</numerator>
<denominator>25</denominator>
</framerate>
<preset>main</preset>
</video>
</TranscodePresetDocument>
AVC-Intra¶
To produce AVC-Intra output, the preset
element should be set
to intra50
or intra100
depending on desired output. Also add a
setting of codecTagString
to further specify the variant of AVC-Intra.
The possible values are:
ai5p
– 50M 720p24/p30/p60ai5q
– 50M 720p25/p50ai56
– 50M 1080i60ai55
– 50M 1080i50ai53
– 50M 1080p24/p30ai52
– 50M 1080p25ai1p
– 100M 720p24/p30/p60ai1q
– 100M 720p25/p50ai16
– 100M 1080i60ai15
– 100M 1080i50ai13
– 100M 1080p24/p30ai12
– 100M 1080p25
Example¶
<TranscodePresetDocument xmlns="http://xml.vidispine.com/schema/vidispine">
<format>mov</format>
<audio>
<codec>pcm_s16le</codec>
<framerate>
<numerator>1</numerator>
<denominator>48000</denominator>
</framerate>
<channel>0</channel>
<channel>1</channel>
<stream>2</stream>
</audio>
<video>
<scaling>
<width>1920</width>
<height>1080</height>
</scaling>
<codec>h264</codec>
<bitrate>100000000</bitrate>
<framerate>
<numerator>1</numerator>
<denominator>25</denominator>
</framerate>
<gopSize>0</gopSize>
<pixelFormat>yuv422p</pixelFormat>
<preset>intra100</preset>
<profile>CBR</profile>
<setting>
<key>codecTagString</key>
<value>ai12</value>
</setting>
</video>
</TranscodePresetDocument>
ProRes¶
Set the codec
element to prores
. The preset
element
must also be set to one of the following values:
PR422HQ
– ProRes HQPR422
– ProRes 422PR422LT
– ProRes LTPR422Proxy
– ProRes ProxyPR4444
– ProRes 4444
The ProRes encoder will use the field-order information that Vidispine
can read from the input file. In the case that Vidispine has the wrong
information, you can override it by adding a setting
key-value to
the video
element in the TranscodePresetDocument. The key
should be interlace_flag
and value one of:
progressive
top_first
bottom_first
Example¶
ProRes 422 LT:
<TranscodePresetDocument xmlns="http://xml.vidispine.com/schema/vidispine">
<format>mov</format>
<audio>
<codec>pcm_s16le</codec>
<framerate>
<numerator>1</numerator>
<denominator>48000</denominator>
</framerate>
<channel>0</channel>
<channel>1</channel>
<stream>2</stream>
</audio>
<video>
<scaling>
<width>1920</width>
<height>1080</height>
</scaling>
<codec>prores</codec>
<bitrate>85000000</bitrate>
<preset>PR422LT</preset>
<framerate>
<numerator>1</numerator>
<denominator>25</denominator>
</framerate>
</video>
</TranscodePresetDocument>
With interlace_flag
set to top_first
:
<TranscodePresetDocument xmlns="http://xml.vidispine.com/schema/vidispine">
<format>mov</format>
<audio>
<codec>pcm_s16le</codec>
<framerate>
<numerator>1</numerator>
<denominator>48000</denominator>
</framerate>
<channel>0</channel>
<channel>1</channel>
<stream>2</stream>
</audio>
<video>
<scaling>
<width>1920</width>
<height>1080</height>
</scaling>
<codec>prores</codec>
<bitrate>85000000</bitrate>
<framerate>
<numerator>1</numerator>
<denominator>25</denominator>
</framerate>
<preset>PR422LT</preset>
<setting>
<key>interlace_flag</key>
<value>top_first</value>
</setting>
</video>
</TranscodePresetDocument>
XDCAM IMX-30/40/50¶
The preset
element must be set to imx30
, imx40
or imx50
depending on desired output. Also, a setting must be added specifying
codecTagString
. Accepted values are:
mx5p
– IMX-50mx4p
– IMX-40mx3p
– IMX-30
NTSC¶
To get NTSC output, there are a few changes that need to be made.
- The
framerate
should have anumerator
of1001
and adenominator
of30000
. - The
scaling
element should have aheight
of518
. - Exchange the last letter of the
codedTagString
fromp
ton
(i.e.mx5p
tomx5n
)
Example¶
IMX-50:
<TranscodePresetDocument xmlns="http://xml.vidispine.com/schema/vidispine">
<format>mxf_d10</format>
<audio>
<codec>pcm_s24le</codec>
<channel>0</channel>
<channel>1</channel>
<channel>2</channel>
<channel>3</channel>
<stream>4</stream>
</audio>
<video>
<scaling>
<width>720</width>
<height>608</height>
<top>-32</top>
</scaling>
<codec>mpeg2video</codec>
<bitrate>50000000</bitrate>
<framerate>
<numerator>1</numerator>
<denominator>25</denominator>
</framerate>
<displayWidth>
<numerator>720</numerator>
<denominator>1</denominator>
</displayWidth>
<displayHeight>
<numerator>576</numerator>
<denominator>1</denominator>
</displayHeight>
<displayXOffset>
<numerator>0</numerator>
<denominator>1</denominator>
</displayXOffset>
<displayYOffset>
<numerator>32</numerator>
<denominator>1</denominator>
</displayYOffset>
<containerSAR>
<horizontal>64</horizontal>
<vertical>45</vertical>
</containerSAR>
<gopSize>0</gopSize>
<pixelFormat>yuv422p</pixelFormat>
<preset>imx50</preset>
<setting>
<key>codecTagString</key>
<value>mx5p</value>
</setting>
</video>
</TranscodePresetDocument>
XDCAM HD422¶
The format
element must be set to mxf_ffmpeg
. There are also some
settings that must be added, see example below. The codecTagString
setting
should be one of the following values:
xd54
– 720p24 50Mb/s CBRxd55
– 720p25 50Mb/s CBRxd59
– 720p60 50Mb/s CBRxd5a
– 720p50 50Mb/s CBRxd5b
– 1080i60 50Mb/s CBRxd5c
– 1080i50 50Mb/s CBRxd5d
– 1080p24 50Mb/s CBRxd5e
– 1080p25 50Mb/s CBRxd5f
– 1080p30 50Mb/s CBR
NTSC¶
To get NTSC output, set the framerate
to have a numerator
of 1001
and a
denominator
of 30000
, and use the appropriate codecTagString
from
the list above.
Example¶
<TranscodePresetDocument xmlns="http://xml.vidispine.com/schema/vidispine">
<format>mxf_ffmpeg</format>
<audio>
<codec>pcm_s24le</codec>
<channel>0</channel>
<channel>1</channel>
<channel>2</channel>
<channel>3</channel>
<stream>1</stream>
<stream>1</stream>
<stream>1</stream>
<stream>1</stream>
</audio>
<video>
<scaling>
<width>1920</width>
<height>1080</height>
</scaling>
<codec>mpeg2video</codec>
<bitrate>50000000</bitrate>
<framerate>
<numerator>1</numerator>
<denominator>25</denominator>
</framerate>
<pixelFormat>yuv422p</pixelFormat>
<setting>
<key>flags</key>
<value>+ildct+ilme</value>
</setting>
<setting>
<key>top</key>
<value>1</value>
</setting>
<setting>
<key>dc</key>
<value>10</value>
</setting>
<setting>
<key>qmin</key>
<value>1</value>
</setting>
<setting>
<key>lmin</key>
<value>1*QP2LAMBDA</value>
</setting>
<setting>
<key>rc_max_vbv_use</key>
<value>1</value>
</setting>
<setting>
<key>rc_min_vbv_use</key>
<value>1</value>
</setting>
<setting>
<key>minrate</key>
<value>50000k</value>
</setting>
<setting>
<key>maxrate</key>
<value>50000k</value>
</setting>
<setting>
<key>bufsize</key>
<value>36408333</value>
</setting>
<setting>
<key>bf</key>
<value>2</value>
</setting>
<setting>
<key>codecTagString</key>
<value>xd5c</value>
</setting>
</video>
</TranscodePresetDocument>
DV¶
For DVCAM, DVCPRO and DVCPRO50, codec
should be set to dvvideo
, for
DVCPRO HD, it should be dv_100
. To get 16x9 aspect ratio, targetDAR
must be set (see example below). The value of pixelFormat
determines
whether the output will be DV, DVCPRO or DVCPRO50.
Pixel format | Output |
---|---|
yuv420p |
DVCAM |
yuv411p |
DVCPRO |
yuv422p |
DVCPRO50 |
NTSC¶
To get NTSC output the following changes should be made.
- The
framerate
should have anumerator
of1001
and adenominator
of30000
. - The
scaling
should have aheight
of480
. codecTagString
should have a value ofdvpn
.
Example¶
16x9 DVCPRO:
<TranscodePresetDocument xmlns="http://xml.vidispine.com/schema/vidispine">
<format>avi</format>
<audio>
<codec>pcm_s16le</codec>
<framerate>
<numerator>1</numerator>
<denominator>48000</denominator>
</framerate>
<channel>0</channel>
<channel>1</channel>
<stream>2</stream>
</audio>
<video>
<scaling>
<width>720</width>
<height>576</height>
<targetDAR>
<horizontal>16</horizontal>
<vertical>9</vertical>
</targetDAR>
</scaling>
<codec>dvvideo</codec>
<bitrate>25000000</bitrate>
<framerate>
<numerator>1</numerator>
<denominator>25</denominator>
</framerate>
<gopSize>0</gopSize>
<pixelFormat>yuv411p</pixelFormat>
<profile>CBR</profile>
<setting>
<key>codecTagString</key>
<value>dvpp</value>
</setting>
<setting>
<key>dtsmode</key>
<value>pts</value>
</setting>
</video>
</TranscodePresetDocument>
RED¶
New in version 4.1.
Vidispine support RED as an input format so there is no special shape-tag settings that needs to be made. However, there are a few limitations and things to keep in mind.
Local file access¶
The transcoder needs to be able to read the RED file locally. Transcoder and Middleware needs to be running at the same machine.
Choosing an appropriate quality¶
New in version 4.2.
Demuxing of RED material is a very computational demanding task. Normal RED footage has a resolution of 4K or 5K. Decoding such a frame in full resolution and quality is sometimes a bit overkill. That is, when creating a lowres file in 640x360 resolution you can save a lot of time by decoding the RED footage in a lower resolution.
You can specify what decoding/demuxing quality the transcoder should use
by setting the demuxerSetting
element in your shape-tag:
<TranscodePresetDocument>
<format>mp4</format>
<audio>
...
</audio>
<video>
...
</video>
<demuxerSetting>
<key>r3d_demuxer_quality</key>
<value>full_premium</value>
</demuxerSetting>
</TranscodePresetDocument>
Valid values for r3d_demuxer_quality is:
full_premium
- Full resolution and the best qualityhalf_premium
- Half of the width and height of the original resolution and the best qualityhalf_good
- Half of the width and height of the original resolution with good qualityquarter_good
- Quarter of the width and height of the original resolution with good qualityeight_good
- An eight of the width and height of the original resolution with good qualitysixteenth_good
- A sixteenth of the width and height of the original resolution with good quality
Multi-file RED clips¶
In case of multi-file RED clip the naming of the clips will be crucial. They should already be named (which they are as default):
<filename><index>.R3D
To preserve the filename of a RED file you can add a filename script to the storage where the RED files will be imported. For example:
PUT /API/storage/<storage-id>/metadata/filenameScript HTTP/1.1
Content-Type:text/plain
if (context.getExtension() != null && (context.getExtension() == "R3D" || context.getExtension() == "r3d"))
"VX-" + context.getOriginalFilename();
else
context.getFileId() + "." + context.getExtension();
Then you need to import the clips into an placeholder, this way there will only be one transcoded file instead of X (X being the number of clips). For example:
POST /API/import/placeholder?container=0&video=2
Content-Type: application/xml
<MetadataDocument xmlns="http://xml.vidispine.com/schema/vidispine">
<timespan start="-INF" end="+INF">
<field>
<name>title</name>
<value>My placeholder for RED files</value>
</field>
</timespan>
</MetadataDocument>
POST /API/import/placeholder/<placeholder-id>/video?uri=file:/REDTEST_001.R3D&tag=mp4
Content-Type: application/xml
<MetadataDocument xmlns="http://xml.vidispine.com/schema/vidispine">
<timespan start="-INF" end="+INF">
</timespan>
</MetadataDocument>
POST /API/import/placeholder/<placeholder-id>/video?uri=file:/REDTEST_002.R3D&tag=mp4
Content-Type: application/xml
MetadataDocument xmlns="http://xml.vidispine.com/schema/vidispine">
<timespan start="-INF" end="+INF">
</timespan>
</MetadataDocument>