Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
47 changes: 44 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ This library provides the ability to use hardware acceleration for video encodin
cd jetson-ffmpeg
mkdir build
cd build
cmake ..
cmake -DJETSON_MULTIMEDIA_API_DIR=../jetson_multimedia_api ..
make
sudo make install
sudo ldconfig
Expand All @@ -86,8 +86,49 @@ Build with stubs and custom dirs example:
./ffpatch.sh ../ffmpeg
Go to ffmpeg sources directory configure and build ffmpeg with nvmpi enabled and your custom options
cd ../ffmpeg
./configure --enable-nvmpi
make

# install dependencies
sudo apt install libvpx-dev libfdk-aac-dev libx264-dev libx265-dev
sudo apt install nvidia-cuda-toolkit

# clone ffnvcodec
git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
cd nv-codec-headers && sudo make install && cd ~

# configure ffmpeg
export PATH=/usr/local/cuda/bin:$PATH
cd ffmpeg
./configure \
--enable-gpl \
--enable-nonfree \
--enable-shared \
\
--enable-openssl \
\
--enable-protocol=http \
--enable-protocol=https \
--enable-protocol=tcp \
--enable-protocol=tls \
--enable-protocol=file \
--enable-protocol=pipe \
\
--enable-demuxer=mov,matroska,webm,ogg \
--enable-decoder=opus,vorbis,aac,mp3 \
\
--enable-nvmpi \
--enable-cuda \
--enable-cuda-nvcc \
--enable-nvenc \
--enable-nvdec \
--enable-cuvid \
\
--extra-cflags="-I/usr/local/cuda-10.2/targets/aarch64-linux/include -I/usr/src/jetson_multimedia_api/include" \
--extra-ldflags="-L/usr/lib/aarch64-linux-gnu -L/usr/lib/aarch64-linux-gnu/tegra -L/usr/local/cuda-10.2/targets/aarch64-linux/lib" \
--extra-libs="-lcuda -lnvbuf_utils -lnvmedia" \
\
--enable-ffplay

make -j$(nproc)
sudo make install

**3.using**
Expand Down
33 changes: 33 additions & 0 deletions jetson_multimedia_api/LEGAL
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

LEGAL NOTICE
============

ALL NVIDIA DESIGN SPECIFICATIONS, REFERENCE BOARDS, FILES, DRAWINGS, DIAGNOSTICS
, LISTS, AND OTHER DOCUMENTS (TOGETHER AND SEPARATELY, "MATERIALS") ARE BEING
PROVIDED "AS IS." NVIDIA MAKES NO WARRANTIES, EXPRESS, IMPLIED, STATUTORY, OR
OTHERWISE WITH RESPECT TO THE MATERIALS, AND ALL EXPRESS OR IMPLIED CONDITIONS,
REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OR CONDITION OF
TITLE, MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE
AND ON-INFRINGEMENT, ARE HEREBY EXCLUDED TO THE MAXIMUM EXTENT PERMITTED BY LAW.

Information furnished is believed to be accurate and reliable. However, NVIDIA
Corporation assumes no responsibility for the consequences of use of such
information or for any infringement of patents or other rights of third parties
that may result from its use. No license is granted by implication or otherwise
under any patent or patent rights of NVIDIA Corporation. Specifications
mentioned in this publication are subject to change without notice. This
publication supersedes and replaces all information previously supplied. NVIDIA
Corporation products are not authorized for use as critical components in life
support devices or systems without express written approval of NVIDIA
Corporation.

Trademarks
----------
NVIDIA, the NVIDIA logo, CUDA, Jetson, and Tegra are trademarks or registered
trademarks of NVIDIA Corporation in the United States and other countries. Other
company and product names may be trademarks of the respective companies with
which they are associated.

Copyright
---------
2016 by NVIDIA Corporation. All rights reserved
393 changes: 393 additions & 0 deletions jetson_multimedia_api/LICENSE

Large diffs are not rendered by default.

66 changes: 66 additions & 0 deletions jetson_multimedia_api/LICENSE.libnvjpeg
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
Portions of libnvjpeg are derived from libjpeg-8b, provided under the
following terms:

The authors make NO WARRANTY or representation, either express or implied,
with respect to this software, its quality, accuracy, merchantability, or
fitness for a particular purpose. This software is provided "AS IS", and you,
its user, assume the entire risk as to its quality and accuracy.

This software is copyright (C) 1991-2010, Thomas G. Lane, Guido Vollbeding.
All Rights Reserved except as specified below.

Permission is hereby granted to use, copy, modify, and distribute this
software (or portions thereof) for any purpose, without fee, subject to these
conditions:
(1) If any part of the source code for this software is distributed, then this
README file must be included, with this copyright and no-warranty notice
unaltered; and any additions, deletions, or changes to the original files
must be clearly indicated in accompanying documentation.
(2) If only executable code is distributed, then the accompanying
documentation must state that "this software is based in part on the work of
the Independent JPEG Group".
(3) Permission for use of this software is granted only if the user accepts
full responsibility for any undesirable consequences; the authors accept
NO LIABILITY for damages of any kind.

These conditions apply to any software derived from or based on the IJG code,
not just to the unmodified library. If you use our work, you ought to
acknowledge us.

Permission is NOT granted for the use of any IJG author's name or company name
in advertising or publicity relating to this software or products derived from
it. This software may be referred to only as "the Independent JPEG Group's
software".

We specifically permit and encourage the use of this software as the basis of
commercial products, provided that all warranty or liability claims are
assumed by the product vendor.


ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
ansi2knr.c is NOT covered by the above copyright and conditions, but instead
by the usual distribution terms of the Free Software Foundation; principally,
that you must include source code if you redistribute it. (See the file
ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part
of any program generated from the IJG code, this does not limit you more than
the foregoing paragraphs do.

The Unix configuration script "configure" was produced with GNU Autoconf.
It is copyright by the Free Software Foundation but is freely distributable.
The same holds for its supporting scripts (config.guess, config.sub,
ltmain.sh). Another support script, install-sh, is copyright by X Consortium
but is also freely distributable.

The IJG distribution formerly included code to read and write GIF files.
To avoid entanglement with the Unisys LZW patent, GIF reading support has
been removed altogether, and the GIF writer has been simplified to produce
"uncompressed GIFs". This technique does not use the LZW algorithm; the
resulting GIF files are larger than usual, but are readable by all standard
GIF decoders.

We are required to state that
"The Graphics Interchange Format(c) is the Copyright property of
CompuServe Incorporated. GIF(sm) is a Service Mark property of
CompuServe Incorporated."

69 changes: 69 additions & 0 deletions jetson_multimedia_api/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
###############################################################################
#
# Copyright (c) 2016-2020, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of NVIDIA CORPORATION nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
###############################################################################

SUBDIRS = \
samples/00_video_decode \
samples/01_video_encode \
samples/02_video_dec_cuda \
samples/03_video_cuda_enc \
samples/04_video_dec_trt \
samples/05_jpeg_encode \
samples/06_jpeg_decode \
samples/07_video_convert \
samples/08_video_dec_drm \
samples/09_camera_jpeg_capture \
samples/10_camera_recording \
samples/12_camera_v4l2_cuda \
samples/13_multi_camera \
samples/14_multivideo_decode \
samples/15_multivideo_encode \
samples/16_multivideo_transcode \
samples/backend \
samples/frontend \
samples/v4l2cuda \
samples/unittest_samples/decoder_unit_sample \
samples/unittest_samples/encoder_unit_sample \
samples/unittest_samples/transform_unit_sample \
samples/unittest_samples/camera_unit_sample

.PHONY: all
all:
@list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Make in $$subdir";\
$(MAKE) -C $$subdir;\
if [ $$? -ne 0 ]; then exit 1; fi;\
done

.PHONY: clean
clean:
@list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Clean in $$subdir";\
$(MAKE) -C $$subdir clean;\
done
56 changes: 56 additions & 0 deletions jetson_multimedia_api/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
###############################################################################
#
# Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of NVIDIA CORPORATION nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
###############################################################################

Multimedia API is a collection of lower-level APIs that support flexible
application development. The lower-level APIs enable flexibility by
providing better control over the underlying hardware blocks.

Multimedia API includes:

* libargus for imaging applications

* V4L2 API for encoding, decoding, scaling, and other media functions

* NVOSD for On-Screen display

* Buffer Utility for buffer allocation, management, and sharing

* NVDC-DRM for non-X11 and light-weight display system

The included examples demonstrate how to do image processing with
CUDA, object detection and classification with cuDNN, TensorRT and OpenCV usage.

The Multimedia API provides another application development path for those
not using a framework such as GStreamer, or for developers leveraging custom frameworks.

Please go to the following website to download the detailed documenation,
of which name is <L4T Multimedia API Reference>,

https://developer.nvidia.com/embedded/downloads
53 changes: 53 additions & 0 deletions jetson_multimedia_api/argus/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Copyright (c) 2016-2022, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of NVIDIA CORPORATION nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

cmake_minimum_required (VERSION 2.6)

add_subdirectory(apps/camera)
add_subdirectory(samples/bayerAverageMap)
add_subdirectory(samples/cudaBayerDemosaic)
add_subdirectory(samples/cudaHistogram)
add_subdirectory(samples/denoise)
add_subdirectory(samples/eglImage)
add_subdirectory(samples/gstVideoEncode)
add_subdirectory(samples/histogram)
add_subdirectory(samples/l4t_droid)
add_subdirectory(samples/l4tdroid_App)
add_subdirectory(samples/multiSensor)
add_subdirectory(samples/multiStream)
add_subdirectory(samples/oneShot)
add_subdirectory(samples/openglBox)
add_subdirectory(samples/rawBayerOutput)
add_subdirectory(samples/syncSensor)
add_subdirectory(samples/syncStereo)
add_subdirectory(samples/yuvJpeg)
add_subdirectory(samples/userAutoExposure)
add_subdirectory(samples/userAutoWhiteBalance)
add_subdirectory(samples/utils)
add_subdirectory(samples/yuvOneShot)


include(CPack)
26 changes: 26 additions & 0 deletions jetson_multimedia_api/argus/LICENSE.TXT
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Argus Camera API
Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of NVIDIA CORPORATION nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading