Reputation: 5657
Currently I working on android app which will play and record video form remote source
My pipeline looks like this
videotestsrc do-timestamp=true ! videoscale add-borders=false ! capsfilter ! videoflip method=0 ! tee name=split
split. ! queue ! videoconvert ! glupload ! glshader ! autovideosink async=false !
split. ! queue ! identity drop-probability=0 ! videoconvert ! timeoverlay ! x264enc key-int-max=10 ! h264parse ! splitmuxsink location=/sdcard/test-%d.mp4
Only problem stat I see in logs
video_buffer_pool_set_config:<videobufferpool1> no caps in config
I'm not asking to fix my pipeline, I just wanna understand it there any common algorithm how to troubleshoot this kind of freeze?
Upvotes: 1
Views: 1905
Reputation: 3378
The best tool you'll have is probably the GST_DEBUG_BIN_TO_DOT_FILE
macro, in gstdebugutils.h. It'll show your pipeline and the state of each element. It does require you to set the GST_DEBUG_DUMP_DOT_DIR
environment variable.
Then you run a command like this to create a PNG or some other image file from the dot.
dot -Tpng pipeline.dot -o pipeline.png
On our desktop systems we usually package all this up into a command we can add to our programs. I'm not sure what your best route is in Android. Perhaps there are some additional APIs there that can help.
After you identify your problem elements, use the GST_DEBUG
environment variable to add additional logging. For example if you have an x264enc
error, use:
GST_DEBUG=2,x264enc:5
That'll set the logging level to error for everything except x264enc which will be debug level.
Also if you run a debugger you can usually look through all the threads and find which element is hanging.
Upvotes: 3