I asked this question on the MSDN forums, but as always - there's no point in waiting on a reply from there.
What I am trying to do for now is to enable users to trim the start and end of their videos using the Media Encoder Standard encoder and a custom preset. However because it is not documented anywhere (despite being the "recommended" encoder), I can't get it to work. Here is what I add to the standard encoding preset JSON object:
customPreset.Sources = [
{
'Clips': [
{
'StartTime': '00:00:10', //sample values
'EndTime': '00:02:03'
}
]
}
];
The rest of the preset is a slightly modified adaptive bitrate preset, that's been tested to work fine:
"Codecs": [
{
"KeyFrameInterval": "00:00:02",
"H264Layers": [
{
"Profile": "Auto",
"Level": "auto",
"Bitrate": 5500,
"MaxBitrate": 6000,
"BufferWindow": "00:00:05",
"Width": 1920,
"Height": 1080,
"BFrames": 3,
"ReferenceFrames": 3,
"AdaptiveBFrame": true,
"Type": "H264Layer",
"FrameRate": "0/1"
},
...//and so on, then image layers for thumbnails and audio profile
However when I start an encoding job with this Sources
property being added to the preset, the resulting asset is not trimmed. So I am assuming I am doing someone wrong? Since Microsoft don't seem to want to document this encoder(at least for now), is there anyone who's done something like this who can tell me how to modify the preset to enable this task?
I will most likely need to do more advanced editing, like sub-clipping, stitching and adding custom audio tracks later on so it would be helpful to know where all that goes in the encoding preset(and what of this MES actually supports).