muxinc / strapi-plugin-mux-video-uploader

A Strapi plugin for managing uploads to Mux.
https://mux.com
23 stars 16 forks source link

Feature Request: Enable/Disable Auto-Generated Captions #72

Open sracela opened 7 months ago

sracela commented 7 months ago

Feature Request

Description: Are there any plans to make it possible to enable/disable the new Mux auto-generated captions feature?

Mux Auto-Generated Captions Feature Documentation

I was thinking on something like the screenshot below maybe.

Screenshot:

Screenshot 2023-11-14 at 5 38 00 PM

Maybe a even better option would be a "Enable Auto-generated captions" checkbox field in the Settings page, so it gets enabled or disabled for all videos.

Taking a look at the code adding the generated_subtitles object here may do the trick:

//server/services/mux.js

return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0: return [4 /*yield*/, getMuxClient()];
                        case 1:
                            Video = (_a.sent()).Video;
                            return [2 /*return*/, Video.Uploads.create({
                                cors_origin: corsOrigin,
                                new_asset_settings: {
                                    playback_policy: ['public'],
                                    input: [
                                        {
                                            "generated_subtitles": [
                                                {
                                                    "language_code": "en",
                                                    "name": "English CC"
                                                }
                                            ]
                                        }
                                    ]
                                },
                            })];
                    }
                });
dylanjha commented 7 months ago

Thank you @sracela ! This is definitely on the road map after recently releasing this feature. In the form we would probably also have to expose a way for the user to enter a language_code and name for the generated subtitles track.

I was thinking we'd probably want this configuration to exist both globally at the plugin level, but then also the ability to override it for an individual video. Thoughts?

kelihansen commented 7 months ago

Yes, please - we'd love this, too!

sracela commented 7 months ago

Thanks for repplying @dylanjha ! Yes, but I would not rush on exposing a way for the user to enter a language_code and name, because as mux team points out on their documentation:

Note that language_code must be en currently; other languages aren't currently supported.

And regarding this:

I was thinking we'd probably want this configuration to exist both globally at the plugin level, but then also the ability to override it for an individual video. Thoughts?

Sounds perfect, both solutions would work for my team actually! Even a more advanced solution would be to choose between not adding captions, adding them manually or let mux auto-generate them.

Also, I would like to express my interest in working on this feature. Could I receive some guidance on how to proceed? I'm willing to create a PR and discuss the implementation details. If there's any specification I should follow, I'd be happy to adhere to it.

Looking forward to the opportunity to contribute to the project since this plugin has been really helpful for my team.

arsedler9 commented 6 months ago

Also very interested in this! Has any progress been made?