Dark Thumbnails on EC2 with ImageMagick / RMagick - amazon-ec2

With the yum installed version of ImageMagick on the default Amazon EC2 instance I was getting dark thumbnails via rmagick.
How do I get a newer version of ImageMagick on EC2?

Using a combination of the ImageMagick source installation instructions and some instructions from a blog, I got the following to work:
Get rid of the old version
yum remove ImageMagick
Install the dependencies
You will need the appropriate ImageMagick dependencies for whatever graphic types you expect to convert.
yum install wget tcl-devel libpng-devel libjpeg-devel ghostscript-devel bzip2-devel freetype-devel libtiff-devel
curl and extract the ImageMagick source
cd ~/
curl -O http://www.imagemagick.org/download/ImageMagick.tar.gz
tar zxvf ImageMagick.tar.gz
Test configuration
cd ImageMagick-xxx
./configure
Confirm configuration
There should be a yes next to all the image types you anticipate needing to convert, if not see the dependencies step above.
Build and install
make
make install

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.

How to install libvirt-go? (pkg-config)

Libvirt was installed with "dnf install". For libvirt-go - $ go get github.com/libvirt/libvirt-go.
As a result:
enter image description here
How I can change PKG_CONFIG_PATH? Or how to install libvirt-go right?
You need to install the libvirt development package, eg libvirt-devel on Fedora/RHEL/Centos, or libvirt-dev on Debian/Ubuntu.
The libvirt-go build process will just query 'pkg-config' to find out where it is installed, so if you did have it installed in a non-standard location (eg /opt/libvirt), then you would do 'export PKG_CONFIG_PATH=/opt/libvirt/lib/pkgconfig' and then libvirt-go would find that.

Janus WebRTC installation issue

I am installing Janus WebRTC Gateway in a Ubuntu Machine (14.04 64 bit). I followed the instructions as in the following link:
However, I get the following error when trying to execute janus:
https://github.com/meetecho/janus-gateway (readme.md file)
[FATAL] [janus.c:main:3670] No Janus API transport is available...
enable at least one and restart Janus
Anyone has any idea what the issue might be? I will only use the REST API without WebStockets or RabbitMQ.
I successfully installed Janus on Ubuntu 14 according to the following steps:
sudo apt-get install libmicrohttpd-dev libjansson-dev libnice-dev libssl-dev libsrtp-dev libsofia-sip-ua-dev libglib2.0-dev libopus-dev libogg-dev libini-config-dev libcollection-dev libwebsockets-dev pkg-config gengetopt automake libtool doxygen graphviz git cmake
sudo apt-get install libavformat-dev
mkdir -p ~/build
cd ~/build
git clone git://github.com/meetecho/janus-gateway.git
cd janus-gateway
sh autogen.sh
./configure --disable-data-channels --disable-websockets --disable-rabbitmq --disable-docs --prefix=/opt/janus LDFLAGS="-L/usr/local/lib -Wl,-rpath=/usr/local/lib" CFLAGS="-I/usr/local/include"
make && sudo make install
sudo make configs
Running it by:
cd /opt/janus/bin/
./janus -F /opt/janus/etc/janus/
I had this issue before, I had write a script to install everything just run this
wget https://gist.githubusercontent.com/johnmelodyme/966f474a99b6dd0cf4e7ac19ba4258da/raw/0f1779499c62eeee3e2a577ef641e94e57b71154/janus.sh && sh janus.sh
Hope This Help Much, I believe there are certain dependencies needs to be installation but you missed it. In https://github.com/meetecho/janus-gateway it stated the Dependencies needed, have to be installed without error.
It is because libmicrohttpd version is lower than requirement, Download and install libmicrohttpd manually (dont use yum or apt-get).

Octave windows binaries including classdef

Are there any octave default branch binaries for windows available somewhere?
If not, is there a simple way of getting a version including classdef for Linux? simple, because usually I do not use Linux.
I don't think there are windows builds from default (aka development) available but you may ask on the help mailinglist. (Some users there build windows binaries with MXE from development sources)
If you want to build on GNU/Linux I would suggest Debian or Ubuntu in a VM. It is as easy as installing the dependencies, clone with hg, bootstrap, configure, make... You'll find instructions on the wiki http://wiki.octave.org/Octave_for_Debian_systems#Compiling_from_source
But always keep in mind that these are development sources which generally aren't suitable for productive use and may break sometime.
Here's how I ended up doing it (approximately and skipp'in all the failed attempts).
Install VirtualBox
Create new machine, mount ubuntu image, chose dynamic HDD size (or at least 10 GB)
Install Ubuntu. If strange mixed color screen appears on first boot:
[right] CTRL+F1
[right] CTRL+F7
Open Terminal (CTRL+ALT+T)
If sceen resolution cannot be made larger 640*480:
sudo apt-get install virtualbox-guest-dkms
sudo reboot
sudo apt-get install mercurial
hg clone http://www.octave.org/hg/octave -r default
sudo apt-get install gfortran debhelper automake dh-autoreconf texinfo texlive-latex-base texlive-generic-recommended epstool transfig pstoedit libreadline-dev libncurses5-dev gperf libhdf5-serial-dev libblas-dev liblapack-dev libfftw3-dev texi2html less libpcre3-dev flex libglpk-dev libsuitesparse-dev gawk ghostscript libcurl4-gnutls-dev libqhull-dev desktop-file-utils libfltk1.3-dev libgl2ps-dev libgraphicsmagick++1-dev libftgl-dev libfontconfig1-dev libqrupdate-dev libarpack2-dev dh-exec libqt4-dev libqscintilla2-dev default-jdk dpkg-dev gnuplot-x11 libbison-dev libxft-dev llvm-3.3 (takes a while)
./bootstrap
mkdir builddir
cd builddir
../configure --enable-jit --prefix=/opt/octave3.8 JAVA_HOME=/usr/lib/jvm/default-java LLVM_CONFIG=/usr/bin/llvm-config-3.2 CFLAGS="-O2 -march=native" CXXFLAGS="-O2 -march=native" (no TargetData.h found...)
make (takes half an hour or more)
make check (takes a while, gave a failed assertion)
make install
./run-octave

How to load correct libavcodec.so shared library version? (53)

I am using libavcodec and libavformat in my project but when I execute a binary which was built on another machine, I get the following error:
error while loading shared libraries: libavcodec.so.53: cannot open shared object file: No such file or directory
I installed ffmpeg with libav and trying the following commands:
sudo apt-get install ffmpeg libavcodec-dev libavformat-dev
sudo apt-get install ffmpeg libavcodec-extra-53
sudo apt-get install libav-tools
The error doesnt show up when I build the binary on the same machine, but it would be much faster to compile on a second machine.
UDPATE: I also ran sudo apt-get install update and sudo apt-get install pkg-config without any change in the output. (OS = 12.04)
https://sites.google.com/site/linuxencoding/builds
try installing the linux binary for ffmpeg from the above website.
just so that every user benefits from this answer i am adding links to ffmpeg binaries available for different platforms
for centOS http://pkgs.repoforge.org/ffmpeg/
Tutorial for installation :
http://www.rackspace.com/knowledge_center/article/centos-installing-ffmpeg
for mac http://ffmpegmac.net/
for windows http://ffmpeg.zeranoe.com/builds/
also i have made a video tutorial to install a binary. but this is on mac. but i assume its the same for linux to.
https://www.youtube.com/watch?v=wiLNqg2IOAQ
hope this helps

Resources