From a09aa349c134dbe6a421e2812a0a9860cb3a3a68 Mon Sep 17 00:00:00 2001 From: Erol444 Date: Tue, 30 Aug 2022 21:45:42 +0200 Subject: [PATCH 1/4] Added matroska option to VideoEncoder example (altnerative to ffmpeg) --- docs/source/includes/container-encoding.rst | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/source/includes/container-encoding.rst b/docs/source/includes/container-encoding.rst index 2a03545ce..61ecbec38 100644 --- a/docs/source/includes/container-encoding.rst +++ b/docs/source/includes/container-encoding.rst @@ -1,3 +1,14 @@ Encoded bitstream (either MJPEG, H264, or H265) from the device can also be **saved directly into .mp4 container** with no computational overhead on the host computer. See `demo here `__ -for more information. \ No newline at end of file +for more information. + +**Matroska** + +Besides ``ffmpeg`` and ``.mp4`` video container (which is patent encumbered), you could also use the ``mkvmerge`` +(see `MKVToolNix `__ for GUI usage) and ``.mkv`` video container +to mux encoded stream into video file that is supported by all major video players +(eg. `VLC `__) + +.. code-block:: + + mkvmerge -o vid.mkv video.h265 \ No newline at end of file From f2429a7b2db0f6f753a7b8592add52486b21e454 Mon Sep 17 00:00:00 2001 From: Erol444 Date: Wed, 31 Aug 2022 14:57:39 +0200 Subject: [PATCH 2/4] Script node gpio docs added example --- docs/source/components/nodes/script.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/source/components/nodes/script.rst b/docs/source/components/nodes/script.rst index 61df4b082..1032b45f8 100644 --- a/docs/source/components/nodes/script.rst +++ b/docs/source/components/nodes/script.rst @@ -120,6 +120,24 @@ In the script node you can interface with GPIOs of the VPU using module GPIO. Cu GPIO.PullDownUp: GPIO.PULL_NONE, GPIO.PULL_DOWN, GPIO.PULL_UP GPIO.Edge: GPIO.RISING, GPIO.FALLING, GPIO.LEVEL_HIGH, GPIO.LEVEL_LOW +Here's **an example** of toggling GPIO pin 40 inside Script node from the host (via :ref:`XLinkIn``). On `OAK-SoM-Pro `__, +GPIO 40 drives FSYNC signal for both 4-lane cameras, and we have used the code below for this exact reason. + +.. code-bloc:: python + + import GPIO + MX_PIN = 40 + + ret = GPIO.setup(MX_PIN, GPIO.OUT, GPIO.PULL_DOWN) + toggleVal = True + + while True: + data = node.io['in'].get() # Wait for a message from the host computer + + node.warn('GPIO toggle: ' + str(toggleVal)) + toggleVal = not toggleVal + ret = GPIO.write(MX_PIN, toggleVal) # Toggle the GPIO + Using DepthAI :ref:`Messages ` ################################################### From c2d5feead4c06e3554b239ac7ecca481a288484b Mon Sep 17 00:00:00 2001 From: Erol444 Date: Thu, 1 Sep 2022 22:34:32 +0200 Subject: [PATCH 3/4] Update docs/source/components/nodes/script.rst --- docs/source/components/nodes/script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/components/nodes/script.rst b/docs/source/components/nodes/script.rst index 1032b45f8..bc86f2553 100644 --- a/docs/source/components/nodes/script.rst +++ b/docs/source/components/nodes/script.rst @@ -120,7 +120,7 @@ In the script node you can interface with GPIOs of the VPU using module GPIO. Cu GPIO.PullDownUp: GPIO.PULL_NONE, GPIO.PULL_DOWN, GPIO.PULL_UP GPIO.Edge: GPIO.RISING, GPIO.FALLING, GPIO.LEVEL_HIGH, GPIO.LEVEL_LOW -Here's **an example** of toggling GPIO pin 40 inside Script node from the host (via :ref:`XLinkIn``). On `OAK-SoM-Pro `__, +Here's **an example** of toggling GPIO pin 40 inside Script node from the host (via :ref:`XLinkIn`). On `OAK-SoM-Pro `__, GPIO 40 drives FSYNC signal for both 4-lane cameras, and we have used the code below for this exact reason. .. code-bloc:: python From b33fdb3a2f5ca37b33609b83628544599febeacc Mon Sep 17 00:00:00 2001 From: Erol444 Date: Fri, 2 Sep 2022 11:25:59 +0200 Subject: [PATCH 4/4] Update docs/source/components/nodes/script.rst --- docs/source/components/nodes/script.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/components/nodes/script.rst b/docs/source/components/nodes/script.rst index bc86f2553..45efcf6db 100644 --- a/docs/source/components/nodes/script.rst +++ b/docs/source/components/nodes/script.rst @@ -123,7 +123,7 @@ In the script node you can interface with GPIOs of the VPU using module GPIO. Cu Here's **an example** of toggling GPIO pin 40 inside Script node from the host (via :ref:`XLinkIn`). On `OAK-SoM-Pro `__, GPIO 40 drives FSYNC signal for both 4-lane cameras, and we have used the code below for this exact reason. -.. code-bloc:: python +.. code-block:: python import GPIO MX_PIN = 40