[Streamer] Build without deepstream, add CPU decoder (#1178)

build without deepstream
This commit is contained in:
Wang Xinyu
2023-01-28 21:55:12 +08:00
committed by GitHub
parent 2e8632ce37
commit 17cae379c8
10 changed files with 38 additions and 8 deletions

View File

@@ -40,8 +40,6 @@ if(ENABLE_DEEPSTREAM)
link_directories(/opt/nvidia/deepstream/deepstream/lib/) link_directories(/opt/nvidia/deepstream/deepstream/lib/)
list(APPEND ALL_STREAMER_SRCS ${DEEPSTREAM_SRCS}) list(APPEND ALL_STREAMER_SRCS ${DEEPSTREAM_SRCS})
list(APPEND DEPEND_LIBS nvdsgst_meta nvds_meta) list(APPEND DEPEND_LIBS nvdsgst_meta nvds_meta)
else()
message(FATAL_ERROR "Currently, DeepStream is required, we will make it optional later.")
endif() endif()
# Link the yaml-cpp in system path, because deepstream also depends on yaml-cpp, # Link the yaml-cpp in system path, because deepstream also depends on yaml-cpp,

View File

@@ -30,6 +30,9 @@ FastDeploy StreamerFDStreamer是一个AI多媒体流处理框架以Pipe
docker pull nvcr.io/nvidia/deepstream:6.1.1-devel docker pull nvcr.io/nvidia/deepstream:6.1.1-devel
``` ```
### CPU
- GSTreamer 1.14+
## 编译和运行 ## 编译和运行
1. [编译FastDeploy](../docs/cn/build_and_install), 或直接下载[FastDeploy预编译库](../docs/cn/build_and_install/download_prebuilt_libraries.md) 1. [编译FastDeploy](../docs/cn/build_and_install), 或直接下载[FastDeploy预编译库](../docs/cn/build_and_install/download_prebuilt_libraries.md)
@@ -46,9 +49,12 @@ cmake .. -DFASTDEPLOY_INSTALL_DIR=${PWD}/fastdeploy-linux-x64-x.x.x
make -j make -j
``` ```
编译选项:
- ENABLE_DEEPSTREAM是否使用NVIDIA DeepStream非NVIDIA GPU的环境需关闭此选项默认ON
3. 编译和运行Example 3. 编译和运行Example
| Example | 简介 | | Example | 简介 |
|:--|:--| |:--|:--|
| [PP-YOLOE](./examples/ppyoloe) | 多路视频接入PP-YOLOE目标检测NVTracker跟踪硬编解码写入mp4文件 | | [PP-YOLOE](./examples/ppyoloe) | 多路视频接入PP-YOLOE目标检测NVTracker跟踪硬编解码写入mp4文件 |
| [Video Decoder](./examples/video_decoder) | 视频硬解码 | | [Video Decoder](./examples/video_decoder) | 视频硬解码和软解码 |

View File

@@ -29,6 +29,9 @@ Install DeepStream 6.1.1 and dependencies manuallyor use below docker
docker pull nvcr.io/nvidia/deepstream:6.1.1-devel docker pull nvcr.io/nvidia/deepstream:6.1.1-devel
``` ```
### CPU
- GSTreamer 1.14+
## Build ## Build
1. [Build FastDeploy](../docs/en/build_and_install), or download [FastDeploy prebuilt libraries](../docs/en/build_and_install/download_prebuilt_libraries.md) 1. [Build FastDeploy](../docs/en/build_and_install), or download [FastDeploy prebuilt libraries](../docs/en/build_and_install/download_prebuilt_libraries.md)
@@ -45,9 +48,12 @@ cmake .. -DFASTDEPLOY_INSTALL_DIR=${PWD}/fastdeploy-linux-x64-x.x.x
make -j make -j
``` ```
CMake Options:
- ENABLE_DEEPSTREAM, whether to enable NVIDIA DeepStream, ON by default.
3. Build and Run Example 3. Build and Run Example
| Example | Brief | | Example | Brief |
|:--|:--| |:--|:--|
| [PP-YOLOE](./examples/ppyoloe) | Multiple input videos, PP-YOLOE object detection, NvTracker, Hardware codec, writing to mp4 file | | [PP-YOLOE](./examples/ppyoloe) | Multiple input videos, PP-YOLOE object detection, NvTracker, Hardware codec, writing to mp4 file |
| [Video Decoder](./examples/video_decoder) | Video decoding using hardward | | [Video Decoder](./examples/video_decoder) | Video decoding using GPU or CPU |

View File

@@ -4,7 +4,7 @@
## 编译和运行 ## 编译和运行
1. 需要先FastDeploy Streamer, 请参考[README](../../../README_CN.md) 1. 该示例依赖DeepStream需要准备DeepStream环境并编译FastDeploy Streamer请参考[README](../../../README_CN.md)
2. 编译Example 2. 编译Example
``` ```

View File

@@ -4,7 +4,7 @@ English | [简体中文](README_CN.md)
## Build and Run ## Build and Run
1. Build FastDeploy Streamer first, [README](../../../README.md) 1. This example requires DeepStream, please prepare DeepStream environment and build FastDeploy Streamer, refer to [README](../../../README.md)
2. Build Example 2. Build Example
``` ```

View File

@@ -15,6 +15,7 @@ make -j
3. 运行 3. 运行
``` ```
cp ../streamer_cfg.yml . # GPU解码gpu.yml或CPU解码cpu.yml
cp ../gpu.yml streamer_cfg.yml
./video_decoder ./video_decoder
``` ```

View File

@@ -15,6 +15,7 @@ make -j
3. Run 3. Run
``` ```
cp ../streamer_cfg.yml . # GPU decoding(gpu.yml) or CPU decoding(cpu.yml)
cp ../gpu.yml streamer_cfg.yml
./video_decoder ./video_decoder
``` ```

View File

@@ -0,0 +1,17 @@
app:
type: video_decoder
enable-perf-measurement: true
perf-measurement-interval-sec: 5
uridecodebin:
uri: file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_ride_bike.mov
videoconvert:
capsfilter:
caps: video/x-raw,format=(string)BGR
appsink:
sync: true
max-buffers: 60
drop: false

View File

@@ -14,6 +14,7 @@
#pragma once #pragma once
#include "fastdeploy/core/fd_type.h" #include "fastdeploy/core/fd_type.h"
#include "fastdeploy/runtime/enum_variables.h"
#include "fastdeploy/utils/perf.h" #include "fastdeploy/utils/perf.h"
#include <gst/gst.h> #include <gst/gst.h>