全部测试可用,如果有问题,请检查你的gstreamer是否安装了相应的插件。
-----------------------------------------------TI 3730 dvsdk-------------------------------------------
板子上:
gst-launch -v v4l2src device="/dev/video7" always-copy=FALSE ! ffmpegcolorspace ! 'video/x-raw-yuv,width=640,height=480,format=(fourcc)UYVY' ! TIVidenc1 codecName=h264enc engineName=codecServer contiguousInputFrame=TRUE ! rtph264pay pt=96 ! udpsink host=192.168.3.3 port=5000
gst-launch -v udpsrc port=12000 caps="application/x-rtp" ! rtph264depay ! ffdec_h264 ! xvimagesink
-----------------------------------------------TI 3730 dvsdk-------------------------------------------
+++++++++++++++++++++++++++jpeg encode+++++++++++++++++++++++
gst-launch v4l2src ! ffmpegcolorspace ! ffmpegcolorspace ! 'video/x-raw-yuv,width=640,height=480,format=(fourcc)UYVY' ! jpegenc ! multipartmux ! tcpserversink host=127.0.0.1 port=5000
gst-launch-1.0 v4l2src device="/dev/video0" ! ffmpegcolorspace ! 'video/x-raw-yuv,width=640,height=480,format=(fourcc)UYVY' ! jpegenc ! multipartmux ! tcpserversink host=127.0.0.1 port=5000
gst-launch-1.0 tcpclientsrc host=127.0.0.1 port=5000 ! multipartdemux ! jpegdec ! autovideosink
gst-launch tcpclientsrc host=127.0.0.1 port=5000 ! multipartdemux ! jpegdec ! xvimagesink
+++++++++++++++++++++++++++jpeg encode+++++++++++++++++++++++
===========================h264 no protocol====================
gst-launch v4l2src device="/dev/video1" ! ffmpegcolorspace ! 'video/x-raw-yuv,width=640,height=480,format=(fourcc)UYVY' ! h264enc ! multipartmux ! tcpserversink host=127.0.0.1 port=5000
gst-launch tcpclientsrc host=127.0.0.1 port=5000 ! multipartdemux ! h264dec ! autovideosink
gst-launch-1.0 v4l2src device=/dev/video1 norm=255 ! videoconvert ! 'video/x-raw,width=320,height=240,framerate=(fraction)15' ! autovideoconvert ! x264enc tune="zerolatency" threads=4 ! mpegtsmux ! udpsink host=127.0.0.1 port=12345 ts-offset=0
gst-launch-1.0 udpsrc port=12345 ! tsdemux ! video/x-h264 ! h264parse ! avdec_h264 ! autovideosink sync=false
===========================h264 no protocol====================
_______________________gstreamer packet protocol_________________
gst-launch v4l2src device="/dev/video1" ! ffmpegcolorspace ! 'video/x-raw-yuv,width=640,height=480,format=(fourcc)UYVY' ! gdppay ! tcpserversink host=127.0.0.1 port=5000
gst-launch v4l2src device="/dev/video1" ! ffmpegcolorspace ! 'video/x-raw-yuv,width=320,height=240,format=(fourcc)UYVY,framerate=(fraction)20/1' ! gdppay ! tcpserversink host=127.0.0.1 port=5000
gst-launch tcpclientsrc host=127.0.0.1 port=5000 ! gdpdepay ! xvimagesink
gst-launch-0.10 v4l2src device="/dev/video0" ! ffmpegcolorspace ! 'video/x-raw-yuv,width=320,height=240,format=(fourcc)UYVY,framerate=(fraction)5/1' ! gdppay ! tcpclientsink host=127.0.0.1 port=5000
gst-launch-0.10 tcpserversrc port=5000 ! gdpdepay ! ffmpegcolorspace ! xvimagesink
gst-launch-0.10 v4l2src device="/dev/video0" ! ffmpegcolorspace ! gdppay ! tcpclientsink host=127.0.0.1 port=5000
gst-launch-0.10 tcpserversrc port=5000 ! gdpdepay ! ffmpegcolorspace ! xvimagesink
gst-launch-1.0 v4l2src device="/dev/video0" ! videoconvert ! gdppay ! tcpclientsink host=localhost port=5000
gst-launch-1.0 tcpserversrc port=5000 ! gdpdepay ! videoconvert ! xvimagesink
gst-launch-1.0 v4l2src device=/dev/video0 norm=255 ! videoconvert ! 'video/x-raw,width=640,height=480' ! autovideoconvert ! x264enc tune="zerolatency" threads=4 ! gdppay ! tcpclientsink host=localhost port=5000
gst-launch-1.0 tcpserversrc port=5000 ! gdpdepay ! h264parse ! avdec_h264 ! xvimagesink --gst-debug=*:2
_____________________gstreamer packet protocol_____________________
+++++++++++++++++++++++++++filesrc++++++++++++++++++++++
gst-launch-1.0 filesrc location=./music.mp3 ! mad ! audioconvert ! audioresample ! pulsesink --gst-debug=*:2
gst-launch-1.0 filesrc location=./music.mp3 ! mad ! pulsesink --gst-debug=*:2
gst-launch-1.0 filesrc location=/home/songwater/Cproject/x265/x265/build/linux/720.hevc blocksize=1024 ! libde265dec mode=raw ! queue ! autovideosink
gst-launch-1.0 playbin uri=file:///home/songwater/Cproject/gstreamer/gstreamer-lde265/examples/spreedmovie.mkv --gst-debug=*:3
+++++++++++++++++++++++++++filesrc++++++++++++++++++++++
++++++++++++++++++++++++++rtp x264+++++++++++++++++++++
gst-launch-1.0 v4l2src device=/dev/video0 norm=255 ! videoconvert ! 'video/x-raw,width=640,height=480' ! autovideoconvert ! x264enc tune="zerolatency" threads=1 ! rtph264pay config-interval=2 ! udpsink host=127.0.0.1 port=12345
gst-launch-1.0 v4l2src device=/dev/video0 norm=255 ! videoconvert ! 'video/x-raw,width=640,height=480' ! autovideoconvert ! x264enc tune="zerolatency" threads=4 ! rtph264pay ! udpsink host=127.0.0.1 port=12345
gst-launch-1.0 v4l2src device=/dev/video1 norm=255 ! videoconvert ! 'video/x-raw,width=1280,height=720' ! autovideoconvert ! x264enc tune="zerolatency" threads=4 ! rtph264pay ! udpsink host=127.0.0.1 port=12345
gst-launch-1.0 udpsrc port=12345 ! application/x-rtp, payload=96 ! rtpjitterbuffer ! rtph264depay ! h264parse ! avdec_h264 ! xvimagesink --gst-debug=*:4
++++++++++++++++++++++++++++++rtp x264+++++++++++++++++
__________________________direct play____________________
gst-launch-1.0 v4l2src device=/dev/video0 norm=255 ! videoconvert ! 'video/x-raw,width=640,height=480' ! autovideoconvert ! x264enc tune="zerolatency" threads=4 ! video/x-h264 ! h264parse ! avdec_h264 ! xvimagesink sync=false
gst-launch-1.0 v4l2src device=/dev/video0 norm=255 ! videoconvert ! 'video/x-raw,width=320,height=240' ! autovideoconvert ! x265enc tune="zerolatency" ! libde265dec mode=raw ! queue ! autovideosink
gst-launch-1.0 v4l2src device=/dev/video0 norm=255 ! autovideoconvert ! 'video/x-raw,width=320,height=240,format=(string){"I420"},framerate=(fraction)15' ! x265enc tune="zerolatency" ! libde265dec mode=raw ! queue ! xvimagesink sync=false
gst-launch-1.0 v4l2src device=/dev/video1 norm=255 ! videoconvert ! 'video/x-raw,width=320,height=240' ! autovideoconvert ! x265enc option-string="fps=15/1:bitrate=64" ! libde265dec mode=raw ! queue ! autovideosink sync=false
gst-launch-1.0 v4l2src device=/dev/video1 norm=255 ! videoconvert ! 'video/x-raw,width=320,height=240,framerate=(fraction)15' ! autovideoconvert ! x265enc tune="zerolatency" option-string="crf=28" ! rtph265pay ! rtph265depay ! video/x-h265 ! h265parse ! avdec_h265 ! xvimagesink sync=false
_________________________direct play_______________________
________________________capture to file_____________________
gst-launch-1.0 v4l2src device=/dev/video0 norm=255 ! autovideoconvert ! 'video/x-raw,width=320,height=240,format=(string){"I420"},framerate=(fraction)15' ! filesink location=cap.yuv
gst-launch-1.0 v4l2src device=/dev/video1 norm=255 ! videoconvert ! 'video/x-raw,width=320,height=240,framerate=(fraction)15' ! autovideoconvert ! x265enc ! filesink location=cap1.hevc
________________________capture to file_________________
++++++++++++++++++++++++file to file x265 encode+++++++++++
gst-launch-1.0 filesrc location=/home/songwater/Cproject/x265/x265/build/linux/cap.yuv ! x265enc ! filesink location=cap1.hevc
+++++++++++++++++++++++++++++file to file x265 encode+++++++++++++++++++++
++++++++++++++++++++++++++++++x265 no protocol+++++++++++
gst-launch-1.0 v4l2src device=/dev/video0 norm=255 ! videoconvert ! 'video/x-raw,width=320,height=240,framerate=(fraction)15' ! autovideoconvert ! x265enc tune="zerolatency" ! udpsink host=127.0.0.1 port=12345 ts-offset=0
gst-launch-1.0 v4l2src device=/dev/video1 norm=255 ! videoconvert ! 'video/x-raw,width=320,height=240,framerate=(fraction)15' ! autovideoconvert ! x265enc tune="zerolatency" option-string="fps=15/1:bitrate=64" ! udpsink host=127.0.0.1 port=12345 ts-offset=0 --gst-debug=v4l2allocator:5
gst-launch-1.0 udpsrc port=12345 ! libde265dec mode=raw ! xvimagesink sync=false
gst-launch-1.0 v4l2src device=/dev/video1 norm=255 ! videoconvert ! 'video/x-raw,width=320,height=240,framerate=(fraction)15' ! autovideoconvert ! x265enc tune="fastdecode" speed-preset="medium" option-string="crf=28" ! udpsink host=127.0.0.1 port=12345 ts-offset=0 --gst-debug=x265enc:4
gst-launch-1.0 v4l2src device=/dev/video0 norm=255 ! videoconvert ! 'video/x-raw,width=320,height=240,framerate=(fraction)15' ! autovideoconvert ! x265enc tune="zerolatency" option-string="bitrate=64" ! udpsink host=192.168.1.107 port=12345 ts-offset=0 --gst-debug=x265enc:4
gst-launch-1.0 udpsrc port=12345 do-timestamp=false ! libde265dec mode=raw ! xvimagesink --gst-debug=*:2
++++++++++++++++++++++++++++++x265 no protocol+++++++++++
======================rtph265==========================
gst-launch-1.0 v4l2src device=/dev/video1 norm=255 ! videoconvert ! 'video/x-raw,width=320,height=240,framerate=(fraction)15' ! autovideoconvert ! x265enc ! rtph265pay ! udpsink host=127.0.0.1 port=12345
gst-launch-1.0 v4l2src device=/dev/video1 norm=255 ! videoconvert ! 'video/x-raw,width=320,height=240,framerate=(fraction)15' ! autovideoconvert ! x265enc tune="zerolatency" option-string="bitrate=64" ! rtph265pay ! udpsink host=127.0.0.1 port=12345
gst-launch-1.0 udpsrc port=12345 ! application/x-rtp,payload=96 ! rtph265depay ! video/x-h265 ! h265parse ! avdec_h265 ! xvimagesink
======================rtph265==========================