I am using Docker to create a container for video processing using the melt
command. All videos output at the moment do not include any audio.
Here's the Dockerfile:
FROM ubuntu
RUN apt-get update
RUN apt-get install -y melt swh-plugins
WORKDIR /input
CMD [ "melt", "input.mp4", "-consumer", "avformat:/output/output.mp4" ]
When I run the container, I get the following error:
consumer_avformat.c: Unable to encode audio - disabling audio output.
I suspect this tells you a lot. However, I have tried running the command as:
melt input.mp4 -consumer avformat:/output/output.mp4 acodec=libmp3lame
... when I do, I do not get the error, but there is still no audio in the output file.
Because I don't really understand audio processing, I'm not sure if I'm missing plugins or somehow otherwise not specifying a requirement. Should be a relatively easy fix for someone who knows their way around Docker and multimedia.
It turns out that I needed to install the ubuntu-restricted-extras
package to my Dockerfile. Once that was in place, everything works as expected.