2014-05-25 102 views
4

我編譯下面這個教程GST-OMX GStreamer的:http://www.onepitwopi.com/raspberry-pi/gstreamer-1-2-on-the-raspberry-pi/的Gstreamer與GST-OMX樹莓派

一切正常,最後,當我跑GST-檢查-1.0 | OMX grep的我:

omx: omxmpeg2videodec: OpenMAX MPEG2 Video Decoder 
omx: omxmpeg4videodec: OpenMAX MPEG4 Video Decoder 
omx: omxh263dec: OpenMAX H.263 Video Decoder 
omx: omxh264dec: OpenMAX H.264 Video Decoder 
omx: omxtheoradec: OpenMAX Theora Video Decoder 
omx: omxvp8dec: OpenMAX VP8 Video Decoder 
omx: omxmjpegdec: OpenMAX MJPEG Video Decoder 
omx: omxvc1dec: OpenMAX WMV Video Decoder 
omx: omxh264enc: OpenMAX H.264 Video Encoder 
omx: omxanalogaudiosink: OpenMAX Analog Audio Sink 
omx: omxhdmiaudiosink: OpenMAX HDMI Audio Sink 

一切似乎正常,但當我嘗試使用GST推出-1.0與OMX解碼器我什麼也沒得到。

這條管道運行正常(但很慢,所以我關閉了它在中間):

[email protected] ~ $ gst-launch-1.0 filesrc location=./h264_720p_hp_5.1_6mbps_ac3_planet.mp4 ! qtdemux ! h264parse ! avdec_h264 ! eglglessink 
Setting pipeline to PAUSED ... 
Pipeline is PREROLLING ... 
Got context from element 'eglglessink0': gst.egl.EGLDisplay=context, display=(Gst EGLDisplay)NULL; 
Redistribute latency... 
Pipeline is PREROLLED ... 
Setting pipeline to PLAYING ... 
New clock: GstSystemClock 
WARNING: from element /GstPipeline:pipeline0/GstEglGlesSink:eglglessink0: A lot of buffers are being dropped. 
Additional debug info: 
gstbasesink.c(2791): gst_base_sink_is_too_late(): /GstPipeline:pipeline0/GstEglGlesSink:eglglessink0: 
There may be a timestamping problem, or this computer is too slow. 
^Chandling interrupt. 
Interrupt: Stopping pipeline ... 
Execution ended after 0:00:07.915424268 
Setting pipeline to PAUSED ... 
Setting pipeline to READY ... 
Setting pipeline to NULL ... 
Freeing pipeline ... 

然後我嘗試同樣的管道與OMX我得到這個:

[email protected] ~ $ gst-launch-1.0 -v filesrc location=h264_720p_hp_5.1_6mbps_ac3_planet.mp4 ! qtdemux ! h264parse ! omxh264dec ! eglglessink 
Setting pipeline to PAUSED ... 
Pipeline is PREROLLING ... 
Got context from element 'eglglessink0': gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL; 
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)5.1, profile=(string)high, codec_data=(buffer)01640033ffe1001867640033ac34e2805005ba10001974f004c4b408f18318a801008468eebce5531cc305d2628d13080214868783a1c0d04e12142c0ac0da02fe10042ad35e9e850b748c778a1410088b172105449ca3050e204448b20a4d8a081827090809848541dc4290a43164215a201900cae8340f81e86f03300b6017002ac05981d61a07802a8400a902087404700bc010506e036404b811805902e07203e0087ff85b, width=(int)1280, height=(int)720, framerate=(fraction)24000/1001, pixel-aspect-ratio=(fraction)1/1 
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)5.1, profile=(string)high, width=(int)1280, height=(int)720, framerate=(fraction)24000/1001, pixel-aspect-ratio=(fraction)1/1, parsed=(boolean)true 
/GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)5.1, profile=(string)high, width=(int)1280, height=(int)720, framerate=(fraction)24000/1001, pixel-aspect-ratio=(fraction)1/1, parsed=(boolean)true 
/GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, framerate=(fraction)24000/1001 
/GstPipeline:pipeline0/GstEglGlesSink:eglglessink0.GstPad:sink: caps = video/x-raw, format=(string)I420, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, framerate=(fraction)24000/1001 
ERROR: from element /GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0: Could not configure supporting library. 
Additional debug info: 
gstomxvideodec.c(1505): gst_omx_video_dec_loop(): /GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0: 
Unable to reconfigure output port 
ERROR: pipeline doesn't want to preroll. 
Setting pipeline to NULL ... 
/GstPipeline:pipeline0/GstEglGlesSink:eglglessink0.GstPad:sink: caps = NULL 
/GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0.GstPad:src: caps = NULL 
/GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0.GstPad:sink: caps = NULL 
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = NULL 
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = NULL 
/GstPipeline:pipeline0/GstQTDemux:qtdemux0.GstPad:video_0: caps = NULL 
/GstPipeline:pipeline0/GstQTDemux:qtdemux0.GstPad:audio_0: caps = NULL 
Freeing pipeline ... 

