How to install ffmpeg for Jupyter Notebook in Mac? - ffmpeg

I used the pip install ffmpeg command to install ffmpeg onto my Jupyter Notebook.
However, when I try to run the animation command, I get the error:
MovieWriter ffmpeg unavailable; trying to use class 'matplotlib.animation.PillowWriter' instead.
How should I remedy this problem?

I used the command: brew install ffmpeg.
It worked

Related

Open Video Downloader Error: Postprocessing: ffmpeg not found

Error Thrown:
ERROR: Postprocessing: ffmpeg not found. Please install or provide the path using --ffmpeg-location
Context: macOS Big Sur M1 Chip, using the open video downloader program GitHub release or Homebrew. This specifically was thrown at the end of downloading the video file and the audio file from a given URL. The two files remained separate as a result of the error, the video was playable normally, but audio was in a .webm format (unusable for most people).
Analysis: It is clear that a dependency is missing, or its path cannot be located. For macOS users like me, the first step after checking the app's preferences for a path set or dependency download function is to check for the given dependency in the system. Once checking using Homebrew, it became clear that several dependencies were missing.
Solution: Use a package manager like Homebrew to install the following in order of appearance below:
YouTube-dl
ffmpeg
For people that are new to Homebrew, you need to run these commands or your Terminal app:
brew install ffmpeg
brew install youtube-dl
If you are told that these packages exist then please update them using the upgrade command
brew upgrade youtube-dl
brew upgrade ffmpeg
In addition, the app may be installed, but not in the user's PATH env variable. Open a terminal shell as the user, and type
which ffmpeg . Make sure you get the expected answer.
Also note that Homebrew changed the location of ffmpeg. It used to be at /opt/homebrew/bin/ffmpeg
but they moved it to
/usr/local/bin/ffmpeg.

FFMPEG 4.2.4, Python 3.9: "ffmpeg: error while loading shared libraries: libopenh264.so.5: cannot open shared object file: No such file or directory"

I'm using ffmpeg 4.2.4 and Python 3.9
Currently getting error:
ffmpeg: error while loading shared libraries: libopenh264.so.5: cannot open shared object file: No such file or directory
Tried the solutions from these links but they didn't work:
ffmpeg: error while loading shared libraries: libopenh264.so.5
Ffmpeg error in linux
If anyone has any idea how to fix it, or needs any more information, please let me know.
Edit: I've noticed that it's been over a year later since I created this post and it's still getting replies - I've created a gist explaining another way I overcame a similar issue
Basically, I uninstalled conda's version of ffmpeg (in the environment that's having issues) using conda uninstall ffmpeg --force and (for Ubuntu), update the system wide version (I think this is what it's called) with sudo apt install ffmpeg
Figured out you can conda update ffmpeg, even though you can't install it with conda...
Completely fixed the issue. Posting this incase someone else has the same problem.
Note: I got (the faulty) ffmpeg from downloading PyTorch with the command via the official site.
Like Wilan, my issue stemmed from getting ffmpeg with PyTorch. conda update ffmpeg did not work for me, but conda install -c conda-forge ffmpeg (specifying the conda-forge channel) fixed my issue.

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

unicharset_extractor: command not found

I want create new train data using tesseract. So follow step which mentioned in below website.
https://blog.cedric.ws/how-to-train-tesseract-301
I got below error while i execute Unicharset in OS X terminal.
Command:
unicharset_extractor eng.micrtest.exp.box
Error:
-bash: unicharset_extractor: command not found
I have using below software versions
OS: OSX EI caption 10.11.1
tesseract 3.04.01
leptonica-1.72
libjpeg 8d : libpng 1.6.21 : libtiff 4.0.6 : lib 1.2.5
is this possible to execute unchaste_extractor command in OSx?
Thanks in advance.
Problem is "Unicharset_extractor" not install in your system. So please install tesseract training tools
INSTALL TRAINING TOOL
brew install --with-training-tools tesseract
Please uninstall tesseract if you already installed it.
UNINSTALL TESSERACT
brew uninstall tesseract
NOTE: please read logs while install training tools and follow the steps which mentioned in logs.
It’ll take some more time to install the training tool so you’ll never quiet the terminal meantime.
Please install Homebrew before work out above command.
You will need to build Tesseract training executables; they are separate from the regular Tesseract executable.
https://github.com/tesseract-ocr/tesseract/wiki/Compiling

Error for convert command in command line

I have a bash shell script as below.
#!/bin/bash
SIZES=("512" "1024" "2048")
for i in ${!SIZES[*]}
do
SIZE=${SIZES[$i]}
echo $SIZE
# first, resize original image
convert -resize $SIZE"x"$SIZE! chernarus2048.jpg chernarus$SIZE"x"$SIZE.jpg
mkdir tiles$SIZE
# slice resized image into 256x256 tiles
convert -crop 256x256 chernarus$SIZE"x"$SIZE.jpg tiles$SIZE/tile%04d.jpg
rm chernarus$SIZE"x"$SIZE.jpg
done
But when I run this in command line using the following command
sh generate_tiles.sh chernarus2048.jpg
I'm getting an error convert: command not found
I'm using OS X Yosemite 10.10.2.The image is kept in the same folder where the shell script is placed. Please help me out.
You can also make it with help of Homebrew - which is quite nice and popular package manager
To Install homeBrew past in your terminal
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
To install imagemagick past in the terminal
brew install imagemagick
Steps to follow
Confirm macport is installed for reference
https://www.macports.org/install.php
Then install imagemagick using any of the following method
install using command$ sudo port install ImageMagick
or using Homebrew command brew install imagemagick
or download from the link http://cactuslab.com/imagemagick/
Then close your terminal and restart the pc and run your code again.
convert is part of ImageMagick which is not installed by default on OS X.
From the download instructions on the ImageMagick site:
Install MacPorts
Install ImageMagick with
$ sudo port install ImageMagick
port install not work for me.
it always return "Error: Port ImageMagick not found"
if you failed installing with port, you can download pkg and install it directly from http://cactuslab.com/imagemagick/

Resources