问题描述
我有直播流源,并且我要开始记录从任意时间的流。我的设置是这样的:
videotestsrc ! tee name=rawVideoSplitter ! queue ! ximagesink
和我通过编码器箱链接到“三通”开始记录:
recorderBranch = gst_parse_bin_from_description("queue name=recorderQueue flush-on-eos=1 leaky=1 ! "
"timeoverlay shading-value=255 shaded-background=true font-desc=\"Sans,10\" time-mode=0 ! "
"videorate ! video/x-raw,framerate=30/1 ! videoconvert ! "
"x264enc tune=zerolatency ! mp4mux ! filesink name=fileSink location=test.mp4",true,&error);
if (error) {
recorderBranch = NULL;
return;
}
gst_bin_add(GST_BIN(pipeline),recorderBranch);
gst_element_link(rawVideoSplitter,recorderBranch);
gst_element_set_state(GST_ELEMENT(recorderBranch),GST_STATE_PLAYING);
一切正常,除了记录文件长度较长的实际记录时间。在该文件中的第一帧具有 “的编码器开始时间 - 的管道开始时间” 的长度。例如,如果我在开始第二10至20秒来记录,在重放我得到固定10秒,然后开始文件的第一帧到正常回放。
我该如何解决这个问题?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)