【问题标题】:how to mux audio and video in gstreamer如何在 gstreamer 中混合音频和视频
【发布时间】:2014-10-19 13:02:40
【问题描述】:

我正在尝试对仅 .ogv 的视频文件进行多路复用 使用 .mp3 文件在 gstreamer (v0.10) 中获取包含视频和音频的 .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

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

【问题讨论】:

    标签: audio video gstreamer mux


    【解决方案1】:

    你需要在 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.
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-02-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多