Streaming Gstreamer-从mpjeg到ogg的超高记录

Streaming Gstreamer-从mpjeg到ogg的超高记录,streaming,gstreamer,ogg,Streaming,Gstreamer,Ogg,我正在尝试使用gstreamer将mjpeg(ip摄像头)的输出记录到ogg文件 我试着做下面的事,但没有掷骰子 gst-launch-1.0 souphttpsrc location='http://192.168.2.124:8081/' is-live=true do-timestamp=true ! multipartdemux ! image/jpeg, width=1280, height=720, framerate=20/1 ! jpegdec ! theoraenc bitr

我正在尝试使用gstreamer将mjpeg(ip摄像头)的输出记录到ogg文件

我试着做下面的事,但没有掷骰子

gst-launch-1.0 souphttpsrc location='http://192.168.2.124:8081/' is-live=true do-timestamp=true ! multipartdemux ! image/jpeg, width=1280, height=720, framerate=20/1  ! jpegdec ! theoraenc bitrate=2200 ! oggmux ! filesink location=output.ogg
我的意思是,管道正常运行了一段时间,但突然收到了EOS信号

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:00:39.423928252
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
此外,录制的视频输出不太正常,似乎很慢:/ 奇怪的部分。。。这样行吗

gst-launch-1.0 souphttpsrc location='http://192.168.2.124:8081/' is-live=true do-timestamp=true ! multipartdemux ! image/jpeg, width=1280, height=720, framerate=20/1 ! jpegdec !  jpegenc ! avimux ! filesink location=output.avi
然后我做这个代码转换

gst-launch-1.0 -e filesrc location=output.avi ! avidemux ! jpegdec ! videoconvert ! theoraenc bitrate=2200 ! oggmux ! filesink location=output.ogg

我的意思是,我得到了期望的结果,但首先需要捕获到avi的流,然后进行到ogg的代码转换,检查您的CPU使用情况。听起来您的机器无法实时转码,导致您的实时转码跳过帧并最终中止。TheoreNC可能是单线程的。如果没有关于这个问题的更多信息(cpu使用情况和查看日志以查看谁发出EOS),很难说清楚,但这里有一个提示:您的管道上似乎没有队列。很可能所有的处理都发生在一个线程上,在解码器和编码器后分别添加一个队列,以使单独的线程处理解码、编码和muxing+保存到file.thx以获取答案,我确实是在启用日志的情况下运行的,并且得到了这个0:00:57.049833851 28531 0x1067cc0 INFO basesrc gstbasesrc.c:2743:gst_base_src_循环:gst_base_src_get_range()后暂停=eos不确定soupthttpsrc为什么得到eos btw cpu/mem使用情况看起来很好