Difference between revisions of "Explorer/RaspberryPi/Softwares/gstreamer"
Jump to navigation
Jump to search
(Created page with "sudo apt-get install gstreamer1.0-plugins-base -y sudo apt-get install gstreamer1.0-plugins-good -y sudo apt-get install gstreamer1.0-plugins-bad -y sudo apt-get install gs...") |
|||
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
sudo apt-get install gstreamer1.0-plugins-base -y | [[Explorer]] | ||
sudo apt-get install gstreamer1.0-plugins-good -y | |||
sudo apt-get install gstreamer1.0-plugins-bad -y | * Install gstreamer | ||
sudo apt-get install gstreamer1.0-plugins-ugly -y | sudo apt-get install gstreamer1.0-plugins-base -y; \ | ||
sudo apt-get install gstreamer1.0-libav -y | sudo apt-get install gstreamer1.0-plugins-good -y; \ | ||
sudo apt-get install gstreamer1.0-omx -y | sudo apt-get install gstreamer1.0-plugins-bad -y; \ | ||
sudo apt-get install gstreamer1.0-plugins-ugly -y; \ | |||
sudo apt-get install gstreamer1.0-libav -y; \ | |||
sudo apt-get install gstreamer1.0-omx -y; \ | |||
sudo apt-get install gstreamer1.0-tools -y | sudo apt-get install gstreamer1.0-tools -y | ||
* Check installation with camera unicast | * Check installation with camera unicast | ||
| --> camera1 (x-h264) | | --> camera1 (x-h264) --> port=5000 | ||
raspivid (x-h264) --> | | raspivid (x-h264) --> | | ||
| omxh264dec --> camera2 (x-raw,I420) | | omxh264dec --> camera2 (x-raw,I420) --> omxh264enc --> port=5100 | ||
Server: | Server: | ||
raspivid -t 0 -w 640 -h 480 -fps 30/1 -b 3000000 -g 5 -vf -hf -cd H264 -n -fl -ih -o - | rm /tmp/camera*; \ | ||
| gst-launch-1.0 fdsrc | raspivid -t 0 -w 640 -h 480 -fps 30/1 -b 3000000 -g 5 -vf -hf -cd H264 -n -fl -ih -o - \ | ||
! h264parse | | gst-launch-1.0 fdsrc \ | ||
! video/x-h264,stream-format=byte-stream | ! h264parse \ | ||
! tee name=streams | ! video/x-h264,stream-format=byte-stream \ | ||
! omxh264dec | ! tee name=streams \ | ||
! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 | ! omxh264dec \ | ||
! shmsink socket-path=/tmp/camera2 wait-for-connection=false sync=false streams. | ! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 \ | ||
! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 | ! shmsink socket-path=/tmp/camera2 wait-for-connection=false sync=false streams. \ | ||
! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 \ | |||
! shmsink socket-path=/tmp/camera1 wait-for-connection=false sync=false | ! shmsink socket-path=/tmp/camera1 wait-for-connection=false sync=false | ||
gst-launch-1.0 shmsrc socket-path=/tmp/camera1 do-timestamp=true | gst-launch-1.0 shmsrc socket-path=/tmp/camera1 do-timestamp=true \ | ||
! video/x-h264,stream-format=byte-stream,alignment=au | ! video/x-h264,stream-format=byte-stream,alignment=au \ | ||
! rtph264pay name=pay0 pt=96 config-interval=1 | ! rtph264pay name=pay0 pt=96 config-interval=1 \ | ||
! udpsink host=CLIENTIP port=5000 | ! udpsink host=CLIENTIP port=5000 | ||
gst-launch-1.0 shmsrc socket-path=/tmp/camera2 do-timestamp=true is-live=true | gst-launch-1.0 shmsrc socket-path=/tmp/camera2 do-timestamp=true is-live=true \ | ||
! video/x-raw,format=I420,width=640,height=480,framerate=15/1 | ! video/x-raw,format=I420,width=640,height=480,framerate=15/1 \ | ||
! omxh264enc | ! omxh264enc \ | ||
! video/x-h264,profile=high | ! video/x-h264,profile=high \ | ||
! rtph264pay name=pay0 pt=96 config-interval=1 | ! rtph264pay name=pay0 pt=96 config-interval=1 \ | ||
! udpsink host=CLIENTIP port=5100 | ! udpsink host=CLIENTIP port=5100 | ||
Client: (port 5000 and 5100) | Client: (port 5000 and 5100) | ||
gst-launch-1.0 udpsrc port=5000 | gst-launch-1.0 udpsrc port=5000 \ | ||
! application/x-rtp, encoding-name=H264,payload=96 | ! application/x-rtp, encoding-name=H264,payload=96 \ | ||
! rtph264depay | ! rtph264depay \ | ||
! h264parse | ! h264parse \ | ||
! avdec_h264 | ! avdec_h264 \ | ||
! videoconvert | ! videoconvert \ | ||
! autovideosink | ! autovideosink | ||
* [[Explorer/RaspberryPi/Softwares/rtsp-server]] |
Latest revision as of 04:45, 29 September 2020
- Install gstreamer
sudo apt-get install gstreamer1.0-plugins-base -y; \ sudo apt-get install gstreamer1.0-plugins-good -y; \ sudo apt-get install gstreamer1.0-plugins-bad -y; \ sudo apt-get install gstreamer1.0-plugins-ugly -y; \ sudo apt-get install gstreamer1.0-libav -y; \ sudo apt-get install gstreamer1.0-omx -y; \ sudo apt-get install gstreamer1.0-tools -y
- Check installation with camera unicast
| --> camera1 (x-h264) --> port=5000 raspivid (x-h264) --> | | omxh264dec --> camera2 (x-raw,I420) --> omxh264enc --> port=5100
Server:
rm /tmp/camera*; \ raspivid -t 0 -w 640 -h 480 -fps 30/1 -b 3000000 -g 5 -vf -hf -cd H264 -n -fl -ih -o - \ | gst-launch-1.0 fdsrc \ ! h264parse \ ! video/x-h264,stream-format=byte-stream \ ! tee name=streams \ ! omxh264dec \ ! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 \ ! shmsink socket-path=/tmp/camera2 wait-for-connection=false sync=false streams. \ ! queue max-size-buffers=0 max-size-time=0 max-size-bytes=0 \ ! shmsink socket-path=/tmp/camera1 wait-for-connection=false sync=false
gst-launch-1.0 shmsrc socket-path=/tmp/camera1 do-timestamp=true \ ! video/x-h264,stream-format=byte-stream,alignment=au \ ! rtph264pay name=pay0 pt=96 config-interval=1 \ ! udpsink host=CLIENTIP port=5000
gst-launch-1.0 shmsrc socket-path=/tmp/camera2 do-timestamp=true is-live=true \ ! video/x-raw,format=I420,width=640,height=480,framerate=15/1 \ ! omxh264enc \ ! video/x-h264,profile=high \ ! rtph264pay name=pay0 pt=96 config-interval=1 \ ! udpsink host=CLIENTIP port=5100
Client: (port 5000 and 5100)
gst-launch-1.0 udpsrc port=5000 \ ! application/x-rtp, encoding-name=H264,payload=96 \ ! rtph264depay \ ! h264parse \ ! avdec_h264 \ ! videoconvert \ ! autovideosink