相关连接:https://blog.csdn.net/knowledgebao/article/details/84621238
常见CAP整理:
audio裸流:
audio-mp3:
audio-AAC:
audio-alaw(g711a,pcma):
audio-mulaw(g711u,pcmu):
video裸流:
video-h264:
video-h265:
寻找方法:
- gstreamer帮助文档,详见参考资料1
- 参考iana官网,详见参考资料2
- 参考别人写好的,详见参考资料3
- 趴源码,详见参看资料4,下载源码寻找即可。
GST_STATIC_CAPS(
"audio/x-raw, "
"format = (string)S16LE, "
"rate=(int){ 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 }, "
"channels = (int){1,2};"
)
GST_STATIC_CAPS(
"audio/mpeg, "
"mpegversion = (int) 1, "
"layer = (int) [ 1, 3 ], "
"rate = (int) { 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 }, "
"channels = (int){1,2};"
)
GST_STATIC_CAPS(
"audio/mpeg, "
"mpegversion = (int) { 2, 4 }, "
"framed = (bool) false, "
"format = (string)S16LE, "
"rate = (int) { 8000, 11025, 22050, 44100, 48000, 96000 }, "
"channels = (int){1,2};"
)
GST_STATIC_CAPS(
"audio/x-alaw, "
"rate = (int) 8000, "
"channels = (int) 1;"
)
GST_STATIC_CAPS(
"audio/x-mulaw, "
"rate = (int) 8000, "
"channels = (int) 1;"
)
GST_STATIC_CAPS(
"video/x-raw, "
"format=(string){ Y444, Y42B, I420, YV12, NV12 }, "
"width = (int) [128,4096], "
"height = (int) [128,2160], "
"framerate = (fraction) [ 15, 60 ] ;"
)
GST_STATIC_CAPS(
"video/x-h264, "
"width = (int) [128,4096], "
"height = (int) [128,2160], "
"profile=(string){ high-4:4:4, high-4:2:2, high-10, high, main, baseline, constrained-baseline, high-4:4:4-intra, high-4:2:2-intra, high-10-intra }, "
"stream-format = byte-stream, "
"framerate = (fraction) [ 15, 60 ] ;"
)
GST_STATIC_CAPS(
"video/x-h265, "
"width = (int) [128,4096], "
"height = (int) [128,2160], "
"profile=(string){ high-4:4:4, high-4:2:2, high-10, high, main, baseline, constrained-baseline, high-4:4:4-intra, high-4:2:2-intra, high-10-intra }, "
"stream-format = byte-stream, "
"framerate = (fraction) [ 15, 60 ] ;"
)
参考资料:
1,https://gstreamer.freedesktop.org/documentation/plugin-development/advanced/media-types.html
2, https://www.iana.org/assignments/media-types/media-types.xhtml
3, https://gstreamer.freedesktop.org/documentation/plugins.html
4, gst-plugins-base-1.14.2\gst\typefind\gsttypefindfunctions.c
有任何疑问,请联系:[email protected]