1
0

Updated to set multi-card config

Signed-off-by: James P. Ketrenos <james.p.ketrenos@intel.com>
This commit is contained in:
James P. Ketrenos 2019-09-17 15:53:35 -07:00
parent d68b3d435c
commit 493bb26732

View File

@ -32,19 +32,36 @@ wget https://fate-suite.libav.org/h264-conformance/AUD_MW_E.264
cd .. cd ..
``` ```
**NOTE:** In each of the following, if you have a multi-card host system
you may need to change the qsv_device used by changing QSV_DEVICE
to whichever node is connected to your hardware.
You can find out the paths via:
```
ls -l /dev/dri/by-path/pci-*$(lspci | grep Intel.*Graphics | cut -d " " -f1)*
```
On my system, my Intel graphics adapter is /dev/dri/renderD129, so I use:
```
export QSV_DEVICE=/dev/dri/renderD129
```
## Decode ## Decode
H264 video decode and save as raw file: H264 video decode and save as raw file:
### Connect to container ### Connect to container
```bash ```bash
QSV_DEVICE=${QSV_DEVICE:-/dev/dri/renderD128}
docker run \ docker run \
--rm \ --rm \
--device=/dev/dri \ --device=/dev/dri \
--volume $(pwd)/media:/media \ --volume $(pwd)/media:/media \
-it \ -it \
intel-media-ffmpeg \ intel-media-ffmpeg \
ffmpeg -hwaccel qsv -c:v h264_qsv -i /media/AUD_MW_E.264 \ ffmpeg -hwaccel qsv -qsv_device ${QSV_DEVICE} \
-c:v h264_qsv -i /media/AUD_MW_E.264 \
-vf hwdownload,format=nv12 -pix_fmt yuv420p \ -vf hwdownload,format=nv12 -pix_fmt yuv420p \
/media/AUD_MW.yuv /media/AUD_MW.yuv
``` ```
@ -54,6 +71,7 @@ docker run \
Encode a 10 frames of 720p raw input as H264 with 5Mbps using VBR mode: Encode a 10 frames of 720p raw input as H264 with 5Mbps using VBR mode:
```bash ```bash
QSV_DEVICE=${QSV_DEVICE:-/dev/dri/renderD128}
docker run \ docker run \
--rm \ --rm \
--device=/dev/dri \ --device=/dev/dri \
@ -73,27 +91,30 @@ docker run \
H264 decode && H265 encode with 5Mbps using VBR H264 decode && H265 encode with 5Mbps using VBR
```bash ```bash
QSV_DEVICE=${QSV_DEVICE:-/dev/dri/renderD128}
docker run \ docker run \
--rm \ --rm \
--device=/dev/dri \ --device=/dev/dri \
--volume $(pwd)/media:/media \ --volume $(pwd)/media:/media \
-it \ -it \
intel-media-ffmpeg \ intel-media-ffmpeg \
ffmpeg -hwaccel qsv -c:v h264_qsv -i /media/AUD_MW_E.264 \ ffmpeg -hwaccel qsv -qsv_device ${QSV_DEVICE} \
-c:v h264_qsv -i /media/AUD_MW_E.264 \
-c:v hevc_qsv -b:v 5M AUD_MW_E.hevc -c:v hevc_qsv -b:v 5M AUD_MW_E.hevc
``` ```
1:N transcoding 1:N transcoding
```bash ```bash
QSV_DEVICE=${QSV_DEVICE:-/dev/dri/renderD128}
docker run \ docker run \
--rm \ --rm \
--device=/dev/dri \ --device=/dev/dri \
--volume $(pwd)/media:/media \ --volume $(pwd)/media:/media \
-it \ -it \
intel-media-ffmpeg \ intel-media-ffmpeg \
ffmpeg -hwaccel qsv -c:v h264_qsv \ ffmpeg -hwaccel qsv -qsv_device ${QSV_DEVICE} \
-i /media/AUD_MW_E.264 \ -c:v h264_qsv -i /media/AUD_MW_E.264 \
-filter_complex "split=2[s1][s2]; \ -filter_complex "split=2[s1][s2]; \
[s1]scale_qsv=1280:720[o1]; \ [s1]scale_qsv=1280:720[o1]; \
[s2]vpp_qsv=framerate=60[o2]" \ [s2]vpp_qsv=framerate=60[o2]" \