gstreamer and ffmpeg - stereoboy/Study GitHub Wiki
Contents
References
- Linux TV GStreamer Wiki
- Pipeline Examples from the Official Web Page
- GStreamer Pipeline Samples
- GStreamer Debugging Options
- Media Types and Properties
- How many total threads in a given GStreamer pipeline?
Open Sourced Sample Codes
- GStreamer Pipeline Arena (Samples)
- gstreamer-cheat-sheet
- Gstreamer Pipeline Samples
- Python Example
Plugins Samples
Element Samples
- https://mathieuduponchelle.github.io/2018-02-01-Python-Elements.html
- https://mathieuduponchelle.github.io/2018-02-15-Python-Elements-2.html
NVIDIA DeepStream
- Getting Started with NVIDIA DeepStream-5.0
- NVIDIA Metropolis Documentation Archive
- Install for Jetson/Ubuntu
Gst-Python
- PyGObject
- Gst
- GLib
- GModule
- GObject
PyGObject
- https://pygobject.readthedocs.io/en/latest/
- GTK
- https://docs.gtk.org/
- GTK-3.0
- GLib-2.0
- GModule-2.0
- GObject-2.0
- Gio-2.0
Tools
- Web Audio Equalizer
gstreamer and ffmpeg Overview
gstreamer vs ffmpeg
GStreamer is a broader library, and can actually use FFmpeg plugins. For simple and typical transcoding jobs, maybe FFmpeg is easier to use. But for more complex operations, GStreamer is super powerful.
gstreamer with RTSP
ffmpeg with RTSP
- FFmpeg를 사용하여 웹캠 영상과 동영상 파일을 RTSP 스트리밍하기
- https://webnautes.tistory.com/1427
- Assume additional RTSP Setup, FFmpeg is just transfer video streaming to RTSP server.
GStreamer
- Unofficial Overview
GStreamer Build Setup
GStreamer command line usages
- Simple usage (Playing in local)
- https://webnautes.tistory.com/1426?category=874967
- https://medium.com/@petehouston/play-webcam-using-gstreamer-9b7596e4e181
$ gst-launch-1.0 autovideosrc device=/dev/video0 ! autovideosink
- Simple usage using gst-launch through UDP
- https://endland.medium.com/gstreamer-%EC%8B%A4%EC%8B%9C%EA%B0%84-streaming-f7e6f4608768
- Sender Side
gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw, width=640, height=480 ! videoconvert ! jpegenc ! rtpjpegpay ! udpsink \ host=127.0.0.1 port=8554
- Receiver Side
gst-launch-1.0 udpsrc port=8554 ! application/x-rtp,encoding-name=JPEG,payload=26 ! rtpjpegdepay ! jpegdec ! autovideosink
gstreamer Tutorials
- Simple References written in Korean
- Simple Tutorial on Ubuntu
- Basic tutorial 1: Hello world!
- https://gitlab.freedesktop.org/gstreamer/gst-docs
$ gst-launch-1.0 playbin uri=https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm
- https://gstreamer.freedesktop.org/documentation/tutorials/basic/hello-world.html?gi-language=c
- https://gitlab.freedesktop.org/gstreamer/gst-docs
- Pipeline manipulation
ffmpeg
- https://www.ffmpeg.org/
- Unofficial Tutorials
How to capture Audio Only from Webcam
$ ffmpeg -f pulse -i default out.wav
$ ffmpeg -f alsa -i hw:1 -t 30 out.wav
How can I capture audio AND video simultenaous with ffmpeg from a linux USB capture device
$ ffmpeg -y -f alsa -i hw:0 -f v4l2 -i /dev/video0 -vcodec libx264 -t 20 prueba1.mp4
$ arecord -L
default
Playback/recording through the PulseAudio sound server
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
...
dmix:CARD=StudioTM,DEV=0
Microsoft® LifeCam Studio(TM), USB Audio
Direct sample mixing device
dsnoop:CARD=StudioTM,DEV=0
Microsoft® LifeCam Studio(TM), USB Audio
Direct sample snooping device
hw:CARD=StudioTM,DEV=0
Microsoft® LifeCam Studio(TM), USB Audio
Direct hardware device without any conversions
plughw:CARD=StudioTM,DEV=0
Microsoft® LifeCam Studio(TM), USB Audio
Hardware device with all software conversions
$ ffmpeg -y -f alsa -i "plughw:CARD=StudioTM,DEV=0" -f v4l2 -i /dev/video0 -vcodec libx264 -t 20 prueba1.mp4