DIY Transcoding - how to disable automatic transcoding

In the DIY transcoding guide, it tells you to send a ticket to disable automatic transcoding if you intend to do it yourself.
What about if you have an on-prem shotgun server? Do I just take the transcode workers offline?

How does this work with uploads, then? What does calling sg.upload effectively do if the SG transcoder is disabled?

Thanks!

1 Like

Hi @StarkRavenSimone,

If you have an on-prem Shotgun install you should still write in so we can switch things off for you. You should then also take the transcoder workers offline as they’d just be consuming resources for nothing and would never be called upon.

As for uploads… Uploads and uploading is a very generic process and will continue to work as it usually does even with DIY transcoding. Uploads to the sg_uploaded_movie field on the Version entity is the magic bit which triggers transcoding. If you opt for DIY transcoding, uploading to that field would work but would just not trigger the transcoding process. You’d have to upload your own media to the sg_uploaded_movie_mp4 and sg_uploaded_movie_webm fields as well as populating sg_uploaded_movie_frame_rate.

I sure hope this helps answer your questions.

3 Likes

There’s no way to do this on a case by case basis?
I can think of particular situations where I’d want my own transcode to override Shotgun’s. Particularly if the thumbnail link is to be viewed in screening room. If I click on the thumbnail of a version I’ve transcoded, the screening room movie resolution is pretty terrible.
Updating sg_uploaded_movie_mp4 doesn’t change what that link points to.
Is there a way to update what movie the link will launch in screening room?

Screening room and the overlay player always play back clips that exist in the sg_uploaded_movie_mp4 or sg_uploaded_movie_webm fields. If you don’t supply these as part of the DIY process (along with other fields like sg_uploaded_movie_frame_rate and image) but upload to sg_uploaded_movie with the transcoder turned on, Shotgun will generate the required movies for playback as well as the thumbnail and filmstrip.

Here are the specifications we use for transcoding if you’d like to base your DIY off of them or customize the commands run by our transcoder:

https://help.autodesk.com/view/SGSUB/ENU/?guid=SG_Enterprise_do_transcoding_do_magick_html

You could technically do a hybrid approach where you keep the transcoder turned on and do your own uploads to the API to sg_uploaded_movie_mp4 and sg_uploaded_movie_webm fields for some versions and upload to sg_uploaded_movie for other versions. Just know that if you upload to sg_uploaded_movie while you already have data in sg_uploaded_movie_mp4 or sg_uploaded_movie_webm, the transcoder will overwrite that data.

I hope this helps you move forward.

2 Likes

That works, thanks!

How would I go about creating a filmstrip for a thumbnail the way it would be created if I simply uploaded to “sg_uploaded_movie”?

1 Like

Hi!

You can generate the filmstrip with whatever tools you wish. Basically, our only requirement is that you wind up with a horizontal strip of any number of frames each of which is exactly 240 pixels wide.

https://developer.shotgunsoftware.com/python-api/reference.html#shotgun_api3.shotgun.Shotgun.upload_filmstrip_thumbnail

In the Shotgun transcoder we calculate the duration and fps of your movie, infer the number of frames we should put in the filmstrip (max of 25 frames) and then extract the frames with ffmpeg and assemble them into the strip with montage.

You could probably use other tools like nuke or rvio on the command line to do similar operations.

1 Like

Here’s another documentation reference some colleagues pointed out to me which might help you:
https://help.autodesk.com/view/SGSUB/ENU/?guid=SG_Administrator_ar_data_management_ar_diy_transcoding_html

I’m not sure the instructions in the API are terribly clear.
As a test I assembled a strip of images exactly 240px wide each in photoshop. It works but it does not look correct. To keep the aspect ratio it ends up a very small thumbnail and the still unscrubbed image is just the entire strip itself.
If I don’t maintain aspect ratio but still make sure the overall width is a multiple of 240 it just ends up squishing each image as I scrub the thumbnail.
Lets say I have 5 images x 240px which ends up 1200px width overall. To maintain aspect ratio the height is 200px. Doing this does not create a scrubbable thumbnail that fits the whole thumbnail frame in Shotgun. At best it’s maybe 20% of the overall thumbnail frame.
If I resize but maintain the multiple of 240px and keep the aspect ratio, that small thumbnail now becomes a tiny sliver when scrubbed.
in either case, the image when not scrubbed is the whole filmstrip rectangle (1200px by 200px)
Please advise…

1 Like

Wait… do I read correctly that we can circumvent the automatic transcoding without having to have the transcoder completely turned off? :open_mouth:

1 Like

Hi Ricardo,

If you don’t upload to sg_uploaded_movie on the Version entity, indeed, the transcoder won’t kick in. You’ll be on the hook to supply any media.

2 Likes

Wow,
can this be added to the docs more clearly?

Because I have been kind of in a pickle about this where I don’t want to turn of the automatic trancodes for the whole site.
Just for certain projects/publishes where we want a bit more resolution/quality.

Do we have to supply both h264 and webm?

1 Like

For those cases, Ricardo, just make sure you never upload anything to sg_uploaded_movie and you should be able to manage image, filmstrip_image, sg_uploaded_movie_mp4 and sg_uploaded_movie_webm manually.

You don’t have to supply both the mp4 and the webm it all depends which browser you use in your facility. We’ll load the appropriate one depending on the environment.

For Chrome (on Mac anyway) we load mp4. I checked in the network tab of the Chrome debugger to see which file it would load. You can do the same in your environment to make sure.

1 Like

Hey Patrick,

Where does Shotgun store the filmstrip thumbnails? I’d like to see an example of one as it was transcoded. Might help me understand how to re-create it.

1 Like

One more question:

Will the “download source file” button still work?
It will then download the mp4 file?

1 Like

Hi Ricardo,

I just tested this and as I suspected you would not have a download button in the Client Review Site because there is no originally uploaded movie (which would live in the sg_uploaded_movie field). Only transcoded movies would exist as supplied in the sg_uploaded_movie_mp4 and/or sg_uploaded_movie_webm.

2 Likes

You made my day!
This is just great to know :slight_smile:

3 Likes

Hi,
I would be interested in the transcode parameters that other people are using.
We switched from the default 720p / 2 Mbit (ouch!) to 1080p with a default constant rate factor of 24.
The resulting quality is pretty close to awesome, even though the responsiveness when switching single frames is reduced a lot. That’s why we do the HQ transcodes only for certain pipeline steps.

Here are our video params used so far (audio unchanged). Was struggling a bit with the webm settings though:

mp4
-vcodec libx264 -pix_fmt yuv420p -crf 24 -tune zerolatency
webm
-pix_fmt yuv420p -vcodec libvpx -crf 8 -b:v 8M

I tried some other settigs with mp4 bitrates of 8Mbit/s, but this suffered only quality wise and did not improve the frame skip perfomance.

Would love to hear about your experiences.
Best,
Tobi

1 Like

Hi, I’m debating whether or not turning off auto transcoding is a good option for us as well. Let’s say I:

  • keep auto transcode on
  • upload my_mp4 and my_webm to sg_uploaded_movie_mp4 and sg_uploaded_movie_webm
  • do not upload anything to sg_upload_movie

Will this:

  • keep my_mp4 and my_webm in the sg_uploaded_movie_mp4 and sg_uploaded_movie_webm fields
  • automatically transcode and./or populate the following fields:
    • sg_uploaded_movie_frame_rate
    • image
    • thumbnail
    • filmstrip
      ?

Also, can you please provide authorization for me to view: Help

3 Likes

Hi @Nik,

If you do not upload anything to sg_uploaded_movie, then the transcoder won’t get triggered at all for that particular version.

This means that:

  • Anything you populate the sg_uploaded_movie_mp4 and sg_uploaded_movie_webm fields with will stay as is.
  • The sg_uploaded_movie_frame_rate, image, thumbnail, and filmstrip fields will not get automatically populated. You’ll need to handle filling those out yourself, as the transcoding process would usually do that, but would not have run in this use case.
4 Likes

Hey,
just saw that banner that announces the shift for default transcodes from 720p to 1080p.
I am wondering if this would render our internal DIY transcoding unneccessary? This is of course dependent on all paramters that you use for ffmpeg.
Can you give us some insight what these new default settings are?
Best,
Tobi

1 Like