GStreamer Daemon - Troubleshooting: Difference between revisions

From RidgeRun Developer Wiki
No edit summary
mNo edit summary
 
(23 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Gstd-1.0 Page |[[Gstd-1.0 -Interpipesink|Interpipesink]]|[[Gstd-1.0 - Releases|Releases]]|
{{GStreamer Daemon/Head | previous=Python Video Player Example | next=Interpipesink}}


This wiki show how debug a pipeline using the [[Gstd-1.0 - Enabling the Debug Subsystem|debug enable]].  
This wiki show how debug a pipeline using the [[GStreamer Daemon - Enabling the Debug Subsystem|debug enable]].  


To debug a pipeline one easy way is enable the debug using gstd, next examples shows how to do it, and what is the expected output when some works good or fail.  
== Debug Log ==
 
Gstd redirects its own and any GStreamer log to a folder named gstd, created at /usr/local/var/log. There you can find "gstd.log" and "gst.log":
*/usr/local/var/log/gstd/gstd.log: Contains GStreamer Daemon debug messages.
*/usr/local/var/log/gstd/gst.log: Contains all the Gstreamer log messages (including debug).
 
You can also change the gst.log and gstd.log file path when you launch gstd:
<syntaxhighlight lang="bash" line="line" style="background-color:lavender">
gstd --gstd-log-filename /home/nvidia/gstd.log --gst-log-filename /home/nvidia/gst.log
</syntaxhighlight>
 
==Debug Enable==
To debug a pipeline one easy way is to enable the debug using gstd, next examples show how to do it, and what is the expected output when some works good or fail.  


<syntaxhighlight lang="bash" line="line" style="background-color:lavender">
<syntaxhighlight lang="bash" line="line" style="background-color:lavender">
Line 13: Line 25:
pipeline_create p playbin uri=file://tmp/video.mp4
pipeline_create p playbin uri=file://tmp/video.mp4
pipeline_play p  
pipeline_play p  
</syntaxhighlight>


You can enable debug for specific elements:
<syntaxhighlight lang="bash" line="line" style="background-color:lavender">
debug_threshold *videotestsrc*:5 #set the debug level on all videotestsrc elements to 5 
debug_threshold videotestsrc1:6 #set the debug level on videotestsrc1 to 6 
</syntaxhighlight>
</syntaxhighlight>


Output when everything works good:  
You can find more info about GStreamer debug levels here: https://gstreamer.freedesktop.org/documentation/tutorials/basic/debugging-tools.html
 
===Output when everything works good===
[[File:Wo-error.png|1700px|thumbnail|center| ]]


0:01:30.145314546  3474 0x7f91540095e0 LOG              videosink gstvideosink.c:211:gst_video_sink_show_preroll_frame:<autovideosink0-actual-sink-xvimage> rendering frame, ts=0:00:27.766666666
===Output when something goes wrong===
0:01:30.145332797  3474 0x7f91540095e0 LOG              xvimagesink xvimagesink.c:933:gst_xv_image_sink_show_frame:<autovideosink0-actual-sink-xvimage> buffer 0x7f915402e7f0 from our pool, writing directly
0:01:30.145346113  3474 0x7f91540095e0 LOG              xvimagesink xvimagesink.c:259:gst_xv_image_sink_xvimage_put:<autovideosink0-actual-sink-xvimage> unreffing 0x7f915402e6e0
0:01:30.145361285  3474 0x7f91540095e0 LOG              xvimagesink xvimagesink.c:262:gst_xv_image_sink_xvimage_put:<autovideosink0-actual-sink-xvimage> reffing 0x7f915402e7f0 as our current image
0:01:30.145371721  3474 0x7f91540095e0 DEBUG            videosink gstvideosink.c:136:gst_video_sink_center_rect: source is 320x240 dest is 320x240, result is 320x240 with x,y 0x0
0:01:30.145982736  3474 0x7f91540095e0 DEBUG            basesink gstbasesink.c:1606:gst_base_sink_commit_state:<autovideosink0-actual-sink-xvimage> stopping
0:01:30.146006083  3474 0x7f91540095e0 DEBUG            basesink gstbasesink.c:2328:gst_base_sink_do_preroll:<autovideosink0-actual-sink-xvimage> stopping while commiting state


Output when something goes wrong:
[[File:Error.png|1500px|thumbnail|center|]]


0:38:27.574880266  3715 0x7feff8009850 DEBUG            bin gstbin.c:3781:gst_bin_handle_message_func: there are more async elements pending
== RidgeRun Support ==
0:38:27.574889400  3715 0x7feff8009850 INFO              GST_STATES gstelement.c:2657:gst_element_change_state: have FAILURE change_state return
If you have some problems using GStreamer Daemon, please reach us at the contact details provided in the [[GStreamer_Daemon - Contact_Us]] section at the end of this guide.
0:38:27.574900136  3715 0x7feff8009850 INFO              GST_STATES gstelement.c:2247:gst_element_abort_state: aborting state from READY to PLAYING
0:38:27.574914666  3715 0x7feff8009850 LOG              GST_STATES gstelement.c:2700:gst_element_change_state: exit state change 0
0:38:27.574925640  3715 0x7feff8009850 DEBUG            GST_STATES gstelement.c:2607:gst_element_set_state_func: returned FAILURE
0:38:27.574939057  3715 0x7feff8009850 ERROR            gstdstate gstd_state.c:210:gstd_state_update:<GstdState0x7feff8056d50> Failed to change the state of the pipeline




}}
{{GStreamer Daemon/Foot | previous=Python Video Player Example | next=Interpipesink}}

Latest revision as of 18:39, 2 September 2020



Previous: Python Video Player Example Index Next: Interpipesink




This wiki show how debug a pipeline using the debug enable.

Debug Log

Gstd redirects its own and any GStreamer log to a folder named gstd, created at /usr/local/var/log. There you can find "gstd.log" and "gst.log":

  • /usr/local/var/log/gstd/gstd.log: Contains GStreamer Daemon debug messages.
  • /usr/local/var/log/gstd/gst.log: Contains all the Gstreamer log messages (including debug).

You can also change the gst.log and gstd.log file path when you launch gstd:

gstd --gstd-log-filename /home/nvidia/gstd.log --gst-log-filename /home/nvidia/gst.log

Debug Enable

To debug a pipeline one easy way is to enable the debug using gstd, next examples show how to do it, and what is the expected output when some works good or fail.

pipeline_create p1 videotestsrc ! autovideosink
pipeline_play p1
debug_enable true 
debug_threshold 6
debug_color true 
pipeline_create p playbin uri=file://tmp/video.mp4
pipeline_play p

You can enable debug for specific elements:

debug_threshold *videotestsrc*:5 #set the debug level on all videotestsrc elements to 5  
debug_threshold videotestsrc1:6 #set the debug level on videotestsrc1 to 6

You can find more info about GStreamer debug levels here: https://gstreamer.freedesktop.org/documentation/tutorials/basic/debugging-tools.html

Output when everything works good

Output when something goes wrong

RidgeRun Support

If you have some problems using GStreamer Daemon, please reach us at the contact details provided in the GStreamer_Daemon - Contact_Us section at the end of this guide.



Previous: Python Video Player Example Index Next: Interpipesink