Reputation: 2195
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.
Upvotes: 0
Views: 360
Reputation: 2195
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.
Upvotes: 1
Reputation: 481
In the first instance, audio output is probably defaulting to aac, but in most versions of libavcodec, aac requires that you also say "strict=experimental". If you explicitly set acodec=aac, then melt automatically adds that for you. Soon, libavcodec aac encoder will exit experimental state (if it has not already in recent days). In general, you are under-specifying encoding parameters.
In the second instance, how do you know there is no audio? Quicktime does not support MP3 in MP4, and maybe also some other media players.
Upvotes: 1