我正在尝试混合.ogv视频文件
在gstreamer(v0.10)中使用.mp3文件获取带有视频和音频的.ogv文件。我尝试这个管道:

gst-launch-0.10 filesrc location="video.ogv" ! oggdemux ! queue ! oggmux name=mux ! filesink location="test.ogv" filesrc location="audio.mp3" ! audioconvert ! vorbisenc ! queue ! mux.

当我使用此命令行时,出现错误:
ERROR : of element /GstPipeline:pipeline0/GstAudioConvert:audioconvert0 : not negotiated
Additional debogging information :
gstbasetransform.c(2541): gst_base_transform_handle_buffer (): /GstPipeline:pipeline0/GstAudioConvert:audioconvert0:
not negotiated
ERROR : the pipeline refuse to pass in preparation phase

我看不出有什么问题。有什么建议吗?
谢谢。

最佳答案

您需要在filesrc和audioconvert之间添加一个MP3解码器,或者仅解码bin,例如

gst-launch-0.10 filesrc location="video.ogv" ! oggdemux ! queue ! oggmux name=mux ! filesink location="test.ogv"
    filesrc location="audio.mp3" ! decodebin ! audioconvert ! vorbisenc ! queue ! mux.

关于audio - 如何在gstreamer中混合音频和视频,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/26450805/

10-13 01:21