Skip to content

Instantly share code, notes, and snippets.

@Sakura286
Last active June 3, 2024 03:09
Show Gist options
  • Save Sakura286/430961733ea9026c1000c9de6d62187f to your computer and use it in GitHub Desktop.
Save Sakura286/430961733ea9026c1000c9de6d62187f to your computer and use it in GitHub Desktop.

源端

revyos latest

uboot:https://github.com/revyos/thead-u-boot/releases/tag/20240529

image:https://github.com/revyos/mkimg-th1520/actions/runs/9287642918

依赖安装

sudo apt install gstreamer1.0-plugins-base-apps

测试命令

# 注意替换 host ip 为目的端 ip
gst-launch-1.0 v4l2src device=/dev/video0 !  videoconvert ! videorate \
  ! video/x-raw,  format=NV12,width=640,height=480,framerate=20/1 \
  ! rawvideoparse format=nv12 width=640 height=480  framerate=20/1 \
  ! omxh264enc ! h264parse config-interval=1 ! video/x-h264,stream-format=byte-stream,alignment=nal \
  ! rtph264pay ! udpsink  host=192.168.31.27 port=5600

目的端

ubuntu 22.04 amd64

依赖安装

sudo apt install gstreamer1.0-libav gstreamer1.0-plugins-bad

测试命令

gst-launch-1.0 udpsrc port=5600 caps='application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264' \
  ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment