Updated to set multi-card config
Signed-off-by: James P. Ketrenos <james.p.ketrenos@intel.com>
This commit is contained in:
parent
d68b3d435c
commit
493bb26732
35
README.md
35
README.md
@ -32,21 +32,38 @@ wget https://fate-suite.libav.org/h264-conformance/AUD_MW_E.264
|
||||
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
|
||||
|
||||
H264 video decode and save as raw file:
|
||||
|
||||
### Connect to container
|
||||
```bash
|
||||
QSV_DEVICE=${QSV_DEVICE:-/dev/dri/renderD128}
|
||||
docker run \
|
||||
--rm \
|
||||
--device=/dev/dri \
|
||||
--volume $(pwd)/media:/media \
|
||||
-it \
|
||||
intel-media-ffmpeg \
|
||||
ffmpeg -hwaccel qsv -c:v h264_qsv -i /media/AUD_MW_E.264 \
|
||||
-vf hwdownload,format=nv12 -pix_fmt yuv420p \
|
||||
/media/AUD_MW.yuv
|
||||
ffmpeg -hwaccel qsv -qsv_device ${QSV_DEVICE} \
|
||||
-c:v h264_qsv -i /media/AUD_MW_E.264 \
|
||||
-vf hwdownload,format=nv12 -pix_fmt yuv420p \
|
||||
/media/AUD_MW.yuv
|
||||
```
|
||||
|
||||
### Encode
|
||||
@ -54,6 +71,7 @@ docker run \
|
||||
Encode a 10 frames of 720p raw input as H264 with 5Mbps using VBR mode:
|
||||
|
||||
```bash
|
||||
QSV_DEVICE=${QSV_DEVICE:-/dev/dri/renderD128}
|
||||
docker run \
|
||||
--rm \
|
||||
--device=/dev/dri \
|
||||
@ -73,27 +91,30 @@ docker run \
|
||||
H264 decode && H265 encode with 5Mbps using VBR
|
||||
|
||||
```bash
|
||||
QSV_DEVICE=${QSV_DEVICE:-/dev/dri/renderD128}
|
||||
docker run \
|
||||
--rm \
|
||||
--device=/dev/dri \
|
||||
--volume $(pwd)/media:/media \
|
||||
-it \
|
||||
intel-media-ffmpeg \
|
||||
ffmpeg -hwaccel qsv -c:v h264_qsv -i /media/AUD_MW_E.264 \
|
||||
-c:v hevc_qsv -b:v 5M AUD_MW_E.hevc
|
||||
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
|
||||
```
|
||||
|
||||
1:N transcoding
|
||||
|
||||
```bash
|
||||
QSV_DEVICE=${QSV_DEVICE:-/dev/dri/renderD128}
|
||||
docker run \
|
||||
--rm \
|
||||
--device=/dev/dri \
|
||||
--volume $(pwd)/media:/media \
|
||||
-it \
|
||||
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 \
|
||||
-filter_complex "split=2[s1][s2]; \
|
||||
[s1]scale_qsv=1280:720[o1]; \
|
||||
[s2]vpp_qsv=framerate=60[o2]" \
|
||||
|
Loading…
x
Reference in New Issue
Block a user