mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 17:17:14 +08:00
[Streamer] Build without deepstream, add CPU decoder (#1178)
build without deepstream
This commit is contained in:
@@ -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,
|
||||||
|
@@ -30,6 +30,9 @@ FastDeploy Streamer(FDStreamer)是一个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) | 视频硬解码和软解码 |
|
||||||
|
@@ -29,6 +29,9 @@ Install DeepStream 6.1.1 and dependencies manually,or 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 |
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
## 编译和运行
|
## 编译和运行
|
||||||
|
|
||||||
1. 需要先FastDeploy Streamer, 请参考[README](../../../README_CN.md)
|
1. 该示例依赖DeepStream,需要准备DeepStream环境,并编译FastDeploy Streamer,请参考[README](../../../README_CN.md)
|
||||||
|
|
||||||
2. 编译Example
|
2. 编译Example
|
||||||
```
|
```
|
||||||
|
@@ -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
|
||||||
```
|
```
|
||||||
|
@@ -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
|
||||||
```
|
```
|
||||||
|
@@ -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
|
||||||
```
|
```
|
||||||
|
17
streamer/examples/video_decoder/cpp/cpu.yml
Normal file
17
streamer/examples/video_decoder/cpp/cpu.yml
Normal 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
|
@@ -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>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user