Files
shaka-packager/docs/source/docker_instructions.md
KongQun Yang 82e0fd2095 Default multicast interface address to "0.0.0.0" if absent
It aligns with what a lot of other apps are doing, e.g. tsplay.

Also added notes in docker to adjust network setting if wants to use
multicast in docker container.

Change-Id: I666a8979cc041c904f7ff8e3e022f800c0830d5d
2017-12-04 19:21:52 +00:00

1.4 KiB

Using Docker

Docker is a tool that can package an application and its dependencies in a virtual container to run on different host operating systems.

Get Shaka Packager from Dockerhub

To pull latest Shaka Packager:

$ docker pull google/shaka-packager

You can pull a specific version, e.g. v1.6.2:

$ docker pull google/shaka-packager:release-v1.6.2

The full list of tags is available here.

Run the container

Assume you have your media files stored in host_media_path in the host machine.

This runs the container and maps host_media_path to media in the container:

$ docker run -v /host_media_path/:/media -it --rm google/shaka-packager

Note that the networking in the container is containerized by default, so if you want to access UDP multicast in the host network, you will need to configure the network explicitly. You may do this with --net=host option, i.e.

$ docker run -v /host_media_path/:/media -it --net=host --rm google/shaka-packager

Then in the container, run the packager command, e.g.:

$ packager input=/media/example.mp4,stream=audio,output=/media/audio.mp4 \
           input=/media/example.mp4,stream=video,output=/media/video.mp4 \
           --mpd_output /media/example.mpd

Outputs are available in the host's media folder host_media_path.