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/13 14:41] – 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 13: | Line 36: | ||
| show usb camera | 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 | ||
| + | </ | ||
| + | |||
| + | hardware decode | ||
| + | < | ||
| + | F=videos/ | ||
| + | gst-launch-1.0 filesrc location=$F ! matroskademux ! queue ! h264parse ! omxh264dec ! autovideoconvert ! xvimagesink | ||
| + | </ | ||
| + | |||
| + | hardware encode | ||
| + | < | ||
| + | ... ! 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-devices | ||
| - | v4l2-ctl --list-formats-ext -d /dev/video2 | + | v4l2-ctl --list-formats-ext -d /dev/video0 |
| ioctl: VIDIOC_ENUM_FMT | ioctl: VIDIOC_ENUM_FMT | ||
| Type: Video Capture | Type: Video Capture | ||
| Line 22: | Line 85: | ||
| [0]: ' | [0]: ' | ||
| Size: Discrete 1280x960 | Size: Discrete 1280x960 | ||
| - | Interval: | + | Interval: |
| + | Interval: | ||
| + | Interval: | ||
| Size: Discrete 1280x720 | Size: Discrete 1280x720 | ||
| Interval: | Interval: | ||
| + | Interval: | ||
| + | Interval: | ||
| Size: Discrete 640x480 | Size: Discrete 640x480 | ||
| - | Interval: | + | Interval: |
| + | Interval: | ||
| + | Interval: | ||
| + | Interval: | ||
| + | Interval: | ||
| + | Interval: | ||
| + | Interval: | ||
| Size: Discrete 320x240 | Size: Discrete 320x240 | ||
| - | Interval: | + | Interval: |
| + | Interval: | ||
| + | Interval: | ||
| + | Interval: | ||
| + | Interval: | ||
| + | Interval: | ||
| + | </ | ||
| - | gst-launch-1.0 v4l2src device=/ | + | < |
| + | v4l2-ctl -d / | ||
| + | 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 | ||
| </ | </ | ||
| - | rtsp client | + | |
| < | < | ||
| - | gst-launch-1.0 \ | + | ffplay |
| - | rtspsrc location=rtsp: | + | |
| - | ! h264parse ! avdec_h264 \ | + | Stream #0:0: Video: rawvideo ([186]GR[8] |
| - | ! videoconvert ! xvimagesink | + | |
| </ | </ | ||
| - | hardware decode | ||
| < | < | ||
| - | F=videos/ | + | gst-launch-1.0 |
| - | gst-launch-1.0 | + | |
| + | # width=640, | ||
| + | # width=1280, | ||
| </ | </ | ||
| - | hardware | + | save to file with h264 encode |
| < | < | ||
| - | ... | + | gst-launch-1.0 -e v4l2src device=/ |
| </ | </ | ||