Files
rocm-systems/projects/rocdecode/samples/videoDecodeMultiFiles/README.md
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 строки
1.9 KiB
Markdown
Исходник Обычный вид История

2024-01-26 05:19:24 -08:00
# Video decode multi files sample
2024-02-09 10:31:44 -08:00
The video decodes multiple files sample illustrates the use of providing a list of files as input to showcase the reconfigure option in the rocDecode library. The input video files have to be of the same codec type to use the reconfigure option but can have different resolutions or resize parameters.
2024-02-09 10:31:44 -08:00
The reconfigure option can be disabled by the user if needed. The input file is parsed line by line and data is stored in a queue. The individual video files are demuxed and decoded one after the other in a loop. Output for each input file can also be stored if needed.
2024-01-26 05:19:24 -08:00
## Prerequisites:
2024-01-26 05:19:24 -08:00
* Install [rocDecode](../../README.md#build-and-install-instructions)
2024-01-26 05:19:24 -08:00
* [FFMPEG](https://ffmpeg.org/about.html)
2024-01-26 05:19:24 -08:00
* On `Ubuntu`
2024-01-26 05:19:24 -08:00
```shell
2025-01-02 06:42:31 -08:00
sudo apt install libavcodec-dev libavformat-dev libavutil-dev
```
2024-01-26 05:19:24 -08:00
* On `RHEL`/`SLES` - install ffmpeg development packages manually or use [rocDecode-setup.py](../../rocDecode-setup.py) script
## Build
2024-01-26 05:19:24 -08:00
```shell
mkdir video_decode_multi_files_sample && cd video_decode_multi_files_sample
cmake ../
make -j
```
2024-01-26 05:19:24 -08:00
## Run
2024-01-26 05:19:24 -08:00
```shell
./videodecodemultifiles -i <input file list[required - example.txt]>
-d <GPU device ID - 0:device 0 / 1:device 1/ ... [optional - default:0]>
-use_reconfigure <flag (bool - 0/1) [optional - default: 1] set 0 to disable reconfigure api for decoding multiple files. Only resolution changes between files are supported when reconfigure is enabled. The codec, bit_depth, and the chroma_format must be the same between files>
```
2024-01-26 05:19:24 -08:00
### Note: Example input file list - example.txt
```shell
infile input1.[mp4/mov...] [required]
outfile output1.yuv [optional]
z 0 [optional]
sei 0 [optional]
crop l,t,r,b [optional]
m 0 [optional] [0 : OUT_SURFACE_MEM_DEV_INTERNAL/ 1 : OUT_SURFACE_MEM_DEV_COPIED/ 2 : OUT_SURFACE_MEM_HOST_COPIED/ 3 : OUT_SURFACE_MEM_NOT_MAPPED]
infile input2.[mp4/mov...] [optional]
outfile output2.yuv [optional]
...
...
2024-01-26 05:19:24 -08:00
```