Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| tips:gstreamer [2019/07/10 15:46] – scipio | tips:gstreamer [2023/11/16 11:42] (current) – [gstream jetson] sscipioni | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== gstream jetson ====== | ||
| + | |||
| + | |||
| + | |||
| + | orin native | ||
| + | <code bash> | ||
| + | URL=rtsp:// | ||
| + | # | ||
| + | gst-launch-1.0 rtspsrc location=$URL protocols=tcp latency=0 ! rtph264depay ! queue ! h264parse ! nvv4l2decoder ! nvvideoconvert ! autovideosink | ||
| + | </ | ||
| + | |||
| + | deepstream amd64 | ||
| + | <code bash> | ||
| + | URL=rtsp:// | ||
| + | |||
| + | </ | ||
| + | |||
| + | nvv4l2h264enc | ||
| + | < | ||
| + | gst-launch-1.0 videotestsrc is-live=1 ! nvvidconv ! nvv4l2h264enc ! h264parse ! matroskamux ! filesink location=/ | ||
| + | </ | ||
| + | |||
| + | |||
| ====== gstreamer ====== | ====== gstreamer ====== | ||
| Line 10: | Line 33: | ||
| cd tmp | cd tmp | ||
| dot -Tpng x.xx.xx.xxxxxxxxx-gst-launch.FOO.dot > graph.png | dot -Tpng x.xx.xx.xxxxxxxxx-gst-launch.FOO.dot > graph.png | ||
| + | </ | ||
| + | |||
| + | show usb camera | ||
| + | < | ||
| + | gst-launch-1.0 v4l2src device=/ | ||
| + | </ | ||
| + | |||
| + | rtsp client | ||
| + | < | ||
| + | gst-launch-1.0 \ | ||
| + | rtspsrc location=rtsp:// | ||
| + | ! h264parse ! avdec_h264 \ | ||
| + | ! videoconvert ! xvimagesink | ||
| + | </ | ||
| + | |||
| + | rtsp save stream to test.mkv without h264 decoding | ||
| + | < | ||
| + | gst-launch-1.0 -e rtspsrc location=rtsp:// | ||
| + | ! rtph264depay ! h264parse ! matroskamux ! filesink location=test.mkv | ||
| </ | </ | ||
| Line 21: | Line 63: | ||
| < | < | ||
| ... ! videoconvert ! omxh264enc ! matroskamux ! filesink location=test.mkv | ... ! videoconvert ! omxh264enc ! matroskamux ! filesink location=test.mkv | ||
| + | </ | ||
| + | |||
| + | inspect pipeline properties | ||
| + | < | ||
| + | ... ! fakesink -v | grep fake | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== ocam camera ===== | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | identify | ||
| + | < | ||
| + | v4l2-ctl --list-devices | ||
| + | |||
| + | v4l2-ctl --list-formats-ext -d / | ||
| + | ioctl: VIDIOC_ENUM_FMT | ||
| + | Type: Video Capture | ||
| + | |||
| + | [0]: ' | ||
| + | Size: Discrete 1280x960 | ||
| + | Interval: | ||
| + | Interval: | ||
| + | Interval: | ||
| + | Size: Discrete 1280x720 | ||
| + | Interval: | ||
| + | Interval: | ||
| + | Interval: | ||
| + | Size: Discrete 640x480 | ||
| + | Interval: | ||
| + | Interval: | ||
| + | Interval: | ||
| + | Interval: | ||
| + | Interval: | ||
| + | Interval: | ||
| + | Interval: | ||
| + | Size: Discrete 320x240 | ||
| + | Interval: | ||
| + | Interval: | ||
| + | Interval: | ||
| + | Interval: | ||
| + | Interval: | ||
| + | Interval: | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | v4l2-ctl -d /dev/video0 --list-ctrls | ||
| + | white_balance_red_component 0x0098090e (int) : min=0 max=250 step=1 default=100 value=100 | ||
| + | | ||
| + | gain 0x00980913 (int) : min=0 max=255 step=1 default=64 value=64 | ||
| + | exposure_auto 0x009a0901 (menu) | ||
| + | exposure_absolute 0x009a0902 (int) : min=1 max=1000 step=1 default=55 value=128 | ||
| + | </ | ||
| + | |||
| + | |||
| + | < | ||
| + | ffplay -f video4linux2 -s 640x480 -i /dev/video0 | ||
| + | |||
| + | Stream #0:0: Video: rawvideo ([186]GR[8] / 0x85247BA), bayer_grbg8, | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | gst-launch-1.0 -v v4l2src device=/ | ||
| + | |||
| + | # width=640, | ||
| + | # width=1280, | ||
| + | |||
| + | </ | ||
| + | |||
| + | save to file with h264 encode | ||
| + | < | ||
| + | gst-launch-1.0 -e v4l2src device=/ | ||
| </ | </ | ||