2016-07-22 33 views
1

在Windows上,使用GST 1.8.2(1.6),創建多個IP攝像機使用下面的GST-管道下水分流到一個單一的MP4文件的MP4文件(我已經重新格式化我的GST - 啓動命令更好看這裏,但他們是單行):的GStreamer播放多部影片的MP4文件

mp4mux name=m ! filesink location=file.mp4 
rtspsrc location="rtsp://x" latency=0 name=Camera1 ! rtph264depay ! h264parse ! tee name=t1 
    t1. ! queue ! m.video_1 
    t1. ! queue ! decodebin ! autovideosink name=video1 
rtspsrc location="rtsp://y" latency=0 name=Camera2 ! rtph264depay ! h264parse ! tee name=t2 
    t2. ! queue ! m.video_2 
    t2. ! queue ! decodebin ! autovideosink name=video2 

我可以用VLC媒體播放器播放生成的文件,但我不能將文件播放使用的GStreamer。當我創建像

gst-launch-1.0 uridecodebin name=u uri=file:/file.mp4 
    u.src_0 ! queue ! autovideosink 
    u.src_1 ! queue ! autovideosink 

它從來沒有玩。在等待的視頻,我看到

Setting pipeline to PAUSED ... 
Pipeline is PREROLLING ... 
Redistribute latency... 
Redistribute latency... 

當我後來打CTRL-C,響應

handling interrupt. 
Interrupt: Stopping pipeline ... 
ERROR: pipeline doesn't want to preroll. 
Setting pipeline to NULL ... 
Freeing pipeline ... 

一位同事試圖在他的Mac相同的命令,並得到相同的結果。

我設置環境變量,以生產「DOT」管道圖形文件。他們不顯示正確的視頻格式,寬度或高度;我想它永遠不會那麼遠。我遵循otopolsky的配方和一臺相機的作品,既有命令行示例,也有我的程序。

任何人有任何想法?

謝謝。

-reilly。

+0

已更新至1.8.2版本,沒有快樂。 – Reilly

回答

0

我想你忘了在開始添加-e到GST推出。我測試了你的管道的簡化版本:

gst-launch-1.0 -e mp4mux name=m ! filesink location=file.mp4 videotestsrc ! x264enc ! m.video_1 videotestsrc ! x264enc ! m.video_2 

然後像這樣玩。你的uri是錯誤的..你需要提供完整路徑或使用filesrc(位置可以是相對的)和decodebin來代替..

這是適當的管道 - 不知道如何在windows中使用pwd以便使用完整路徑..

gst-launch-1.0 uridecodebin name=u uri=file://`pwd`/file.mp4 ! video/x-raw ! queue ! videoconvert ! autovideosink u. ! video/x-raw ! queue ! videoconvert ! autovideosink 
+0

我在命令行嘗試了-e;沒有我的rtsp來源的喜悅。實際上,我寫了一個C++程序,但我使用gst_parse_launch來獲得靈活性。我知道你的錯誤;我試圖限制我的帖子大小以顯示相關部分。感謝您的建議,tho。讓他們繼續來! – Reilly

+0

@Reilly,玩我的測試管道 - 它工作嗎? – nayana

+0

我完全隔開,並沒有運行你的例子;我只是試圖修改它們以供我使用。今天我運行你的例子,它*做*工作。我懷疑你正在與EoS合作。讓我用RTSP相機和命令行再試一次。 – Reilly