In an unscientific test, I converted the same 15 second sample mkv file with the docker ffmpeg image 3 times (just running the same command thrice with the exact same settings).
Commands used:
OS X:
ffmpeg -loglevel panic -y -i bpsample.mkv -t 15 -c:v hevc -an time1.mkv
Docker command:
docker run -v $PWD:/tmp jrottenberg/ffmpeg:ubuntu -stats -loglevel panic -y -i /tmp/bpsample.mkv -c:v hevc -t 15 /tmp/bp2.mkv
The runtimes are as follows:
15 seconds HEVC Native (OS X)
encoded 360 frames in 214.20s (1.68 fps), 4089.61 kb/s, Avg QP:29.61
encoded 360 frames in 215.98s (1.67 fps), 4089.61 kb/s, Avg QP:29.61
encoded 360 frames in 212.39s (1.70 fps), 4089.61 kb/s, Avg QP:29.61
15 seconds HEVC ffmpeg:ubuntu
encoded 360 frames in 182.54s (1.97 fps), 3841.88 kb/s, Avg QP:30.23
encoded 360 frames in 180.30s (2.00 fps), 3841.88 kb/s, Avg QP:30.23
encoded 360 frames in 177.16s (2.03 fps), 3841.88 kb/s, Avg QP:30.23
15 seconds HEVC ffmpeg:alpine
encoded 360 frames in 361.50s (1.00 fps), 3843.88 kb/s, Avg QP:29.81
encoded 360 frames in 376.31s (0.96 fps), 3843.88 kb/s, Avg QP:29.81
encoded 360 frames in 376.07s (0.96 fps), 3843.88 kb/s, Avg QP:29.81
Why would the alpine image run slower than the ubuntu image? And furthermore how is it possible that, with the layer of virtualization on OS X, that the ubuntu image can be faster than natively running in OS X?