2013-10-24 50 views
0

我可以玩這個WAV:與wavparse和vorbisenc GStreamer的轉碼失敗

http://freewavesamples.com/yamaha-sy35-clarinet-c5

gst-launch filesrc location=Yamaha-SY-35-Clarinet-C5.wav ! wavparse ! autoaudiosink 

所以我認爲wavparse功能正常,但 這條管道無法進行轉碼:

gst-launch filesrc location=Yamaha-SY-35-Clarinet-C5.wav ! wavparse ! vorbisenc ! filesink location=out.ogg 

以下警告和錯誤

 
Setting pipeline to PAUSED ... 
Pipeline is PREROLLING ... 
0:00:00.028608695 23692  0xa99720 WARN    wavparse gstwavparse.c:2110:gst_wavparse_loop: error: Internal data flow error. 
0:00:00.028637670 23692  0xa99720 WARN    wavparse gstwavparse.c:2110:gst_wavparse_loop: error: streaming task paused, reason not-linked (-1) 
ERROR: from element /GstPipeline:pipeline0/GstWavParse:wavparse0: Internal data flow error. 
Additional debug info: 
gstwavparse.c(2110): gst_wavparse_loop(): /GstPipeline:pipeline0/GstWavParse:wavparse0: 
streaming task paused, reason not-linked (-1) 
ERROR: pipeline doesn't want to preroll. 
Setting pipeline to NULL ... 
Freeing pipeline ... 

奇怪的是,該錯誤是發生在wavparse,所以當管道與音頻設備接收器結束,但不與編碼片很精緻 ...

回答

1

嘗試這條管道: GST推出filesrc location = audio.wav! wavparse! audioconvert! vorbisenc! filesink location = out.ogg

我認爲它在vorbisenc例子(audio/x-raw-float)vorbisenc支持(audio/x-raw-int)中不支持的格式,這就是爲什麼你應該添加audioconvert。如果您在管道中添加-v選項,則可以查看所有詳細信息。

+0

這解決了錯誤信息,out.ogg文件創建59714個字節,但它似乎無效,因爲它不會播放。我運行命令「oggz info out.ogg」,並打印Content-Duration:00:00:00.000。 「oggz validate out.ogg」打印:錯誤:文件不包含Ogg數據包。注意管道給出了警告:WARN bin gstbin.c:2395:gst_bin_do_latency_func:沒有真正配置0:00的延遲:00.000000000 –

+0

是的,它也不適用於我,它缺少'! oggmux'所以管道應該是'gst-launch-1.0 filesrc location = audio.wav! wavparse! audioconvert! vorbisenc! oggmux! filesink位置= out.ogg' – Nelson