Cloudinary .MKV格式视频链接在Safari中没有播放

发布于 2025-01-29 05:41:02 字数 352 浏览 2 评论 0 原文

嗨,我试图从Cloudinary网站上播放以下视频,它在除Safari以外的所有浏览器中播放 我尝试了f_auto,q_50和许多其他组合 我什至尝试将其转换为MP4 我还注意到,大多数50MB以上的文件都在做同样的事情,

请帮助!!!

值得一提的是,我是免费版本的。

视频链接:

Hi I am trying to stream the following video on my website from cloudinary, it is playing in all browsers except safari
I have attempted f_auto, q_50, and many other combinations
I have even tried to convert it to mp4
I also noticed that most files above 50MB are doing the same thing

Please help !!!

It is to mention that I am in cloudinary free version.

video link:
https://res.cloudinary.com/impromek-com/video/upload/v1652337443/ucfj0kmirnsmgffrhzyd.mkv

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

卸妝后依然美 2025-02-05 05:41:02

Safari不支持MKV的本地,因此您必须通过使用转换在播放之前转换视频。

在视频中,您总体上提供了错误的结果,以帮助调试云URL,响应包括X-CLD-ERROR标题,并查看您分享的URL,我看到标头返回了:

Video is too large to process synchronously, please use an eager transformation with eager_async=true to resolve

有一个在线(同步)视频转换限制(免费计划的40MB,付费为100 MB),这意味着,对于大于急切地执行视频转换

可以在上传时设置急切的转换或使用显式API

请看一下,看看这是否可以解决问题,如果您还有其他问题或需要任何指导,请告诉我。

这是我使用的示例代码,

const upload = v2.uploader.explicit(
            public_id,
            {
                type: 'upload',
                resource_type: 'video',
                eager_async: true,
                eager: [
                    {
                        fetch_format: 'mp4',
                    },
                ],
                eager_notification_url: your_notification_url,
            },
            (error, result) => {
                if (error) return reject(error);
                resolve(result);                 
            },
        );

Safari doesn't support MKV's natively so you'd have to convert your video before playback by using a transformation.

Doing that with the video you've provided results in an error In general, to help debug Cloudinary URLs, the response includes an x-cld-error header, and looking at the URL you've shared, I see the header comes back with:

Video is too large to process synchronously, please use an eager transformation with eager_async=true to resolve

There is an online (synchronous) video transformation limit(40MB for free plans and 100 MB for paid ones), which means that for videos larger than the limit you'll need to perform the video transformations eagerly.

Eager transformations can be set upon upload or by updating your current resources using the explicit API.

Please take a look and see if that resolves the issue for you, and if you have any additional questions or need any guidance, just let me know.

Here is a sample code that I used,

const upload = v2.uploader.explicit(
            public_id,
            {
                type: 'upload',
                resource_type: 'video',
                eager_async: true,
                eager: [
                    {
                        fetch_format: 'mp4',
                    },
                ],
                eager_notification_url: your_notification_url,
            },
            (error, result) => {
                if (error) return reject(error);
                resolve(result);                 
            },
        );
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文