ffmpeg (avcodeclib) & png support - windows

I'm building ffmpeg libraries on Windows with a --enable-decoder=png switch. However, after successful build, there is no png support. Any ideas what went wrong?

For me the issue was Zlib, FFmpeg will only include PNG support if Zlib is found
wget zlib.net/zlib-1.2.8.tar.xz
tar xf zlib-1.2.8.tar.xz
cd zlib-1.2.8
make -f win32/Makefile.gcc install \
PREFIX=$HOST- \
DESTDIR=$PREFIX \
BINARY_PATH=/bin \
INCLUDE_PATH=/include \
LIBRARY_PATH=/lib
Example

I am assuming you are using Cygwin. Most probably you do not have libpng installed in your Cygwin installation. To install, you need to launch the "setup.exe", which is what you have used to install your Cygwin environment, and find "png" under the installation package. Update and you are ready to use png with your ffmpeg program.

Related

Speex encode in terminal MAC OS but command not found

I want to convert spx file to WAV file use speexdec command in MAC terminal. find OtherResources -name "*.spx" -execdir sh -c 'spx={};speexdec $spx ${spx%.*}.wav' \ and got sh: speexdec: command not found I used Macports to install speex sudo port install speex. I am searching for a long time on net. But no use. Please help or try to give some ideas how to achieve this.
It seems that both homebrew and Macports install speex doesn't solove this problem on Mac.
You should build speex from source code .
Follow these steps :
Download source code from here
Open terminal in source code folder
./configure
make
sudo make install
Then run your convert command.
PS: You can find this problem in pyglossary issue

Can someone help me to install the netflix's VMAF library in Ubuntu

First of all, I have to say that I am not very experienced in ubuntu.
I would like to install this library to use with FFMPEG.
I am following these steps, but I can manage to install it well...
https://github.com/Netflix/vmaf/blob/master/resource/doc/VMAF_Python_library.md
Could someone tell me what are the exact steps (commands) that I have to follow.
On the other hand, someone knows if there are other metrics that can ffmpeg calculates directly (apart from PSNR or SSIM)?
Many thanks
The link you provided is just to install the VMAF python library. To use VMAF with ffmpeg you need to install libvmaf first and then compile ffmpeg with libvmaf filter enabled. However, as one user suggests, you can use already compiled ffmpeg packages https://www.johnvansickle.com/ffmpeg/
Moving to your questions. These are the step by step I followed to install FFmpeg+VMAF over an Ubuntu 20.04:
Installing dependencies:
apt update -qq
apt install pkg-config -y
apt-get install --no-install-recommends\
ninja-build \
python3 \
python3-pip \
python3-setuptools \
python3-wheel \
ninja-build \
wget \
doxygen \
autoconf \
automake \
cmake \
g++ \
gcc \
pkg-config \
make \
nasm \
yasm -y
pip3 install --user meson
Installing libvmaf:
export PATH="$PATH:$HOME/.local/bin"
wget https://github.com/Netflix/vmaf/archive/v1.5.1.tar.gz
tar -xzf v1.5.1.tar.gz
cd vmaf-1.5.1/libvmaf/
meson build --buildtype release
ninja -vC build
ninja -vC build test
ninja -vC build install
Installing ffmpeg:
wget https://ffmpeg.org/releases/ffmpeg-4.2.2.tar.bz2 && tar xjf ffmpeg-4.2.2.tar.bz2
cd ffmpeg-4.2.2
./configure --enable-libvmaf --enable-version3
make
make install
Sometimes, depending on your OS, you also need to setup your $PATH, $LD_LIBRARY_PATH, $PKG_CONFIG_PATH.
Download an already compiled ffmpeg from johnvansickle.com. It supports the libvmaf filter. For instructions on how to install it see the FAQ.
Here is a detailed guide on OTTVerse for compiling and installing FFmpeg with VMAF support on Ubuntu 18.04. It shouldn't take you more than a few minutes.
Be aware, that VMAF's libvmaf library will soon be dropped and replaced with a new library called libvmaf_rc. Hopefully, its compilation with FFmpeg will remain smooth as well.
sudo apt-get install nasm doxygen ninja-build meson
Download VMAF source from here and extract it.
cd into the vmaf source code folder.
cd into the libvmaf folder.
meson build --buildtype release
ninja -vC build
ninja -vC build install
Download ffmpeg source code from here.
Extract the source code and cd into the ffmpeg source code folder.
./configure --enable-gpl --enable-libx264 --enable-libx265 --enable-nonfree --enable-libvmaf --enable-version3
sudo make
sudo make install
Add the following export line to ~/.bashrc or ~/.bash_profile: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/x86_64-linux-gnu/.
Run source ~/.bashrc or source ~/.bash_profile.
Attribution.

Where to find old ffmpeg/ffprobe documentation?

