Changes between Version 20 and Version 21 of gstreamer
- Timestamp:
- 12/17/2020 10:03:56 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
gstreamer
v20 v21 604 604 gst-launch-1.0 v4l2src device=$DEVICE ! \ 605 605 $GST_CONVERT output-io-mode=dmabuf-import ! \ 606 video/x-raw,colorimetry=bt709 ! \ 606 607 v4l2h264enc output-io-mode=dmabuf-import ! \ 607 608 rtph264pay ! udpsink host=$SERVER port=$PORT … … 609 610 gst-launch-1.0 v4l2src device=$DEVICE ! \ 610 611 $GST_CONVERT output-io-mode=dmabuf-import ! \ 611 video/x-raw,width=1440,height=960 ! \612 video/x-raw,width=1440,height=960,colorimetry=bt709 ! \ 612 613 v4l2h264enc output-io-mode=dmabuf-import ! \ 613 614 rtph264pay ! udpsink host=$SERVER port=$PORT … … 615 616 gst-launch-1.0 v4l2src device=$DEVICE ! \ 616 617 $GST_CONVERT output-io-mode=dmabuf-import extra-controls=cid,horizontal_flip=1 ! \ 617 video/x-raw,width=1440,height=960 ! \618 video/x-raw,width=1440,height=960,colorimetry=bt709 ! \ 618 619 v4l2h264enc output-io-mode=dmabuf-import ! \ 619 620 rtph264pay ! udpsink host=$SERVER port=$PORT … … 621 622 gst-launch-1.0 v4l2src device=$DEVICE ! \ 622 623 $GST_CONVERT output-io-mode=dmabuf-import extra-controls=cid,rotate=90 ! \ 623 video/x-raw,width=1440,height=960 ! \624 video/x-raw,width=1440,height=960,colorimetry=bt709 ! \ 624 625 v4l2h264enc output-io-mode=dmabuf-import ! \ 625 626 rtph264pay ! udpsink host=$SERVER port=$PORT 626 627 }}} 628 * note the above examples also use v4l2convert to convert to bt709 coloriemtry required by the encoder elements 627 629 628 630 For anything not able to be handled by the video4linux2 element and any mem2mem drivers there are software based elements that can convert pixel colorspace and/or scale however note these are extremely CPU intensive: … … 678 680 video4linux2: v4l2mpeg4enc: V4L2 MPEG4 Encoder 679 681 }}} 680 * The CODA960 encoder requires NV12/I420/YV12 YUV pixel formats with rec709 colorimetry 682 * The CODA960 encoder requires NV12/I420/YV12 YUV pixel formats with rec709 colorimetry (bt709) 681 683 * The CODA driver requires CMA memory for buffers when it is used. Make sure to provide the kernel with enough CMA memory with the kernel command-line (ie 'cma=64M' for 64MB which should be enough) 682 684 * Encoder and Decoder options are exposed through the v4l2 control IDs (CID) and can be listed with the v4l2-ctl -L and v4l2-ctl -l parameters on the devices exposed by the coda driver … … 689 691 {{{#!bash 690 692 # stream H264/RTP/UDP 691 GST_CONVERT=$(gst-inspect-1.0 | grep -e "v4l2.*convert*" | sed -e 's/.*:\s*\(v4l2.*convert\):.*/\1/')692 693 gst-launch-1.0 v4l2src device=$DEVICE ! \ 693 $GST_CONVERT output-io-mode=dmabuf-import ! \694 $GST_CONVERT output-io-mode=dmabuf-import ! video/x-raw,colorimetry=bt709 ! \ 694 695 v4l2h264enc output-io-mode=dmabuf-import ! \ 695 696 rtph264pay ! udpsink host=$SERVER port=$PORT … … 705 706 {{{#!bash 706 707 # stream JPEG/RTP/UDP 707 gst-launch-1.0 v4l2src device=$DEVICE ! v4l2jpegenc ! rtpjpegpay ! udpsink host=$SERVER port=$PORT 708 gst-launch-1.0 v4l2src device=$DEVICE ! \ 709 $GST_CONVERT output-io-mode=dmabuf-import ! video/x-raw,colorimetry=bt709 ! \ 710 v4l2jpegenc output-io-mode=dmabuf-import ! \ 711 rtpjpegpay ! udpsink host=$SERVER port=$PORT 708 712 # client on $SERVER:$PORT could be viewing via 'gst-launch-1.0 udpsrc port=$PORT ! application/x-rtp,payload=96 ! rtpjpegdepay ! jpegdec ! autovideosink' 709 713 }}} … … 1357 1361 If something doesn't work right, make sure all of the defaults being used in your pipeline element properties are correct. Many of the examples above or found online may omit the 'device' property from the source or sink elements which will make it default to the first appropriate device. 1358 1362 1363 1364 [=#GST_DEBUG] 1365 == gst-inspect and GST_DEBUG 1359 1366 You can see all the properties of a particular element with the 'gst-inspect <elementname>' command. You can see a list of all elements with 'gst-inspect' without arguments. 1360 1367 … … 1364 1371 1365 1372 For example, if you wanted to see DEBUG level messages for the {{{videotestsrc}}} element you can set GST_DEBUG=videotestsrc:4 1373 1374 == Colorspace and Colorimetry compatibility 1375 If you see errors such as 'Device wants bt709 colorimetry' you need to use the v4l2convert ($GST_CONVERT) element to convert your colorspace between elements. This is often needed between v4l2src capture devices and various CODA elements such as v4l2h264enc and vr4l2jpegenc. 1376 1377 For example: 1378 {{{#!bash 1379 gst-launch-1.0 v4l2src device=$DEVICE ! \ 1380 $GST_CONVERT output-io-mode=dmabuf-import ! \ 1381 video/x-raw,colorimetry=bt709 ! \ 1382 v4l2h264enc output-io-mode=dmabuf-import ! \ 1383 rtph264pay ! udpsink host=$SERVER port=$PORT 1384 }}} 1366 1385 1367 1386 == insufficient CMA memory when using CODA