URI="rtsp://user:password@192.168.1.123:554/cam/realmonitor?channel=1&subtype=0"
使用 playbin
$ gst-launch-1.0 -v playbin uri=$URI
$ gst-launch-1.0 -v playbin uri=$URI uridecodebin0::source::latency=3000::video-sink=autovideosink
使用 uridecodebin
$ gst-launch-1.0 uridecodebin uri=$URI name=d d. ! nvvideoconvert ! nveglglessink
$ gst-launch-1.0 uridecodebin uri=$URI name=d d. ! nvvideoconvert ! nveglglessink d. ! queue ! audioconvert ! audioresample ! autoaudiosink
使用 decodebin
$ gst-launch-1.0 rtspsrc location=$URI ! application/x-rtp, media=video ! decodebin ! nvvideoconvert ! nveglglessink
$ gst-launch-1.0 rtspsrc location=$URI ! application/x-rtp, media=video ! decodebin name=d d. ! queue ! nvvideoconvert ! nveglglessink d. ! queue ! audioconvert ! audioresample ! autoaudiosink
自行編寫
$ gst-launch-1.0 rtspsrc location=$URI ! application/x-rtp, media=video ! queue ! rtph265depay ! h265parse ! nvv4l2decoder ! nvvideoconvert ! nveglglessink
$ gst-launch-1.0 rtspsrc location=$URI name=d d. ! application/x-rtp, media=video ! queue ! rtph265depay ! h265parse ! nvv4l2decoder ! nvvideoconvert ! nveglglessink d. ! queue ! application/x-rtp, media=audio ! rtppcmadepay ! alawdec ! autoaudiosink
存檔
$ gst-launch-1.0 -e rtspsrc location=$URI ! application/x-rtp, media=video ! queue ! rtph265depay ! h265parse ! matroskamux ! filesink location=aa.mkv
存檔並顯示
$ gst-launch-1.0 -e rtspsrc location=$URI ! application/x-rtp, media=video ! queue ! rtph265depay ! h265parse ! tee name=t t. ! queue ! avdec_h265 ! videoconvert ! autovideosink t. ! queue ! matroskamux ! filesink location=aa.mkv
存檔並顯示(因使用 nvv4l2decoder,所以要在 h265parse 前 tee)
$ gst-launch-1.0 -e rtspsrc location=$URI ! application/x-rtp, media=video ! queue ! rtph265depay ! tee name=t t. ! queue ! h265parse ! nvv4l2decoder ! nvvideoconvert ! nveglglessink t. ! queue ! h265parse ! matroskamux ! filesink location=aa.mkv
常用
nveglglessink nvoverlaysink autovideosink xvimagesink fakesink
nvvideoconvert videoconvert
nvv4l2decoder avdec_h265
Jetson 使用 nveglglessink 前要加 nvegltransform
gst-inspect-1.0
沒有留言:
張貼留言