FFmpeg loglevel with level prefix - ffmpeg

I want to add level prefix to ffmpeg logs.
Im using ffmpeg -loglevel level+info -i input
And it is working as well in my Mac (ios) but is not working in my Ubuntu 18 with ffmpeg version 3.4.6-0ubuntu0.18.04.1
When I am running it in my Ubuntu I got:
Invalid loglevel "level+info". Possible levels are numbers or:
"quite"
"panic"
...
...
...
"trace"
Please advise

The level flag was introduced in ffmpeg 4.0, so upgrade.

As Gyan's answer - The level flag was introduced in ffmpeg 4.
The solution is install FFmpeg 4 on Ubuntu by adding FFmpeg PPA on Ubuntu system acording to this guide: https://tecadmin.net/install-ffmpeg-on-linux/
sudo add-apt-repository ppa:jonathonf/ffmpeg-4
sudo apt-get update
sudo apt-get install ffmpeg

Related

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.

FFMPEG: How to enable libvorbis and libvpx on centos

I have used following command to install libvorbis and libvpx.
yum install libvpx
yum install libvorbis
Please help me to enable these modules. I'm using centos 7 server.
1. Remove the old ffmpeg
Uninstall the packages you installed from the link you followed. This should also remove the third-party repository you installed.
yum remove epel-release ffmpeg ffmpeg-devel
Remove the signing key you imported:
sudo rpm -e gpg-pubkey-85c6cd8a-4e060c35
sudo rm /etc/pki/rpm-gpg/RPM-GPG-KEY-nux.ro
2. Get a new ffmpeg
Now you can get a more recent ffmpeg that has libvpx, libvorbis (and libopus). You have two options–download or compile:
If you want to download ffmpeg
For Linux and you can get it from johnvansickle.com/ffmpeg/.
curl -LO https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz
tar xvf ffmpeg-git-amd64-static.tar.xz
cd ffmpeg-git-201*
sudo cp {ffmpeg,ffprobe} /usr/local/bin
For Windows or macOS see FFmpeg Download.
If you want to compile ffmpeg
See FFmpeg Wiki: CentOS.
Consider using VP9 and Opus instead of outdated VP8 and Vorbis:
ffmpeg -i input -c:v libvpx-vp9 -c:a libopus output.webm
For more info see FFmpeg Wiki: VP9 & VP8.

How to install package ffmpeg in google colab

I'm trying to use Google Colab to do something. Particularly I want to use ffmpeg package to create a video from a image.
But ffmpeg doesn't seems to be working fine.
The output of this (in the last block) was supposed to be 400 400 instead of 0 0
frame_width = int(cap.get(3))
frame_height = int(cap.get(4))
print frame_width, frame_height
The same code is working fine with Azure notebooks and also on my local machine.
What can be the reason for it? And how to rectify that?
You need to install ffmpeg first:
!apt install ffmpeg
As mentioned here, the following commands worked for me:
! add-apt-repository -y ppa:savoury1/ffmpeg4
! apt-get -qq install -y ffmpeg

FFMPEG Install/enable 'libfdk_aac' after installed FFMPEG via PPA

I have linux MINT 17.3 Kernel 4.4.0-81 all update available. (For different reasons I can't move to newer version of ubuntu/mint)
I have installed FFMPEG via PPA (NOT from compiling the source):
sudo add-apt-repository ppa:jonathonf/ffmpeg-3 -y
sudo apt-get update
sudo apt-get install -y ffmpeg
Then I tried to install libfdk-aac with guide:
https://trac.ffmpeg.org/wiki/CompilationGuide/Quick/libfdk-aac
sudo apt-get install pkg-config autoconf automake libtool
git clone https://github.com/mstorsjo/fdk-aac.git
cd fdk-aac
./autogen.sh
./configure --enable-shared --enable-static
make
sudo make install
sudo ldconfig
But I'm still receive from FFMPEG: "unknown encoder 'libfdk_aac'"
How can I check if "libfdk_aac' is correctly installed and HOW CAN I ACTIVATE / ENABLE the 'libfdk_aac' on FFMPEG?
If is not possible in my situation, and if I'm obliged to remove all ffmpeg and follow this:
https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
FFmpeg does not have a "plug-n-play" codec system. If you want to add another external codec you must compile FFmpeg.
Alternatively, you could find a static ffmpeg binary that includes your desired codecs, but this is not a likely option due to the non-free/GPL incompatible situation of the fdk-aac license.
Your best option if you want to use libfdk_aac is to follow the compile guide you linked to. You can even keep the ffmpeg you installed from that PPA because the guide does not interfere with any existing repository ffmpeg.

how to install libx265 for ffmpeg build on centos 7

When I try to compile ffmpeg with libx265 (./configure --enable-gpl --enable-libx265), it is getting error as: (ERROR: x265 not found using pkg-config). How to install libx265 and get configure with ffmpeg.
There are two solutions to your problem.
A)
If there are no libx265 available on CentOS 7 then you'll have to build it yourself. It follows the pretty straightforward method of configure/make.
Using mercurial:
hg clone http://hg.videolan.org/x265
cd x265/build/linux
./make-Makefiles.bash
make -j6
make install
ldconfig
Then be sure to specify the path libx265 was installed to when building ffmpeg. With pkg-config: PKG_CONFIG_PATH="/usr/local/lib/pkgconfig".
B)
But it appears there are rpm entries for x265 on CentOS 7:
http://pkgs.org/centos-7/nux-dextop-x86_64/x265-devel-1.2-6.el7.nux.x86_64.rpm.html. If they are compatible on your system you should be able to simply install instead of building.
I wrote a script for Ubuntu recently, but I think it can be applied to CentOS. You need to comment off the Ubuntu apt-get in the script in order to get it running.
Also before you use it, please ensure that you have git and mercurial installed. My script pulls the latest copy of necessary libraries from either from git or mercurial.
https://github.com/tangingw/libx265_installer

Resources