Open f1-outsourcing opened 2 years ago
It depends on your source and what encoders are available on your system. On MacOS I do this to do hardware-encoding of NDI sources:
gst-launch-1.0 ndivideosrc ndi-name='NDI Source Name' ! queue ! videoconvert ! vtenc_h264 ! queue ! h264parse ! mpegtsmux ! filesink location='ndi-source.ts'
Heres an updated example for the latest versions, saves a NDI stream as h264 TS using hardware encoding on a NVidia GPU:
gst-launch-1.0 ndisrc ndi-name="NDI Source" ! ndisrcdemux name=demux demux.video ! queue ! nvh264enc ! h264parse ! mpegtsmux name=muxer ! filesink location="NDI-Source.ts" demux.audio ! queue ! audioconvert ! avenc_aac ! aacparse ! muxer.
You probably want to use avenc_aac
instead of faac
. The latter produces low quality AAC.
I am new to gstreamer, would be nice to have some example that saves to an mp4.
Currently I am testing with this, and that just generates a 100MB/s file