Skip to content

Instantly share code, notes, and snippets.

View anselmobattisti's full-sized avatar
🇧🇷
Aqui é Brasil!

Anselmo Battisti anselmobattisti

🇧🇷
Aqui é Brasil!
View GitHub Profile
@anselmobattisti
anselmobattisti / gist:5c5777b8a17e88baea06285279233b0f
Last active September 20, 2019 23:08
How to send gstreamer data via UDP and consume it at VLC
How to send gstreamer data via UDP and consume it at VLC
# Sender
gst-launch-1.0 videotestsrc pattern=ball \
! tee name=t \
! queue \
! x264enc \
! rtph264pay \
! udpsink host=localhost port=50000
@anselmobattisti
anselmobattisti / Stop all docker container by some patterns
Created September 15, 2019 20:21
Stop all docker container by some patterns
docker stop $(docker ps | egrep alfa | awk '{print $1}')
in this case alfa is the name of the image used to start the container , you can use anything that apears in docker ps, like, name or others
@anselmobattisti
anselmobattisti / gstreamer pipeline
Created September 10, 2019 23:37
Grab video from webcam and stream it using udpsink via x264
Pipeline to send video (simulating SRC) get the data from video0
gst-launch-1.0 v4l2src device=/dev/video0 \
! decodebin \
! x264enc \
! rtph264pay \
! udpsink host=localhost port=5000
// if you are running it inside a docker container be aware of the host ip in udpsink
gst-launch-1.0 v4l2src device=/dev/video0 \
! decodebin \
@anselmobattisti
anselmobattisti / cam_tee_udp
Created September 8, 2019 13:30
Send video from webcam to two destinations via UDP using gstreamer
gst-launch-1.0 v4l2src device=/dev/video0 \
! tee name=t \
! queue \
! decodebin \
! x264enc \
! rtph264pay \
! udpsink host=localhost port=5000 \
t. \
! queue \
! decodebin \
@anselmobattisti
anselmobattisti / gstreamer_webcam_to_udp
Created September 7, 2019 16:02
Capture webcam video and stream it using gstreamer
Capture and send video
gst-launch-1.0 v4l2src device=/dev/video0 \
! decodebin \
! x264enc \
! rtph264pay \
! udpsink port=5000
Show the video
gst-launch-1.0 \
@anselmobattisti
anselmobattisti / udpdump.sh
Created September 3, 2019 23:00
How to read UDP dump linux
tcpdump -i lo udp port 8125 -vv -X
gst-discoverer-1.0 rtsp://192.168.0.110:8080/h264_ulaw.sdp
docker inspect <container_name> | egrep IPAddress
sudo docker run -ti busybox ping google.com
sudo docker run -ti busybox ping google.com