如何为媒体文件生成带有编解码器的内容类型字符串?

发布于 2024-08-15 01:56:05 字数 299 浏览 1 评论 0原文

是否有一个命令行工具可以嗅探视频/音频文件并以指定的格式为它们生成详细的内容类型字符串HTML5 规范 和 RFC4281 中?

我想使用此服务器端来避免在 HTML5 浏览器支持编码时对上传的 MP4 和 OGG 文件进行重新编码。视频托管网站选择重新编码所有内容,我认为这是错误的方法,因为这意味着上传时间长或质量低。

Is there a command-line tool that sniffs video/audio files and generates detailed content-type strings for them, in the format specified in the HTML5 spec and in RFC4281?

I want to use this serverside to avoid recoding of uploaded MP4 and OGG files whenever the encoding is supported by HTML5 browsers. Video hosting sites have opted to recode everything, which I think is the wrong approach because it means either long uploading times or low quality.

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

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

发布评论

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

评论(1

浪漫人生路 2024-08-22 01:56:05

我不相信有任何现成的应用程序可以做到这一点。但是,如果您在类似 Linux 的环境中运行,file 实用程序将通过内容嗅探来识别许多文件类型。

file 不会直接输出符合 RFC 的 MIME 类型,但将其输出转换为您感兴趣的任何 MIME 类型应该是一个非常简单的任务。

I don't believe there is any ready-made application that will do this. However, if you're running on a Linux-like environment, the file utility will identify many filetypes by content sniffing.

file won't spit out RFC-compliant MIME types directly, but converting its output to whatever MIME types you're interested in should be a pretty simple task.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文