Medialooks provides Docker images with the SDK installed, one for MFormats SDK and one for MPlatform SDK. They suit server tasks without a screen or capture cards, such as file and network transcoding.
Images
MFormats SDK:
docker pull f.docker.medialooks.net:5000/docker/cloud_sdk_cpp_win_vs17:tests-mformats
MPlatform SDK:
docker pull f.docker.medialooks.net:5000/docker/cloud_sdk_cpp_win_vs17:tests-mplatform
Prepare the host
The images are Windows containers, so they run only on a Windows host:
- Turn on the Hyper-V Windows feature.
- Install Docker Desktop.
- Switch Docker Desktop to Windows containers.
After you pull an image, run a container interactively (docker run -it <image>) or build your own image with a Dockerfile.
Dockerfile example
This example runs the MFormats C++ sample SampleFileTranscodingConsole.exe. Its project is in C:\Program Files (x86)\Medialooks\MFormats SDK\Samples\C++\Sample File Transcoding Console. Build it for x64 and put the executable into the x64 folder next to the Dockerfile:
FROM f.docker.medialooks.net:5000/docker/cloud_sdk_cpp_win_vs17:tests-mformats
WORKDIR /app
COPY x64/ /app/
# Folder for the input files, shared with the host
RUN mkdir C:\input
ENTRYPOINT ["SampleFileTranscodingConsole.exe"]
# Default arguments, can be replaced in docker run
CMD ["C:\\input\\1.mp4", "udp://192.168.10.111:12345", "-c", "23"]
The sample takes the input file, the output file or URL and options: -c is the number of the output format, -v of the video codec and -a of the audio codec in the writer's lists. Without an option, the writer's default is used. -v works only with -c, and -a only with -v. With a wrong number, for example -c 0 -v 0, the sample prints the numbered lists and asks for the numbers, so run it like this once with docker run -it to see the lists.
Build the image and run it with C:\input of the host shared with the container:
docker build -t mediatranscoder .
docker run -v "C:\input:C:\input" mediatranscoder
Other arguments replace the default ones:
docker run --rm -v "C:\input:C:\input" mediatranscoder "C:\input\1.mp4" "udp://192.168.10.111:12345" -c 23 -v 6 -a 1
Limitations
- Video is processed on the CPU.
- No preview.
- SDI cards and other hardware devices are not supported.
- NDI input and output work when the container network is set up for them.
- The only hardware encoder that works is Intel Quick Sync. Run the container with these parameters to give it the GPU:
--isolation=process --device class/5B45201D-F2F2-4F3B-85BB-30FF1F953599
Still have questions?
Tell us what didn’t work or what you’d like clarified.