Reduced text in README.md
Signed-off-by: James Ketrenos <james.p.ketrenos@intel.com>
This commit is contained in:
parent
d4cca4bca8
commit
39c8eff415
81
README.md
81
README.md
@ -3,70 +3,69 @@
|
|||||||
This project hosts a container demonstrating the use of ffmpeg
|
This project hosts a container demonstrating the use of ffmpeg
|
||||||
using GPU offload for transcode operations.
|
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
|
# Usage examples
|
||||||
|
|
||||||
## Build the container
|
## Getting the container
|
||||||
|
|
||||||
Build the container:
|
You can pull the container from Harbor:
|
||||||
|
|
||||||
```bash
|
|
||||||
docker build . -t intel-media-ffmpeg
|
|
||||||
```
|
|
||||||
|
|
||||||
or you can pull the container from Harbor:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker pull amr-registry.caas.intel.com/vtt-osgc/solutions/intel-media-ffmpeg
|
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
|
docker tag amr-registry.caas.intel.com/vtt-osgc/solutions/intel-media-ffmpeg intel-media-ffmpeg
|
||||||
```
|
```
|
||||||
|
|
||||||
|
or build it yourself:
|
||||||
## Download test content
|
|
||||||
|
|
||||||
You will need some test content to run the following tests. You can download a
|
|
||||||
test stream here:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
[ ! -e media ] && mkdir media
|
docker build . -t intel-media-ffmpeg
|
||||||
wget -q -O media/AUD_MW_E.264 https://fate-suite.libav.org/h264-conformance/AUD_MW_E.264
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Run a set of tests in sequence
|
## Verify hardware access
|
||||||
|
|
||||||
The following will decode, encode, and transcode the sample content:
|
|
||||||
```bash
|
```bash
|
||||||
HOST_MEDIA=$(pwd)/media
|
docker run \
|
||||||
[ ! -e "${HOST_MEDIA}/AUD_MW_E.264" ] && {
|
--rm \
|
||||||
mkdir -p ${HOST_MEDIA}
|
--device=/dev/dri \
|
||||||
wget -q -O ${HOST_MEDIA}/AUD_MW_E.264 https://fate-suite.libav.org/h264-conformance/AUD_MW_E.264
|
-e QSV_DEVICE=${QSV_DEVICE:-/dev/dri/renderD128} \
|
||||||
}
|
-it \
|
||||||
tests=(
|
intel-media-ffmpeg \
|
||||||
"decode AUD_MW_E.264 AUD_MW.yuv"
|
info
|
||||||
"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
|
|
||||||
```
|
```
|
||||||
|
|
||||||
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
|
```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_E.264
|
||||||
AUD_MW.yuv
|
AUD_MW.yuv
|
||||||
AUD_MW_E.h264
|
AUD_MW_E.h264
|
||||||
AUD_MW_E.hevc
|
AUD_MW_E.hevc
|
||||||
AUD_1N-5M.mp4
|
AUD_1N-5M.h264
|
||||||
AUD_1N-4M60FPS.h264
|
AUD_1N-4M60FPS.h264
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ ffmpeg command:
|
|||||||
[s1]scale_qsv=1280:720[o1]; \
|
[s1]scale_qsv=1280:720[o1]; \
|
||||||
[s2]vpp_qsv=framerate=60[o2]" \
|
[s2]vpp_qsv=framerate=60[o2]" \
|
||||||
-y \
|
-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"
|
-map [o2] -c:v h264_qsv -b:v 4M /media/"\${OUT_FILE}-4M60FPS.h264"
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
x
Reference in New Issue
Block a user