1

我正在尝试在 gstreamer (v0.10) 中将仅 .ogv 的视频文件与 .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

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

4

1 回答 1

3

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

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.
于 2014-10-19T13:45:39.690 回答