I am having some issue while creating a job for AWS Elemental media convert.
I have followed the following sequence.
1.) Create a new job
2.) Add input and configurations
3.) Add File output group and configure destination settings
4.) Under Output change Container to No Container
5.) Under Output remove Audio
6.) Under Output -> Video change Codec to JPEG to Frame Capture
7.) Configure frame rate (rate which captures will be produced (more notes and examples below))
8.) Configure max capture settings
I got the following error:
Job_contains_the_following_error:
/outputGroups: Should not match the schema
Here is my job JSON:
{
"Settings": {
"AdAvailOffset": 0,
"Inputs": [
{
"FilterEnable": "AUTO",
"PsiControl": "USE_PSI",
"FilterStrength": 0,
"DeblockFilter": "DISABLED",
"DenoiseFilter": "DISABLED",
"TimecodeSource": "EMBEDDED",
"VideoSelector": {
"ColorSpace": "FOLLOW",
"Rotate": "DEGREE_0"
},
"AudioSelectors": {
"Audio Selector 1": {
"Offset": 0,
"DefaultSelection": "DEFAULT",
"ProgramSelection": 1
}
},
"FileInput": "s3://field-live-user-data/udariyan.mp4"
}
],
"OutputGroups": [
{
"Name": "File Group",
"OutputGroupSettings": {
"Type": "FILE_GROUP_SETTINGS",
"FileGroupSettings": {
"Destination": "s3://field-live-user-data/"
}
},
"Outputs": [
{
"VideoDescription": {
"ScalingBehavior": "DEFAULT",
"TimecodeInsertion": "DISABLED",
"AntiAlias": "ENABLED",
"Sharpness": 50,
"CodecSettings": {
"Codec": "FRAME_CAPTURE",
"FrameCaptureSettings": {
"FramerateNumerator": 30,
"FramerateDenominator": 100,
"MaxCaptures": 2,
"Quality": 80
}
},
"DropFrameTimecode": "ENABLED",
"ColorMetadata": "INSERT",
"Width": 1280,
"Height": 720
},
"ContainerSettings": {
"Container": "RAW"
},
"Extension": "jpg"
}
],
"CustomName": "customGroup"
}
]
},
"Queue": "arn:aws:mediaconvert:us-east-1:469030323850:queues/Default",
"Role": "arn:aws:iam::469030323850:role/myMediaConverter"
}
Currently, you can't have a job template with frame capture only:
AWS Dev forums on this topic
Related
I have the following code which I'm trying to read in CMake.
{
"demo": [
{
"name": "foo0",
"url": "url1",
"verify_ssl": true
},
{
"name": "foo1",
"url": "url1",
"verify_ssl": true
},
{
"name": "foo2",
"url": "url2",
"verify_ssl": true
}
]
}
I'm trying to access a member from the list above, for example demo[0].name without success, what I'm doing wrong?
file(READ "${CONAN_CACHE}/demo.json" MY_JSON_STRING)
string(JSON CUR_NAME GET ${MY_JSON_STRING} demo[0].name)
One at a time.
string(JSON CUR_NAME GET ${MY_JSON_STRING} demo 0 name)
EDIT: TLDR there is currently no way to know material names on the fragment level.
I want to read the materials from fragments of a node and change their materials according to a map that uses the Revit material names as keys.
I have the following "Materials and Finishes" properties from a node in the model (retrieved via Viewer3D):
And I have the following THREE materials from the fragments of that node:
Is there a way to set the names of the THREE materials to match the model data (or use them at all)?
Ideally I would be able to match these THREE materials with the following materials extracted from this node:
The SVF file format (generated by the Model Derivative service and loaded by Forge Viewer) does not preserve material names unfortunately. The fragments are simply associated with a specific material based on its index in the list.
The "Materials and Finishes" data is basically just a property specific to the original file (in this case a Revit model), and it may not be available in other file formats.
EDIT: I tried looking into the Materials.json.gz file, and unfortunately the names are not included there, either:
{
"name": "LMVTK Simple Materials",
"version": "1.0",
"scene": {
"SceneUnit": 8215,
"YIsUp": 0
},
"materials": {
"0": {
"version": 2,
"userassets": ["0"],
"materials": {
"0": {
"tag": "",
"proteinType": "",
"definition": "SimplePhong",
"properties": {
"integers": {
"mode": 4
},
"booleans": {
"color_by_object": false,
"generic_is_metal": false,
"generic_backface_cull": true
},
"scalars": {
"generic_transparency": {
"units": "",
"values": [0]
}
},
"colors": {
"generic_diffuse": {
"values": [{
"r": 0,
"g": 1,
"b": 0,
"a": 1
}]
}
}
},
"transparent": false,
"textures": {
}
}
}
},
"1": {
"version": 2,
"userassets": ["0"],
"materials": {
"0": {
"tag": "",
"proteinType": "",
"definition": "SimplePhong",
"properties": {
"integers": {
"mode": 4
},
"booleans": {
"color_by_object": false,
"generic_is_metal": false,
"generic_backface_cull": true
},
"scalars": {
"generic_transparency": {
"units": "",
"values": [0]
}
},
"colors": {
"generic_diffuse": {
"values": [{
"r": 0.400000,
"g": 0.400000,
"b": 0.400000,
"a": 1
}]
}
}
},
"transparent": false,
"textures": {
}
}
}
}
...
}
I have a MP4 video with SRT captions and I need to transcode them with media convert. In media convert I set automatic ABR and I specified the SRT origin path.
At the moment, I have tested the following:
I set SRT file in one output and video/audio in another
I set SRT, video and audio in the same output
For the first test, the job finish successfully, but on the S3 bucket there isnt any .SRT file. For the second test, the job fails with "aption destination type [SRT] requires a raw muxer." message
This is my JSON for the first test
{
"Queue": "arn:aws:mediaconvert:us-east-1:{{ACCOUNT-NUMBER}}:queues/Default",
"UserMetadata": {},
"Role": "arn:aws:iam::{{ACCOUNT-NUMBER}}:role/{{MY-ROLE-NAME}}",
"Settings": {
"TimecodeConfig": {
"Source": "ZEROBASED"
},
"OutputGroups": [
{
"Name": "DASH ISO",
"Outputs": [
{
"ContainerSettings": {
"Container": "MPD"
},
"VideoDescription": {
"ScalingBehavior": "DEFAULT",
"TimecodeInsertion": "DISABLED",
"AntiAlias": "ENABLED",
"Sharpness": 50,
"CodecSettings": {
"Codec": "H_264",
"H264Settings": {
"InterlaceMode": "PROGRESSIVE",
"ScanTypeConversionMode": "INTERLACED",
"NumberReferenceFrames": 3,
"Syntax": "DEFAULT",
"Softness": 0,
"GopClosedCadence": 1,
"GopSize": 90,
"Slices": 1,
"GopBReference": "DISABLED",
"SlowPal": "DISABLED",
"EntropyEncoding": "CABAC",
"FramerateControl": "INITIALIZE_FROM_SOURCE",
"RateControlMode": "QVBR",
"CodecProfile": "MAIN",
"Telecine": "NONE",
"MinIInterval": 0,
"AdaptiveQuantization": "AUTO",
"CodecLevel": "AUTO",
"FieldEncoding": "PAFF",
"SceneChangeDetect": "ENABLED",
"QualityTuningLevel": "MULTI_PASS_HQ",
"FramerateConversionAlgorithm": "DUPLICATE_DROP",
"UnregisteredSeiTimecode": "DISABLED",
"GopSizeUnits": "FRAMES",
"ParControl": "INITIALIZE_FROM_SOURCE",
"NumberBFramesBetweenReferenceFrames": 2,
"RepeatPps": "DISABLED",
"DynamicSubGop": "STATIC"
}
},
"AfdSignaling": "NONE",
"DropFrameTimecode": "ENABLED",
"RespondToAfd": "NONE",
"ColorMetadata": "INSERT"
},
"AudioDescriptions": [
{
"AudioTypeControl": "FOLLOW_INPUT",
"AudioSourceName": "Audio Selector 1",
"CodecSettings": {
"Codec": "AAC",
"AacSettings": {
"AudioDescriptionBroadcasterMix": "NORMAL",
"Bitrate": 96000,
"RateControlMode": "CBR",
"CodecProfile": "LC",
"CodingMode": "CODING_MODE_2_0",
"RawFormat": "NONE",
"SampleRate": 48000,
"Specification": "MPEG4"
}
},
"StreamName": "latino",
"LanguageCodeControl": "FOLLOW_INPUT",
"LanguageCode": "SPA"
}
]
},
{
"ContainerSettings": {
"Container": "MPD"
},
"CaptionDescriptions": [
{
"CaptionSelectorName": "Captions Selector 1",
"DestinationSettings": {
"DestinationType": "SRT"
},
"LanguageCode": "SPA",
"LanguageDescription": "latino"
}
]
}
],
"OutputGroupSettings": {
"Type": "DASH_ISO_GROUP_SETTINGS",
"DashIsoGroupSettings": {
"SegmentLength": 30,
"MinFinalSegmentLength": 0,
"Destination": "s3://{{BUCKET-NAME}}/streaming15/dash-iso/",
"FragmentLength": 2,
"SegmentControl": "SINGLE_FILE",
"MpdProfile": "ON_DEMAND_PROFILE",
"HbbtvCompliance": "NONE"
}
},
"AutomatedEncodingSettings": {
"AbrSettings": {
"MaxAbrBitrate": 8000000,
"MinAbrBitrate": 600000
}
}
}
],
"AdAvailOffset": 0,
"Inputs": [
{
"AudioSelectors": {
"Audio Selector 1": {
"Offset": 0,
"DefaultSelection": "DEFAULT",
"ProgramSelection": 1
}
},
"VideoSelector": {
"ColorSpace": "FOLLOW",
"Rotate": "DEGREE_0",
"AlphaBehavior": "DISCARD"
},
"FilterEnable": "AUTO",
"PsiControl": "USE_PSI",
"FilterStrength": 0,
"DeblockFilter": "DISABLED",
"DenoiseFilter": "DISABLED",
"InputScanType": "AUTO",
"TimecodeSource": "ZEROBASED",
"CaptionSelectors": {
"Captions Selector 1": {
"SourceSettings": {
"SourceType": "SRT",
"FileSourceSettings": {
"SourceFile": "s3://{{BUCKET-NAME}}/PROMO_CAP_01.srt"
}
}
}
},
"FileInput": "s3://{{BUCKET-NAME}}/PROMO_CAP_01.mp4"
}
]
},
"AccelerationSettings": {
"Mode": "DISABLED"
},
"StatusUpdateInterval": "SECONDS_60",
"Priority": 0
}
What I am missing?
According to the AWS Elemental MediaConvert user guide, SRT is not a supported output for a DASH-ISO output group when the input caption type is SRT.
Here's a link to that guide (reference page 176):
https://docs.aws.amazon.com/mediaconvert/latest/ug/mediaconvert-guide.pdf
The supported caption outputs for SRT input in DASH-ISO are:
Burn in
IMSC (as sidecar .fmp4)
IMSC (as sidecar .xml)
TTML (as sidecar .fmp4)
TTML (as sidecar .ttml)
Additionally, there is a gap in the documentation. SRT->DASH-ISO+WebVTT is supported, even though it is not listed. The documentation will be corrected, but I wanted to share that with you in case it helps.
If you must send SRT to the output destination, then you could create a separate output group where the caption is in a track with no container (see pages 192-196 in the document).
Looking for a way to extract data from nested json.
The data was extracted from windows scheduler as xml and converted to json.
It represents OS scheduled tasks, there are about 100 tasks and my goal is to extract the information from json to an external DB.
This is what my json file looks like :
{
"Tasks": {
"Task": [
{
"RegistrationInfo": {
"Author": "Adobe Systems Incorporated",
"Description": "This task keeps your Adobe Reader and Acrobat applications up to date with the latest enhancements and security fixes",
"URI": "\\Adobe Acrobat Update Task"
},
"Principals": {
"Principal": {
"GroupId": "S-1-5-4",
"_id": "Author"
}
},
"Settings": {
"DisallowStartIfOnBatteries": "true",
"StopIfGoingOnBatteries": "true",
"MultipleInstancesPolicy": "IgnoreNew",
"StartWhenAvailable": "true",
"IdleSettings": {
"Duration": "PT10M",
"WaitTimeout": "PT1H",
"StopOnIdleEnd": "true",
"RestartOnIdle": "false"
}
},
"Triggers": {
"LogonTrigger": {
"StartBoundary": "2013-08-01T12:05:00",
"EndBoundary": "2027-05-02T08:00:00",
"Delay": "PT12M",
"Repetition": {
"Interval": "PT3H30M"
},
"_id": "TriggerUserLoggon"
},
"CalendarTrigger": {
"StartBoundary": "2013-01-01T09:00:00",
"EndBoundary": "2027-05-02T12:05:00",
"ScheduleByDay": {
"DaysInterval": "1"
},
"_id": "TriggerDaily"
}
},
"Actions": {
"Exec": {
"Command": "C:\\Program Files (x86)\\Common Files\\Adobe\\ARM\\1.0\\AdobeARM.exe"
},
"_Context": "Author"
},
"_xmlns": "http://schemas.microsoft.com/windows/2004/02/mit/task",
"_version": "1.2"
},
{
"RegistrationInfo": {
"Author": "Adobe",
"Description": "This task keeps your Adobe Flash NPAPI Player installation up to date with the latest enhancements and security fixes. If this task is disabled or removed, Adobe Flash Player will be unable to automatically secure your machine with the latest security fixes.",
"URI": "\\Adobe Flash Player NPAPI Notifier"
},
"Principals": {
"Principal": {
"UserId": "S-1-5-21-2755204513-1269241785-1912306605-1001",
"LogonType": "InteractiveToken",
"_id": "Author"
}
},
"Settings": {
"DisallowStartIfOnBatteries": "false",
"StopIfGoingOnBatteries": "true",
"MultipleInstancesPolicy": "IgnoreNew",
"StartWhenAvailable": "true",
"RunOnlyIfNetworkAvailable": "true",
"IdleSettings": {
"Duration": "PT10M",
"WaitTimeout": "PT1H",
"StopOnIdleEnd": "true",
"RestartOnIdle": "false"
}
},
"Triggers": {
"CalendarTrigger": {
"StartBoundary": "1999-12-31T16:14:00-08:00",
"Repetition": {
"Interval": "PT1H",
"Duration": "P1D"
},
"ScheduleByDay": {
"DaysInterval": "7"
},
"_id": "NotificationTrigger"
}
},
"Actions": {
"Exec": {
"Command": "C:\\Windows\\SysWOW64\\Macromed\\Flash\\FlashUtil32_32_0_0_330_Plugin.exe",
"Arguments": "-check plugin"
},
"_Context": "Author"
},
"_xmlns": "http://schemas.microsoft.com/windows/2004/02/mit/task",
"_version": "1.2"
}
The code below works for just one task, but i need to get the data from every task , i guess i need to find a way to insert the number of tasks to the value of index and loop them one by one ,but nothing i try works.
import json
index=1
with open('name.json', 'r') as f:
array = json.load(f)
ts=(array['Tasks'])
print('Author is',ts['Task'][index]['RegistrationInfo']['Author'])
print('Description is' ,ts['Task'][index]['RegistrationInfo']['Description'])
print('URI is',ts['Task'][index]['RegistrationInfo']['URI'])
print('user ID is', ts['Task'][index]['Principals']['Principal']['UserId'])
print('Logon Type is', ts['Task'][index]['Principals']['Principal']['LogonType'])
print(' ID is', ts['Task'][index]['Principals']['Principal']['_id'])
print(' DisallowStartIfOnBatteries is ', ts['Task'][index]['Settings']['DisallowStartIfOnBatteries'])
print(' StopIfGoingOnBatteries is ', ts['Task'][index]['Settings']['StopIfGoingOnBatteries'])
print(' MultipleInstancesPolicy is ', ts['Task'][index]['Settings']['MultipleInstancesPolicy'])
print(' StartWhenAvailable is ', ts['Task'][index]['Settings']['StartWhenAvailable'])
print(' RunOnlyIfNetworkAvailable is ', ts['Task'][index]['Settings']['RunOnlyIfNetworkAvailable'])
I am using lintr in Sublime 3 via SublimeLinter 3 and the SublimeLinter-contrib-lintr plugin. On the lintr README.md file there is a short mention on how to configure what linters should be used:
{
"user": {
"linters": {
"r": {
"linters": "with_defaults(line_length_linter(120))"
}
}
}
}
However, I am using it in conjunction with SublimeLinter-contrib-lintr and I can't get it to work. My SublimeLinter.sublime-settings file looks like this:
{
"user": {
"debug": true,
"delay": 0.25,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
"gutter_theme_excludes": [],
"lint_mode": "background",
"linters": {
"lintr": {
"#disable": false,
"args": [],
"cache": "TRUE",
"excludes": [],
"linters": "default_linters"
}
},
"mark_style": "outline",
"no_column_highlights_line": false,
"passive_warnings": false,
"paths": {
"linux": [],
"osx": [],
"windows": [
"C:/Program Files/R/R-3.3.3/bin/x64"
]
},
"python_paths": {
"linux": [],
"osx": [],
"windows": []
},
"rc_search_limit": 3,
"shell_timeout": 10,
"show_errors_on_save": false,
"show_marks_in_minimap": true,
"syntax_map": {
"r extended": "r"
},
"warning_color": "DDB700",
"wrap_find": true
}
}
The lintr package has a bunch of linters (see this link). What I would live to achieve is to discard some of them (i.e., not use, for instance, assignment_linter). Do you have any idea how to achieve this? It should be possible, right?
Edit 1:
I noticed that by changing "linters": "default_linters" to "linters": "assignment_linter", only the errors falling under assignment_linter will be picked. I tried to expand it using an array, but it doesn't work:
...
"lintr": {
"#disable": false,
"args": [],
"cache": "TRUE",
"excludes": [],
"linters": [
"assignment_linter",
"object_name_linter"
]
}
...
Inside the Sublime 3 console, the message error message with this attempt is: Error: unexpected '[' in "lint(cache = TRUE, commandArgs(TRUE), [".
Edit 2: possible solution
Looking at with_defaults inside the lintr package I found two ways of choosing only the linters I am interested in. Assuming that I only want assignment_linter and no_tab_linter, the configuration is:
"linters": "default_linters[c('assignment_linter', 'no_tab_linter')]" or
"linters": "with_defaults(assignment_linter, no_tab_linter, default = NULL)"
It works, but are there other less error-prone approaches? With this approach if I want to discard just one linter I have to list all the others.
Regarding your question for "Edit 2", you can discard a single linter as follows:
{
"user": {
"linters": {
"r": {
"linters": "with_defaults(some_default_linter = NULL)"
}
}
}
}
... where some_default_linter is the name of a linter from the list lintr::default_linters.