1
0

Reduced text in README.md

Signed-off-by: James Ketrenos <james.p.ketrenos@intel.com>
This commit is contained in:
James Ketrenos 2019-09-24 15:22:49 -07:00
parent d4cca4bca8
commit 39c8eff415
2 changed files with 41 additions and 42 deletions

View File

@ -3,70 +3,69 @@
This project hosts a container demonstrating the use of ffmpeg
using GPU offload for transcode operations.
The Dockerfile itself is constructed from templates/* and Dockerfile.solution,
and provides a multi-stage Docker container with the final container
being a minimal run-time installation on top of the base OS.
# Usage examples
## Build the container
## Getting the container
Build the container:
```bash
docker build . -t intel-media-ffmpeg
```
or you can pull the container from Harbor:
You can pull the container from Harbor:
```bash
docker pull amr-registry.caas.intel.com/vtt-osgc/solutions/intel-media-ffmpeg
docker tag amr-registry.caas.intel.com/vtt-osgc/solutions/intel-media-ffmpeg intel-media-ffmpeg
```
## Download test content
You will need some test content to run the following tests. You can download a
test stream here:
or build it yourself:
```bash
[ ! -e media ] && mkdir media
wget -q -O media/AUD_MW_E.264 https://fate-suite.libav.org/h264-conformance/AUD_MW_E.264
docker build . -t intel-media-ffmpeg
```
## Run a set of tests in sequence
## Verify hardware access
The following will decode, encode, and transcode the sample content:
```bash
HOST_MEDIA=$(pwd)/media
[ ! -e "${HOST_MEDIA}/AUD_MW_E.264" ] && {
mkdir -p ${HOST_MEDIA}
wget -q -O ${HOST_MEDIA}/AUD_MW_E.264 https://fate-suite.libav.org/h264-conformance/AUD_MW_E.264
}
tests=(
"decode AUD_MW_E.264 AUD_MW.yuv"
"encode AUD_MW.yuv AUD_MW_E.h264"
"transcode AUD_MW_E.264 AUD_MW_E.hevc"
"1N_transcode AUD_MW_E.264 AUD_1N"
)
for test in "${tests[@]}"; do
test=($test)
docker run --rm \
--volume ${HOST_MEDIA}:/media -it \
--device=/dev/dri -e QSV_DEVICE=${QSV_DEVICE:-/dev/dri/renderD128} \
intel-media-ffmpeg ${test[*]} || {
echo "Error: Test failed: ${test[*]}"
break
}
done
docker run \
--rm \
--device=/dev/dri \
-e QSV_DEVICE=${QSV_DEVICE:-/dev/dri/renderD128} \
-it \
intel-media-ffmpeg \
info
```
If successful, looking in ${HOST_MEDIA} should show the following files:
The above will provide information about the software
in the container, as well as the detected Intel graphics
hardware.
If you are in a multicard environment, see Appendix A.
## Test hardware accelerated FFMPEG media operations
```bash
$ ls -1tr "${HOST_MEDIA}"
scripts/test
```
The above will:
1. Download a test content file from fate-suite.libav.org into $(pwd)/media
2. Instantiate the 'intel-media-ffmpeg' container
3. Perfom the following tests:
1. decode AUD_MW_E.264 to AUD_MW.yuv
2. encode AUD_MW.yuv to AUD_MW_E.h264
3. transcode AUD_MW_E.264 to AUD_MW_E.hevc
4. transcode AUD_MW_E.264 to two streams at once, AUD_1N-5M.h264 and AUD_1N-4M60FPS.h264
Once completed, you can check the contents of $(pwd)/media for the following files:
```
AUD_MW_E.264
AUD_MW.yuv
AUD_MW_E.h264
AUD_MW_E.hevc
AUD_1N-5M.mp4
AUD_1N-5M.h264
AUD_1N-4M60FPS.h264
```

View File

@ -38,7 +38,7 @@ ffmpeg command:
[s1]scale_qsv=1280:720[o1]; \
[s2]vpp_qsv=framerate=60[o2]" \
-y \
-map [o1] -c:v h264_qsv -b:v 5M /media/"\${OUT_FILE}-5M.mp4" \
-map [o1] -c:v h264_qsv -b:v 5M /media/"\${OUT_FILE}-5M.h264" \
-map [o2] -c:v h264_qsv -b:v 4M /media/"\${OUT_FILE}-4M60FPS.h264"
EOF