转码流的MIME类型 [英] MIME type for transcoded stream
本文介绍了转码流的MIME类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想确定管道内容的MIME类型。管道正在输出代码转换的视频流,因此没有相应的文件扩展名。
I wish to determine the MIME type of the contents of a pipe. The pipe is outputting a transcoded video stream, so there is no corresponding file extension.
我可以在这些情况下使用 ffprobe来确定MIME类型-i pipe:0
还是一些等价物?是否有编解码器或容器格式的规范映射到MIME类型?
Can I determine the MIME type in these circumstances using say ffprobe -i pipe:0
or some equivalent? Is there a canonical mapping of codecs or container formats to MIME type?
推荐答案
可以使用DetectContentType猜测内容类型基于魔术数字:
http://golang.org/pkg/net/http/ #DetectContentType
You can use DetectContentType to guess the content type based on the magic numbers: http://golang.org/pkg/net/http/#DetectContentType
这篇关于转码流的MIME类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文