gstreamer通过网络传输mp4-无法确定流的类型

gstreamer通过网络传输mp4-无法确定流的类型,gstreamer,Gstreamer,我真的没有主意了。我的问题是:我需要通过网络按需传输mp4(H264)。我是gstreamer的新手,在对版本>1.0进行了多次尝试后,我决定使用0.10,因为它似乎是迄今为止最有前途的 下面的命令工作得很完美(我看到我的电影窗口) 现在,我正在尝试使用命令构建TCP流(目前仅在localhost上): 但“客户端”命令的响应如下: Setting pipeline to PAUSED ... Pipeline is PREROLLING ... ERROR: from element /Gst

我真的没有主意了。我的问题是:我需要通过网络按需传输mp4(H264)。我是gstreamer的新手,在对版本>1.0进行了多次尝试后,我决定使用0.10,因为它似乎是迄今为止最有前途的

下面的命令工作得很完美(我看到我的电影窗口)

现在,我正在尝试使用命令构建TCP流(目前仅在localhost上):

但“客户端”命令的响应如下:

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstDecodeBin2:dec/GstTypeFindElement:typefind: Could not determine type of stream.
Additional debug info:
gsttypefindelement.c(813): gst_type_find_element_chain_do_typefinding (): /GstPipeline:pipeline0/GstDecodeBin2:dec/GstTypeFindElement:typefind
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
遗漏了什么,或者我做错了什么

我正在测试:VirtualBox 4.3.12和Ubuntu 14.04,内核3.13.0-24-generic#47 Ubuntu SMP 5月2日星期五23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

此处附加了完整错误(GST\U调试\U否\U颜色=1 GST\U调试=*:3):

首先,使用0.10绝对不是一个好主意,你应该坚持使用1.0,因为你会得到社区的支持

其次,对于您的问题本身,您正在尝试通过网络对解码的流进行流传输(“decodebin2!tcpserversink”),并在另一端对其进行再次解码(“tcpclientsrc!decodebin2”)。这不仅在带宽使用方面是非常错误的,而且直接使用也不起作用


我建议您查看一下gstreamer提供的rtp插件。

使用gstreamer 1.0服务器端可以与以下用户共享h264流:

gst-launch-1.0 filesrc location="C:\\Videos\\videotestsrc.avi" ! decodebin ! x264enc ! mpegtsmux ! queue ! tcpserversink host=127.0.0.1 port=8080
当客户端接收到以下信息时:

gst-launch-1.0 tcpclientsrc host=127.0.0.1 port=8080 ! decodebin ! videoconvert ! autovideosink sync=false
或者,可以通过以下方式使用VLC模拟客户机:


媒体>>开放网络流>>tcp://127.0.0.1:8080 >>播放

根据您的建议,我切换到1.0(具体为1.4.3)。我做了家庭作业,并将工作管道中的元素转换为新的元素(如ffdec_h264到avdec_h264等)。现在我可以在远程机器上(使用autovideosink),播放本地和远程内容(使用playbin),流式传输相机图片并查看它,但我仍然不知道如何通过网络流式传输mp4文件。你能提供一个简单的例子吗?
gst-launch-1.0 filesrc location="C:\\Videos\\videotestsrc.avi" ! decodebin ! x264enc ! mpegtsmux ! queue ! tcpserversink host=127.0.0.1 port=8080
gst-launch-1.0 tcpclientsrc host=127.0.0.1 port=8080 ! decodebin ! videoconvert ! autovideosink sync=false