Skip to content

Instantly share code, notes, and snippets.

@zougloub
Created May 21, 2016 19:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zougloub/8184a43ecc51d3f9937a40a81e382cce to your computer and use it in GitHub Desktop.
Save zougloub/8184a43ecc51d3f9937a40a81e382cce to your computer and use it in GitHub Desktop.
gstreamer usage of python element

Issue

Run the pipeline from the python "merger" element at https://github.com/exmakhina/gstreamer-examples:

git clone https://github.com/exmakhina/gstreamer-examples

export GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD/gstreamer-examples/plugins
export GST_DEBUG=*:3,python:5

gst-launch-1.0 merger_py name=remap ! queue name=q_out ! "video/x-raw,format=(string)RGBA,width=4096,height=2048" ! videoconvert ! videorate ! "video/x-raw,format=(string)I420" !  vaapiencode_h264 rate-control=2 bitrate=6000 ! h264parse ! flvmux name=mux ! fakesink videotestsrc name=cam_l ! queue name=q_l ! "video/x-raw,width=1920,height=1080,format=(string)RGBA" ! remap.sink_l videotestsrc is-live=true name="cam_r" ! queue name=q_r ! "video/x-raw,width=1920,height=1080,format=(string)RGBA" ! remap.sink_r alsasrc ! queue name=q_aenc ! voaacenc ! mu.x

Notice the time spent pushing buffers, don't know why: https://github.com/exmakhina/gstreamer-examples/blob/master/plugins/python/merger.py#L196

@zougloub
Copy link
Author

0 00 01 056081689-gst-launch null_ready
0 00 01 064256991-gst-launch ready_paused
Uploading 0.00.02.195910554-gst-launch.PAUSED_PLAYING.png…
Uploading 0.00.03.437612252-gst-launch.warning.png…
0 00 03 768775625-gst-launch warning
Uploading 0.00.04.277598646-gst-launch.warning.png…
Uploading 0.00.04.947543070-gst-launch.warning.png…
Uploading 0.00.05.341635817-gst-launch.warning.png…
Uploading 0.00.05.859077547-gst-launch.warning.png…
Uploading 0.00.06.651008099-gst-launch.warning.png…
Uploading 0.00.07.659486772-gst-launch.warning.png…
Uploading 0.00.08.748012201-gst-launch.PLAYING_PAUSED.png…
Uploading 0.00.09.354375299-gst-launch.PAUSED_READY.png…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment