File attachment transcoding status

Hi,

I’m setting up my own transcoding server (concurrent with the default SG one) to get better quality from SG web player, but haven’t found any in-depth docs about checking the status of media files being transcoded.

I’m currently downloading original uploaded media, transcoding it myself with ffmpeg and then uploading it to ‘sg_uploaded_movie_mp4’ field (webm doesn’t seem to be used in any os or browser my project partners use). Problem I’m facing is that I need to check what the status of default upload/transcode process is, because it seems that version is created and ‘sg_uploaded_movie’ field is filled even when file itself is not available yet, thus my process downloads a 0 KB sized file.

How can I check the status of media upload and/or transcoding? In api docs it says there is a data field ‘processing_status’ but what the values are for video clips and how they are changed is not discussed.

3 Likes

Hey Hendrik!
There’s a hidden field on the version called sg_uploaded_movie_transcoding_status that you can query via the API like any regular field.
Statuses:
0 == in progress
1 == success
2 == failure

If you want to see that field (as well as the other transcoding-related fields) in the UI, enter this into the browser console:

SG.schema.entity_fields.Version.sg_uploaded_movie_transcoding_status.grid_column = true;
SG.schema.entity_fields.Version.sg_uploaded_movie_mp4.grid_column = true;
SG.schema.entity_fields.Version.sg_uploaded_movie_webm.grid_column = true;
SG.schema.entity_fields.Version.sg_uploaded_movie_image.grid_column = true;

Hope that helps, but let me know if you need anything further.
Cheers,

Mason.

4 Likes

Dude, I didn’t realize there was a full-blown api for the website available in the browser… that’s awesome.
Is this documented anywhere?
The greasemonkey possibilities must be huge.

1 Like

Ha! Sorry to disappoint @mmoshev but it’s not a full-blown API in the browser - far from it. It’s just those fields that we can show. Sorry about that :slight_smile:

1 Like

No, what I mean is the ability to interact with the page, inspecting an entity’s schema, among other things.
I had never thought about it, but some nice “local” customizations become viable.
For instance, did the producer forget to enter a required field on the project? Just pop a dialog that reminds them each time they open the project. etc.
Is there any guide I can find on the webpage api?

Anyway, I derailed the conversation, sorry about that :slight_smile:

1 Like

No worries. Just to be clear - all these commands do is make those fields visible for the users session. There’s no way to interact with the contained data, and as such, no API.

1 Like

Yeah yeah, I get that, my point is just customizing the interface for users. It seems at least some of the data is available in structures (i.e. not rendered into the interface).
It’s still an API of sorts.
Edit: I’ve been a web guy most of my life, so now I see how that might come as incoherent, but looking at it from a pipeline perspective I see another api to be (ab)used :slight_smile:

2 Likes

Hi Mason,

Thank you, this is exactly what I need!

Showing hidden fields in browser is very interesting, are there any docs that outline what all the internal technical fields are that can be made visible?

1 Like

@Hendrik_Proosa
Did you read my mind or something?

I was literally going to post exactly this question just now… :open_mouth:

1 Like