Updated README with quick hero steps
Signed-off-by: James Ketrenos <james.p.ketrenos@intel.com>
This commit is contained in:
parent
688c169942
commit
3eb145d455
64
README.md
64
README.md
@ -10,13 +10,49 @@ base OS.
|
||||
|
||||
# Usage examples
|
||||
|
||||
## Getting the container
|
||||
Two step from zero-to-hero:
|
||||
|
||||
1. Download some test content
|
||||
2. Transcode with a pre-built container
|
||||
|
||||
## Download content
|
||||
|
||||
The following will download the Blender TearsOfSteel video:
|
||||
|
||||
```bash
|
||||
mkdir $(pwd)media
|
||||
wget -O $(pwd)/media/TearsOfSteel.mp4 \
|
||||
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/TearsOfSteel.mp4
|
||||
```
|
||||
|
||||
## Transcode with a pre-built container
|
||||
|
||||
The following will transcode 'TearsOfSteal.mp4' from AVC (H.264) to a
|
||||
5Mbps HEVC (H.265) stream using the GPU.
|
||||
|
||||
```bash
|
||||
docker run \
|
||||
--device=/dev/dri \
|
||||
--volume $(pwd)/media:/media \
|
||||
amr-registry.caas.intel.com/vtt-osgc/solutions/intel-media-ffmpeg:ubuntu-eoan \
|
||||
ffmpeg \
|
||||
-hwaccel qsv \
|
||||
-qsv_device ${QSV_DEVICE:-/dev/dri/renderD128} \
|
||||
-c:v h264_qsv \
|
||||
-i /media/TearsOfSteel.mp4" \
|
||||
-c:v hevc_qsv \
|
||||
-b:v 5M \
|
||||
-y \
|
||||
/media/TearsOfSteel-5M.mp4
|
||||
```
|
||||
|
||||
# Getting the container
|
||||
|
||||
You can get the intel-media-ffmpeg container by either building it
|
||||
yourself from the Dockerfile, or by pulling a pre-built image from
|
||||
Intel's Harbor instance.
|
||||
|
||||
### Pull from Harbor
|
||||
## Pull from Harbor
|
||||
|
||||
```bash
|
||||
export OS_DISTRO=ubuntu
|
||||
@ -26,7 +62,7 @@ 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:${TAG} intel-media-ffmpeg
|
||||
```
|
||||
|
||||
### Build Ubuntu container
|
||||
## Build Ubuntu container
|
||||
|
||||
NOTE: Ubuntu 19.10 eoan packages have not been pushed to
|
||||
repositories.intel.com yet. 'PACKAGE_REPOSITORY' is set to
|
||||
@ -43,7 +79,7 @@ scripts/build-dockerfile.sh
|
||||
scripts/build-image.sh
|
||||
```
|
||||
|
||||
### Build Red Hat container
|
||||
## Build Red Hat container
|
||||
|
||||
```bash
|
||||
export OS_DISTRO=rhel
|
||||
@ -55,7 +91,7 @@ scripts/build-dockerfile.sh
|
||||
scripts/build-image.sh
|
||||
```
|
||||
|
||||
## Verify hardware access
|
||||
# Verify hardware access
|
||||
|
||||
```bash
|
||||
TAG=${TAG:-latest}
|
||||
@ -74,7 +110,7 @@ hardware.
|
||||
|
||||
If you are in a multicard environment, see Appendix A.
|
||||
|
||||
## Test hardware accelerated FFMPEG media operations
|
||||
# Test hardware accelerated FFMPEG media operations
|
||||
|
||||
First download test content into ./media, then launch
|
||||
the Docker container mounting that path to the /media
|
||||
@ -119,7 +155,7 @@ AUD_1N-5M.h264
|
||||
AUD_1N-4M60FPS.h264
|
||||
```
|
||||
|
||||
## Want a longer transcode test?
|
||||
# Want a longer transcode test?
|
||||
|
||||
The following snippet will download the Blender video 'TearsOfSteel'
|
||||
which is available as H.264 AVC, and then use a pre-built ffmpeg
|
||||
@ -128,7 +164,7 @@ container to transcode the stream to 5Mbps H.265 HEVC using the GPU.
|
||||
```bash
|
||||
TAG=${TAG:-latest}
|
||||
mkdir $(pwd)/media
|
||||
wget -O $(pwd)/media/TeersOfSteel.mp4 \
|
||||
wget -O $(pwd)/media/TearsOfSteel.mp4 \
|
||||
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/TearsOfSteel.mp4
|
||||
docker run \
|
||||
--rm \
|
||||
@ -140,7 +176,7 @@ docker run \
|
||||
transcode TearsOfSteel.mp4 TearsOfSteel-5M.mp4
|
||||
```
|
||||
|
||||
## Launch a shell in the container
|
||||
# Launch a shell in the container
|
||||
|
||||
The examples below are all assumed to be running in the container's environment:
|
||||
|
||||
@ -155,7 +191,7 @@ docker run \
|
||||
shell
|
||||
```
|
||||
|
||||
### Decode
|
||||
## Decode
|
||||
|
||||
AVC (H.264) video decode and save as YUV 420P raw file:
|
||||
|
||||
@ -174,7 +210,7 @@ OUT_FILE=AUD_MW.yuv
|
||||
/media/"${OUT_FILE}"
|
||||
```
|
||||
|
||||
### Encode
|
||||
## Encode
|
||||
|
||||
Encode a 10 frames of 720p raw input as H264 with 5Mbps using VBR mode:
|
||||
|
||||
@ -200,9 +236,9 @@ OUT_FILE=AUD_MW_E.h264
|
||||
/media/"${OUT_FILE}"
|
||||
```
|
||||
|
||||
### Transcode
|
||||
## Transcode
|
||||
|
||||
#### AVC (H.264) => HEVC (H.265) with 5Mbps using VBR
|
||||
### AVC (H.264) => HEVC (H.265) with 5Mbps using VBR
|
||||
|
||||
**NOTE**: Run the following in the container launched previously.
|
||||
|
||||
@ -221,7 +257,7 @@ OUT_FILE=AUD_MW_E.hevc
|
||||
/media/"${OUT_FILE}"
|
||||
```
|
||||
|
||||
#### 1:N transcoding
|
||||
### 1:N transcoding
|
||||
|
||||
**NOTE**: Run the following in the container launched previously.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user