gstreamer and ffmpeg - stereoboy/Study GitHub Wiki

Contents

References

Open Sourced Sample Codes

Plugins Samples

Element Samples

NVIDIA DeepStream

Gst-Python

PyGObject

Tools

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 스트리밍하기

GStreamer

GStreamer Build Setup

GStreamer command line usages

gstreamer Tutorials

ffmpeg

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

Stream camera video and audio with FFmpeg

Capture Audio ALSA