簡體   English   中英

GStreamer-CRITICAL **:gst_element_make_from_uri:斷言“ gst_uri_is_valid(uri)”失敗

[英]GStreamer-CRITICAL **: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed

我在使用Python中的OpenCV 3.1的Ubuntu 16.04中。 我可以對大量視頻運行良好,但是在此特定視頻中卻失敗了。 我正在使用XVID進行編碼。 URI似乎是正確的,所以我在這里茫然不知所措...

下面是完整的錯誤(我知道可能需要一些上下文,但是為文件提供的路徑是正確的。我嘗試在其他建議的結尾處末尾加一個空格,但它沒有用。

(240, 320, 3)
Converting all images into a video...
v_HandStandPushups_g01_c01
['', 'media', 'pedro', 'actv3', 'UCF101', 'videos', 'HandstandPushups']
Height: 224 Width: 224 FPS: 25.0
/media/pedro/actv3/UCF101/pose/HandstandPushups/v_HandStandPushups_g01_c01_pose.avi
/media/pedro/actv3/UCF101/pose/HandstandPushups/v_HandStandPushups_g01_c01_joints.npy

(python:1923): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed
GStreamer Plugin: Embedded video playback halted; module filesink0 reported: Could not open file "/media/pedro/actv3/UCF101/pose/HandstandPushups/v_HandStandPushups_g01_c01_pose.avi" for writing.
GStreamer Plugin: Embedded video playback halted; module filesink0 reported: GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
OpenCV Error: Unspecified error (GStreamer: cannot put pipeline to play
) in CvVideoWriter_GStreamer::open, file /home/pedro/opencv/modules/videoio/src/cap_gstreamer.cpp, line 1530
Traceback (most recent call last):
  File "process_video.py", line 133, in <module>
    main()
  File "process_video.py", line 130, in main
    _process_dataset()
  File "process_video.py", line 119, in _process_dataset
    computePose(videos)
  File "process_video.py", line 101, in computePose
    video = cv2.VideoWriter(poseimg_output_name, fourcc, vidcap.get(cv2.CAP_PROP_FPS), (width,height), True)
cv2.error: /home/pedro/opencv/modules/videoio/src/cap_gstreamer.cpp:1530: error: (-2) GStreamer: cannot put pipeline to play
 in function CvVideoWriter_GStreamer::open

編輯 :解決方案是我正在寫入一個不存在的文件夾。 仔細檢查路徑(區分大小寫)。

它抱怨不能寫。 GStreamer Plugin: Embedded video playback halted; module filesink0 reported: Could not open file "/media/pedro/actv3/UCF101/pose/HandstandPushups/v_HandStandPushups_g01_c01_pose.avi" for writing.

您確定它具有write屬性嗎?

無論如何,當我看到斷言失敗時,我使用GDB來更好地理解該失敗:

GST_DEBUG=4 G_DEBUG=fatal-criticals gdb -ex run --args application

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM