Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Programmatically-created jobs never finish #45

Closed
simonmckenzie opened this issue Mar 18, 2024 · 9 comments
Closed

Programmatically-created jobs never finish #45

simonmckenzie opened this issue Mar 18, 2024 · 9 comments

Comments

@simonmckenzie
Copy link

Hi,

I know this probably isn't an issue with this package, but I thought I may as well ask.

I am testing MKIO as a replacement for AMS, and am trying to encode some content. While the jobs do create correctly, they never complete (one has been in the "processing" state for three days):

screenshot of jobs stuck in "processing" state

My code is quite simple - it is trying to do a video encode (or an audio transcribe, neither one works) against files in existing assets (migrated from AMS using the commandline tool) - this is the essence of it:

var contentAwareEncodingPreset =
    new BuiltInStandardEncoderPreset(EncoderNamedPreset.H264MultipleBitrate1080pWithCVQ);

var outputs = new List<TransformOutput> {
    new TransformOutput {Preset = contentAwareEncodingPreset},
};

var properties = new TransformProperties{Description = "Video transform", Outputs = outputs};
var transform = await client.Transforms.CreateOrUpdateAsync("Video transform", properties);

// ...


await client.Jobs.CreateAsync(
    transform.Name,
    "Job name",
    new JobProperties
    {
        Input = new JobInputAsset(inputAssetName, filenames),
        Outputs = new List<JobOutputAsset> {new JobOutputAsset {AssetName = outputAssetName}}
    });           

Is there anything obvious I'm missing? I assume that there must be some problem in the platform too, if the jobs never complete or return errors.

@xpouyat
Copy link
Owner

xpouyat commented Mar 18, 2024

Hello,
I looked to the issue and it seems the problem comes from the job name that contains spaces. Try a job name without spaces. The MK/IO UI does not allow spaces...

@xpouyat
Copy link
Owner

xpouyat commented Mar 18, 2024

I added a check for no space in several entities name.
24c51d8

@ben-voytko-talogy
Copy link

ben-voytko-talogy commented Mar 18, 2024

@xpouyat - noted similar issues where jobs would hang when using job names that were too long. Worked fine after shortening the name as well.

Don't remember length restriction for jobs though. I believe it is < 64 characters for the job name, 63 characters max.

Had this issue with content key policy, container names, and streaming locators that wouldn't create properly as well, with different lengths.

@simonmckenzie
Copy link
Author

Thank you @xpouyat. I have re-created these jobs without spaces and they completed successfully.

I have another issue with the API, where enqueued "audio analysis" jobs (AudioAnalyzerPreset) never start, since transcription isn't actually available yet.

I recognise that this is not an issue with this library, so I would just like to check with you before I raise an issue - do you want an issue to be raised, or should I just raise it with MediaKind directly?

@xpouyat
Copy link
Owner

xpouyat commented Mar 20, 2024

@simonmckenzie I think the audio analysis has not been implemented yet in MK/io. It is in their roadmap for H1 2024 https://docs.io.mediakind.com/docs/feature-release-roadmap

@simonmckenzie
Copy link
Author

I agree, but this library and the API still allow you to create audio analysis jobs, they just do nothing. Should they?

@xpouyat
Copy link
Owner

xpouyat commented Mar 20, 2024

Actually, it is noted that only BuiItinStandardEncoderPreset is supported currently.
https://docs.io.mediakind.com/reference/put_apiamsproject_nametransformstransform_name
I imported all classes in the SDK that's why it is there. I can add a note in the description of the class that it is not supported.

@xpouyat
Copy link
Owner

xpouyat commented Mar 20, 2024

2024-03-20_17h15_54
Intellisense tells you by the way

@simonmckenzie
Copy link
Author

Just an FYI - I also contacted MediaKind support about the "spaces in names" problem, and they are going to update their API to reject these invalid requests. This will be released in the second week of May.

Thanks again for your quick fix for the library :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants