尝试使用 encodebin 及其配置文件。此处的文档: https ://gstreamer.freedesktop.org/documentation/pbutils/encoding-profile.html?gi-language=c#defining-a-gstencodingprofile-as-a-string和那里:https://gstreamer。 freedesktop.org/data/doc/gstreamer/1.9/gst-plugins-base-libs/html/gst-plugins-base-libs-encoding-profile.html#GstEncodingProfile列出示例,但它们并没有真正解释我实际上是如何构造那些字符串。
它命名了通用muxer_source_caps:video_encoder_source_caps:audio_encoder_source_caps
格式,但我从哪里获得 muxer_source_caps。application/ogg:audio/x-vorbis
从示例中完全可以正常工作。
例如,我将如何着手找出在 mp4 容器中编码为 aac 所需的配置文件。
疯狂猜测使用来自https://github.com/GStreamer/gstreamer/blob/cc55b304ef4ab1cd95f6348d33f268ccebaab8e8/docs/random/mimetypes的 mime 类型也行不通。
仅在没有 muxer_source_cap 的情况下使用时,所有尝试都失败WARNING: erroneous pipeline: could not set property "profile" in element "enc"
或出现一些更长的错误audio/x-m4a
谢谢