Gstreamer-无法从mpjeg到ogg记录

时间:2018-07-15 13:34:42

标签: streaming gstreamer ogg

我正在尝试使用gstreamer将mjpeg(网络摄像机)的输出记录到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

0 个答案:

没有答案