我覺得這是此錯誤最重要的部分:

ERROR: from element /GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0: Could not configure supporting library. 

但找不到任何引用此錯誤...

試圖檢查gst-omx,但它沒有任何檢查程序。

任何人都可以在這件事情中發現一些啓示嗎?

非常感謝! = d

UPDATE:

奇怪的是,如果我開始了我的RPI沒有HDMI連接線,通過ssh它的工作執行我的管道(但我沒有看到任何圖像,因爲HDMI電纜被關)

[email protected] ~ $ gst-launch-1.0 -v filesrc location=h264_720p_hp_5.1_6mbps_ac3_planet.mp4 ! qtdemux ! h264parse ! omxh264dec ! eglglessink 
Setting pipeline to PAUSED ... 
Pipeline is PREROLLING ... 
Got context from element 'eglglessink0': gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL; 
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)5.1, profile=(string)high, codec_data=(buffer)01640033ffe1001867640033ac34e2805005ba10001974f004c4b408f18318a801008468eebce5531cc305d2628d13080214868783a1c0d04e12142c0ac0da02fe10042ad35e9e850b748c778a1410088b172105449ca3050e204448b20a4d8a081827090809848541dc4290a43164215a201900cae8340f81e86f03300b6017002ac05981d61a07802a8400a902087404700bc010506e036404b811805902e07203e0087ff85b, width=(int)1280, height=(int)720, framerate=(fraction)24000/1001, pixel-aspect-ratio=(fraction)1/1 
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)5.1, profile=(string)high, width=(int)1280, height=(int)720, framerate=(fraction)24000/1001, pixel-aspect-ratio=(fraction)1/1, parsed=(boolean)true 
/GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)5.1, profile=(string)high, width=(int)1280, height=(int)720, framerate=(fraction)24000/1001, pixel-aspect-ratio=(fraction)1/1, parsed=(boolean)true 
/GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, framerate=(fraction)24000/1001 
/GstPipeline:pipeline0/GstEglGlesSink:eglglessink0.GstPad:sink: caps = video/x-raw, format=(string)I420, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, framerate=(fraction)24000/1001 
Pipeline is PREROLLED ... 
Setting pipeline to PLAYING ... 
New clock: GstSystemClock 
Got EOS from element "pipeline0". 
Execution ended after 0:01:52.821428472 
Setting pipeline to PAUSED ... 
Setting pipeline to READY ... 
Setting pipeline to NULL ... 
Freeing pipeline ... 

這是否意味着問題出在eglglessink中?

回答

3

就找到了解決辦法:

我忘了提高GPU的內存,所以我的720p視頻解碼沒有足夠的內存來運行。簡單的修復只是添加

gpu_mem=128 

到/boot/config.txt並重新啓動樹莓。畢竟,這與eglglessink有關; D

+0

謝謝。這也有助於繪製1920 * 1200的JPEG圖像:'code'gst-launch-1.0 multifilesrc location =「michelle.jpg」caps =「image/jpeg,framerate = 1/1」! jpegdec! videoconvert! videoscale! eglglessink'code' –