Issue:
I’m having problem playing my .mov video after uploaded to my WordPress site. So I installed “Video Embed & Thumbnail Generator” plugin to display and play my video files, but it required FFMPEG or LIBAV for encoding. How do I add FFMPEG or LIBAV to my docker image?
Environment:
Docker, WordPress with Debian image, Video Embed & Thumbnail Generator plugin
Resolution:
Finding what you have and how to install it into your docker container is crucial. Otherwise, it’s pretty straight forward for installing libav-tools to WordPress Debian container. Follow these steps to install video encoding to your docker container.
Step-by-step instructions:-
- Find the name of the container you want to install libav-tools to by executing docker ps -a
- Once you get the name, use following syntax if you are running the same WordPress image that I have shown above.
docker exec wp_tfphotos apt-get install -y libav-tools
- After it installed, check the WordPress image and make sure you can find FFMPEG under /usr/bin folder
docker exec wp_tfphotos ls -li /usr/bin | grep ffmpeg
- Now you can go back to WordPress Admin screen under setting to continue setup your “Video Embed & Thumbnail Generator”.
Enter “/usr/bin” next to path and select “LIBAV” as an application - Scroll down to the bottom of the screen and you should see FFMPEG test data.
- By now, you are ready to upload your first video file and encode with plugin software that required FFMPEG or LIBAV. Upload Issue?
- If encoding is successful, the mp4 file should be listed on your media page. From here you can either embed or create a playlist to display on the post/page. Have fun!
{playlist type="video" ids="634,635"}
Note: replace above “{” bracket with “[” for WordPress playlist embed code
Troubleshoot:
- To verify if encoding is installed:
docker exec [container-name] ls -li /usr/bin
- To get updated package for your container:
docker exec [container-name] apt-get update
Reference: