Last active
October 15, 2020 16:53
-
-
Save mariotpc/d48f4f685d4f92c7b0fe8cdc250aa096 to your computer and use it in GitHub Desktop.
gstreamer tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gst-launch-1.0 -v videotestsrc ! queue ! ximagesink | |
gst-launch-1.0 -v videotestsrc ! navigationtest ! videoconvert ! ximagesink | |
gst-launch-1.0 ximagesrc ! video/x-raw,framerate=5/1 ! videoconvert ! theoraenc ! oggmux ! filesink location=desktop.ogg | |
#streaming file.ogg to UDP | |
gst-launch-1.0 filesrc location=big_buck_bunny_720p_stereo.ogg ! oggdemux name=demux mpegtsmux name=mux alignment=7 ! udpsink host=192.168.1.12 port=5000 buffer-size=10000000 demux. ! theoradec ! x264enc ! mux. demux. ! queue max-size-time=5000000000 max-size-buffers=10000 ! vorbisdec ! avenc_aac compliance=-2 ! mux. | |
gst-launch-1.0 filesrc location=big_buck_bunny_720p_stereo.ogg ! oggdemux name=demux mpegtsmux name=mux alignment=7 ! udpsink host=192.168.1.12 port=5000 buffer-size=10000000 demux. ! theoradec ! x264enc ! mux. demux. ! queue max-size-time=5000000000 max-size-buffers=10000 ! vorbisdec ! avenc_aac ! mux. | |
#Audio | |
gst-launch-1.0 -v filesrc location=big_buck_bunny_720p_stereo.ogg ! oggdemux ! vorbisdec ! avenc_ac3 bitrate=64000 ! filesink location=bunny_audio.ac3 | |
#Stream video to ximagesink without any encoder | |
gst-launch-1.0 ximagesrc xid=$(xwininfo -tree | egrep 'Window id:' | cut -d ' ' -f4) ! videoconvert ! clockoverlay ! ximagesink | |
#MP4 encoder - Not good video | |
gst-launch-1.0 ximagesrc xid=$(xwininfo -tree | egrep 'Window id:' | cut -d ' ' -f4) ! videoconvert ! clockoverlay ! x264enc pass=5 quantizer=26 speed-preset=6 ! mp4mux fragment-duration=500 ! filesink location=window4.mp4 | |
#UDP Streaming ogg container | |
gst-launch-1.0 filesrc location=big_buck_bunny_720p_stereo.ogg ! oggdemux name=demux mpegtsmux name=mux alignment=7 ! udpsink host=192.168.1.12 port=5000 buffer-size=10000000 demux. ! theoradec ! x264enc ! mux. demux. ! queue max-size-time=5000000000 max-size-buffers=10000 ! vorbisdec ! avenc_aac ! mux. | |
********************************************************** | |
#Mix VideoSource Desktop Windows + HDMI Sound | |
********************************************************** | |
gst-launch-1.0 \ | |
pulsesrc device="alsa_output.pci-0000_00_1f.3.hdmi-stereo.monitor" ! audioconvert ! vorbisenc ! oggmux name=mux ! filesink location=test.ogg \ | |
ximagesrc videotestsrc ! videoconvert ! theoraenc ! mux. | |
gst-launch-1.0 pulsesrc device="alsa_output.pci-0000_00_1f.3.hdmi-stereo.monitor" ! audioconvert ! vorbisenc ! oggmux name=mux ! filesink location=test.ogg ximagesrc xid=$(xwininfo -tree | egrep 'Window id:' | cut -d ' ' -f4) ! videoconvert ! theoraenc ! mux. | |
************************************************************************************************************************ | |
WARNING: from element /GstPipeline:pipeline0/GstPulseSrc:pulsesrc0: Can't record audio fast enough | |
Additional debug info: | |
gstaudiobasesrc.c(841): gst_audio_base_src_create (): /GstPipeline:pipeline0/GstPulseSrc:pulsesrc0: | |
Dropped 15435 samples. This is most likely because downstream can't keep up and is consuming samples too slowly. | |
************************************************************************************************************************ | |
gst-launch-1.0 pulsesrc device="alsa_output.pci-0000_00_1f.3.hdmi-stereo.monitor" ! queue ! audioconvert ! vorbisenc ! oggmux name=mux ! filesink location=test.ogg ximagesrc xid=$(xwininfo -tree | egrep 'Window id:' | cut -d ' ' -f4) ! queue ! videoconvert ! theoraenc ! mux. | |
On October 15th 2020 | |
############################# | |
gst-launch-1.0 \ | |
pulsesrc device="alsa_output.pci-0000_00_1f.3.hdmi-stereo.monitor" ! audioconvert ! vorbisenc ! oggmux name=mux ! filesink location=test.ogg \ | |
ximagesrc videotestsrc ! videoconvert ! theoraenc ! mux. | |
************************************************************************************************************************ | |
WARNING: from element /GstPipeline:pipeline0/GstPulseSrc:pulsesrc0: Can't record audio fast enough | |
Additional debug info: | |
gstaudiobasesrc.c(841): gst_audio_base_src_create (): /GstPipeline:pipeline0/GstPulseSrc:pulsesrc0: | |
Dropped 15435 samples. This is most likely because downstream can't keep up and is consuming samples too slowly. | |
************************************************************************************************************************ | |
gst-launch-1.0 alsasrc device="alsa_output.pci-0000_00_1f.3.hdmi-stereo.monitor" ! audioconvert ! vorbisenc ! oggmux name=mux ! filesink location=test.ogg ximagesrc xid=$(xwininfo -tree | egrep 'Window id:' | cut -d ' ' -f4) ! videoconvert ! theoraenc ! mux. | |
gst-launch-1.0 pulsesrc device="alsa_output.pci-0000_00_1f.3.hdmi-stereo.monitor" ! queue ! audioconvert ! vorbisenc ! oggmux name=mux ! filesink location=test.ogg ximagesrc xid=$(xwininfo -tree | egrep 'Window id:' | cut -d ' ' -f4) ! queue ! videoconvert ! theoraenc ! mux. | |
Change video frame rate | |
********************************* | |
gst-launch-1.0 alsasrc device=hw:0 ! queue ! audioconvert ! vorbisenc ! oggmux name=mux ! filesink location=test.ogg ximagesrc xid=$(xwininfo -tree | egrep 'Window id:' | cut -d ' ' -f4) ! queue ! videoconvert ! video/x-raw,framerate=10/1 ! theoraenc ! mux. | |
gst-launch-1.0 -e pulsesrc device=alsa_output.pci-0000_00_1f.3.analog-stereo.monitor ! queue ! audioconvert ! vorbisenc ! oggmux name=mux ! filesink location=reunion.1510.20.ogg ximagesrc xid=$(xwininfo -tree | egrep 'Window id:' | cut -d ' ' -f4) ! queue ! videoconvert ! video/x-raw,framerate=10/1 ! theoraenc ! mux. | |
This work, most well, less CPU consuming | |
**************************************** | |
gst-launch-1.0 pulsesrc device=alsa_output.pci-0000_00_1f.3.analog-stereo.monitor ! queue ! audioconvert ! vorbisenc ! oggmux name=mux ! filesink location=reunion.e.1510.20.ogg ximagesrc use-damage=0 xid=$(xwininfo -tree | egrep 'Window id:' | cut -d ' ' -f4) ! queue ! videoconvert ! video/x-raw,framerate=10/1,drop-frames=true ! videoscale method=0 ! video/x-raw,width=640,height=480 ! theoraenc ! mux. | |
It is more clear video when using ! videoscale method=1 | |
********************************************************** | |
gst-launch-1.0 pulsesrc device=alsa_output.pci-0000_00_1f.3.analog-stereo.monitor ! queue ! audioconvert ! vorbisenc ! oggmux name=mux ! filesink location=reunion.g.1510.20.ogg ximagesrc use-damage=0 xid=$(xwininfo -tree | egrep 'Window id:' | cut -d ' ' -f4) ! queue ! videoconvert ! video/x-raw,framerate=24/1,drop-frames=true ! videoscale method=1 ! video/x-raw,width=800,height=600 ! theoraenc ! mux. | |
GstVideoScaleMethod The videoscale method to use. | |
Members | |
nearest-neighbour (0) – Nearest Neighbour | |
bilinear (1) – Bilinear (2-tap) | |
4-tap (2) – 4-tap Sinc | |
lanczos (3) – Lanczos | |
bilinear2 (4) – Bilinear (multi-tap) | |
sinc (5) – Sinc (multi-tap) | |
hermite (6) – Hermite (multi-tap) | |
spline (7) – Spline (multi-tap) | |
catrom (8) – Catmull-Rom (multi-tap) | |
mitchell (9) – Mitchell (multi-tap) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment