Skip to content

Instantly share code, notes, and snippets.

@sandman
Forked from corenel/README.md
Last active February 11, 2021 18:57
Show Gist options
  • Save sandman/c721c539916e8486b7de4368ce7f28c2 to your computer and use it in GitHub Desktop.
Save sandman/c721c539916e8486b7de4368ce7f28c2 to your computer and use it in GitHub Desktop.

Revisions

  1. sandman revised this gist Feb 11, 2021. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -28,6 +28,7 @@ cp include/nvcuvid.h /path/to/gst-plugins-bad/sys/nvdec

    3. Build plugins

    Build NVENC:
    ```shell
    cd /path/to/gst-plugins-bad
    NVENCODE_CFLAGS="-I/path/to/gst-plugins-bad/sys/nvenc" ./autogen.sh --with-cuda-prefix="/usr/local/cuda"
    @@ -37,6 +38,9 @@ make
    Below line is necessary only if you are installing into the native GStreamer environment. If you are installing into a sandbox ("uninstalled") setup, then it should be skipped.
    ```shell
    sudo cp .libs/libgstnvenc.so /usr/lib/x86_64-linux-gnu/gstreamer-1.0/
    ```
    Now build NVDEC:
    ```shell
    cd ../nvdec
    make
    ```
  2. sandman revised this gist Feb 11, 2021. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -33,9 +33,15 @@ cd /path/to/gst-plugins-bad
    NVENCODE_CFLAGS="-I/path/to/gst-plugins-bad/sys/nvenc" ./autogen.sh --with-cuda-prefix="/usr/local/cuda"
    cd sys/nvenc
    make
    ```
    Below line is necessary only if you are installing into the native GStreamer environment. If you are installing into a sandbox ("uninstalled") setup, then it should be skipped.
    ```shell
    sudo cp .libs/libgstnvenc.so /usr/lib/x86_64-linux-gnu/gstreamer-1.0/
    cd ../nvdec
    make
    ```
    Below line is necessary only if you are installing into the native GStreamer environment. If you are installing into a sandbox ("uninstalled") setup, then it should be skipped.
    ```shell
    sudo cp .libs/libgstnvdec.so /usr/lib/x86_64-linux-gnu/gstreamer-1.0/
    ```

  3. @corenel corenel revised this gist Mar 31, 2020. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -23,7 +23,7 @@ cd /path/to/video/codec/sdk
    cp /usr/local/cuda/include/cuda.h /path/to/gst-plugins-bad/sys/nvenc
    cp include/nvEncodeAPI.h /path/to/gst-plugins-bad/sys/nvenc
    cp include/cuviddec.h /path/to/gst-plugins-bad/sys/nvdec
    cp include/nvcuvid.h /path/to/gst-plugins-bad/sys/nvdev
    cp include/nvcuvid.h /path/to/gst-plugins-bad/sys/nvdec
    ```

    3. Build plugins
    @@ -42,8 +42,8 @@ sudo cp .libs/libgstnvdec.so /usr/lib/x86_64-linux-gnu/gstreamer-1.0/
    4. Check installation

    ```shell
    gst-insplect-1.0 | grep nvenc
    gst-insplect-1.0 | grep nvdec
    gst-inspect-1.0 | grep nvenc
    gst-inspect-1.0 | grep nvdec
    ```

    ### References
  4. @corenel corenel created this gist Sep 11, 2019.
    51 changes: 51 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,51 @@
    ## Install NVDEC and NVENC as GStreamer plugins

    ### Environment

    - Ubuntu 18.04
    - NVIDIA driver 430.40
    - NVIDIA Video Codec SDK 9.0.20

    ### Steps

    1. Clone the `gst-plugins-bad` and check out to the same version as GStreamer

    ```shell
    git clone git://anongit.freedesktop.org/gstreamer/gst-plugins-bad
    cd gst-plugins-bad/
    git checkout 1.14.0
    ```

    2. Download [NVIDIA Video Codec SDK](https://developer.nvidia.com/nvidia-video-codec-sdk) and copy header files

    ```shell
    cd /path/to/video/codec/sdk
    cp /usr/local/cuda/include/cuda.h /path/to/gst-plugins-bad/sys/nvenc
    cp include/nvEncodeAPI.h /path/to/gst-plugins-bad/sys/nvenc
    cp include/cuviddec.h /path/to/gst-plugins-bad/sys/nvdec
    cp include/nvcuvid.h /path/to/gst-plugins-bad/sys/nvdev
    ```

    3. Build plugins

    ```shell
    cd /path/to/gst-plugins-bad
    NVENCODE_CFLAGS="-I/path/to/gst-plugins-bad/sys/nvenc" ./autogen.sh --with-cuda-prefix="/usr/local/cuda"
    cd sys/nvenc
    make
    sudo cp .libs/libgstnvenc.so /usr/lib/x86_64-linux-gnu/gstreamer-1.0/
    cd ../nvdec
    make
    sudo cp .libs/libgstnvdec.so /usr/lib/x86_64-linux-gnu/gstreamer-1.0/
    ```

    4. Check installation

    ```shell
    gst-insplect-1.0 | grep nvenc
    gst-insplect-1.0 | grep nvdec
    ```

    ### References

    - [DeepStream ContainerでH264ハードウエアエンコーダーを使う](https://weblog.hirozo.net/?p=541)