There are several different versions of ffmpeg and ffprobe flying around, and each version has a different API.
If I apt-get install ffmpeg on Ubuntu 16.04, I get ffmpeg version 2.8.15-0ubuntu0.16.04.1. If I install apt-get install ffmpeg on Ubuntu 18.04, I get version 3.4.4-0ubuntu0.18.04.1.
When I visit the ffmpeg documentation, it says "The following documentation is regenerated nightly, and corresponds to the newest FFmpeg revision. Consult your locally installed documentation for older versions." That is, the hosted documentation is neither of those two versions.
So I have two questions:
What does it mean "your locally installed documentation"? Is it only talking about man ffmpeg? Or is there some way to host the documentation as a webpage?
Are there any places that simply host the older versions of the ffmpeg documentation?
For anyone who uses docker and wants to just host the docs without thinking too much, this is the Dockerfile I came up with.
FROM ubuntu:18.04
# Install requirements for ffmpeg doc generation
RUN apt-get update && apt-get install -y git build-essential texinfo yasm
# Install requirements for minimal webserver
RUN apt-get install -y webfs mime-support && update-mime
RUN git clone https://git.ffmpeg.org/ffmpeg.git
# Checkout the version that you want
RUN cd ffmpeg \
&& git checkout tags/n2.8.15 \
&& ./configure \
&& make doc
WORKDIR /ffmpeg/doc
CMD webfsd -F -p 80
Then you can
docker build -t ffmpeg-doc .
docker run --rm -it -p 80:80 ffmpeg-doc
And visit http://localhost for the list of generated files. The common ones will be http://localhost/ffmpeg.html or http://localhost/ffprobe.html.
What does it mean "your locally installed documentation"? Is it only talking about man ffmpeg?
It is referring to the various man pages and ffmpeg -h.
Are there any places that simply host the older versions of the ffmpeg documentation?
You can make it yourself. Install the build-essential and texinfo packages, download the source code for your FFmpeg version, then make the HTML documentation:
./configure
make doc
The HTML files will be located in the doc directory.
Alternatively, and more recommended, download or compile a recent version from the git master branch and use the online documentation.

How to install ffmpeg on CentOS 6

I have been trying to install ffmpeg for 2 days now and had no luck. I have tried countless videos on youtube, step by steps on google with no luck. Any help would be great.
I have a Centos 6 server.
Yes I am using root ssh in terminal on mac.
Commands I tried are:
wget http://mirror.ffmpeginstaller.com/old/scripts/ffmpeg8/ffmpeginstaller.8.0. tar.gz
tar -xvzf ffmpeginstaller.8.0.tar.gz
cd ffmpeginstaller.8.0
./install.sh
Static build
Easiest method is to download a recent version that is already compiled.
Download a static build of ffmpeg from https://www.johnvansickle.com/ffmpeg/
Extract the archive file you just downloaded from the above site
(optional) Copy or move the ffmpeg file into /usr/local/bin
Compile
If you prefer to make a custom build you can compile. See FFmpeg Wiki: Compile FFmpeg on CentOS.

Install ffmpeg on centos server

while installing ffmpeg on my centos server.I get this error while running ./configure: checking for ffmpeg headers... configure: error: ffmpeg headers not found. Make sure ffmpeg is compiled as shared libraries using the --enable-shared option
cd /usr/local/src
wget http://downloads.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2?use_mirror=nchc
tar -xjf ffmpeg-php-0.6.0.tbz2
phpize
./configure
make make
install
Try using ffmpeg auto installer, you need to dounload a package with required plugins, its free,
you can refer this link for demo
https://www.youtube.com/watch?v=EaaT7vj8K2s
Here you will get complete installation package
http://ffmpeginstaller.com/
It will take around 30 mins for complete installation, you just need to keep an eye on command prompt.
You can Install FFMPEG on CENTOS by just Downloading rpm package of ffmpeg from ffmpeg.org and place at a particular location in ur Centos Server.
by Configuring the binary you can easily use ffmpeg commands.
Hope this Will help you :)
I hope this helps.
If ever you're trying to install ffmpeg to CENTOS 7, you might want to try this since this is what I did since I have a unsolvable problems with my packages.
Download compressed ffmpeg and extract it to the server: https://www.johnvansickle.com/ffmpeg/ in this case I used ffmpeg-git-amd64-static.tar.xz.
Extract the xz file. cmd: tar -xf filename.tar.xz
Extract the tar file if it's still in tar file. cmd: tar -xvf filename.tar
Go to the extracted file’s directory.
You must see these files under the folder
Try the command ./ffmpeg -version
Add it to the environment variable so that you can use the ffmpeg globally. Assuming that the ffmpeg main folder is contained in usr/ffmpeg, get the original PATH value using the command: echo $PATH , copy the original path value add it with the path of the ffmpeg directory (e.g. :usr/ffmpeg) and add it to the PATH environment variable with the command: export
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/ffmpeg
You should be able to use the ffmpeg command now with cmd: ffmpeg -version
Try to convert files now example: cmd: ffmpeg -i input.webm output.mp4 and it should all work now.

Resources