From patchwork Wed Mar 16 14:13:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 15459 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id B11E4BF415 for ; Wed, 16 Mar 2022 14:13:22 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1030A604DB; Wed, 16 Mar 2022 15:13:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1647440002; bh=GSrPOp/8aRRDiVRKJjQN979llIgAsWDOxAAQf9IB7+o=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=AllCSxGvihvLS7ERgdHWE2VJ2xjtrZTzwtxtGW504HihYCzZgg9MxATNdiJWoKd+4 VdRRcQxk1kA6ZbJm19Mq/WRTUXfVLnpe/R8RsXOtKm8QFMR/920/jboNkk5fjctzI+ OuRpCRjZqyBBSXKsdYEGozWyFKehOvOjShGDGCnKCAJWDouoofPKZBnYCSkQeUImpS Eh8axgFw2BD/pvY9guIMCVYfRIsz15cCsv8CV5TsfRJyG6kuwB6bS4Leu2j7LTwVmh 7fn47+rUYrDLNHF0RFmwrf3Npw8PIMsWMo0UrIKJeAq/rg7AJGcgzU5PckNZaw4FL6 e2qX8W21HnaVg== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 47D6660475 for ; Wed, 16 Mar 2022 15:13:20 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="eB4Jj1Z1"; dkim-atps=neutral Received: from Monstersaurus.ksquared.org.uk.beta.tailscale.net (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C96213E4; Wed, 16 Mar 2022 15:13:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1647439999; bh=GSrPOp/8aRRDiVRKJjQN979llIgAsWDOxAAQf9IB7+o=; h=From:To:Cc:Subject:Date:From; b=eB4Jj1Z1gmhee/dWVBSxm568szLQZG+Sq9NNtbs6aQCzvpllMtCyP5N2Au7r+RDtm mi3QWcscTKqe2wFOd/plM3lmpPjOAO3HNAteevlXWv3ZRGovX+teya+1lMzG3i240R zEbhzTpFGxvwy3/puIf1aQsbw9Nq2LFdvbUsSTcE= To: libcamera devel Date: Wed, 16 Mar 2022 14:13:16 +0000 Message-Id: <20220316141316.926035-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] README: Extend gstreamer examples X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Kieran Bingham via libcamera-devel From: Kieran Bingham Reply-To: Kieran Bingham Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" There have been many reports of facing difficulties with the gstreamer element and getting the libcamerasrc to successfully negotiate with other gstreamer elements. This is often due to the current limitations on colorimetry and frame rate support in the element, and can usually be worked around by specifying those explicitly in the caps. Provide a tested example to capture, encode, and stream images as jpeg to a remote device in the gstreamer section of the getting started readme. Signed-off-by: Kieran Bingham Reviewed-by: Umang Jain Reviewed-by: Laurent Pinchart --- Technically this pipeline will stream without specifying the colorimetry but the purpose is to add an example with both framerate, and colorimetry explicitly listed to help people debug their pipelines themselves. README.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.rst b/README.rst index ca8a97cbd71b..7abbc9e7a9ae 100644 --- a/README.rst +++ b/README.rst @@ -139,6 +139,25 @@ the video device provider) and libcamerasrc (for the operation of the camera). All corresponding debug messages can be enabled by setting the ``GST_DEBUG`` environment variable to ``libcamera*:7``. +Presently to prevent element negotiation failures it is required to specify the +colorimetry and framerate as part of your pipeline construction. For instance +to capture and encode as a JPEG stream and receive on another device the +following example could be used as a starting point: + +.. code:: + + gst-launch-1.0 libcamerasrc ! \ + video/x-raw,colorimetry=bt709,format=NV12,width=1280,height=720,framerate=30/1 ! \ + jpegenc ! multipartmux ! \ + tcpserversink host=0.0.0.0 port=5000 + +Which can be received on another device over the network with: + +.. code:: + + gst-launch-1.0 tcpclientsrc host=$DEVICE_IP port=5000 ! \ + multipartdemux ! jpegdec ! autovideosink + .. section-end-getting-started Troubleshooting