我真的用尽想法。这是我的问题:我需要通过网络按需传输mp4(H264)。我是gstreamer的新手,经过很多尝试1.0以上的版本之后,我决定使用0.10,因为它似乎迄今为止是最有希望的。下面gstreamer通过网络串流mp4 - 无法确定流的类型
命令的工作是完美的(我看窗口,我的电影)
gst-launch filesrc location=/home/zuko/sintel_trailer-368p.mp4 ! decodebin2 name=dec ! queue ! ffmpegcolorspace ! autovideosink dec. ! queue ! audioconvert ! audioresample ! autoaudiosink
现在我试图建立使用命令TCP流(迄今为止只有本地主机):
Server side:
gst-launch filesrc location=/home/zuko/sintel_trailer-368p.mp4 ! decodebin2 name=dec ! tcpserversink host=127.0.0.1 port=5000
Client side:
gst-launch tcpclientsrc host=127.0.0.1 port=5000 ! decodebin2 name=dec ! queue ! ffmpegcolorspace ! autovideosink dec. ! queue ! audioconvert ! audioresample ! autoaudiosink
但从“客户端”命令响应如下:
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泛型#47,Ubuntu的SMP周五5月2日23:30:00 UTC 2014 x86_64的x86_64的x86_64的GNU/Linux的
这里附:与(3 GST_DEBUG_NO_COLOR = 1个GST_DEBUG = *):完整的错误 https://app.box.com/s/4ntyk6am2ibg0pohtg9h
按照你的建议我切换到1.0(1.4.3是具体的)。我做了功课,并将工作管道中的元素转换为新元素(如ffdec_h264到avdec_h264等)。现在我可以流式传输相机图片并在远程机器上查看(使用autovideosink),播放本地和远程内容(使用playbin),但我仍然不知道如何通过网络传输mp4文件。你能提供一个简单的例子吗? – zuko 2014-11-05 12:09:13