Mediacore error PIL – IOError: decoder jpeg not available
There is an error with mediacore community edition installation, when you try to upload a thumbnail to a video it shows Error 2038 and it can’t upload the image.
It is because PIL that comes with the mediacore installation didn’t find paths to the libjpeg and zlib libraries. To solve this you have to:
- Download PIL 1.1.6
- Delete mediacore_env/lib/python2.7/site-packages/PIL
- Delete mediacore_env/lib/python2.7/site-packages/PIL.pth
- Delete mediacore_env/lib/python2.7/site-packages/PIL-1.1.6-py2.7-linux-x86_64.egg
- tar -xvzf Imaging-1.1.6.tar.gz
- cd Imaging-1.1.6
- python setup.py install
- cd mediacore-community
- paster serve –reload development.ini
Then It should work !
EnvironmentError: mysql_config not found
When you get this error, you just need to install libmysqlclient-dev. In ubuntu use:
sudo apt-get install libmysqlclient-dev
Install VLC on ubuntu 64 bits
Once you have installed ffmpeg and x264, in the way I posted before, it is time to install vlc.
tar xjvf vlc-1.1.11.tar.bz2
cd vlc-1.1.11/
./configure
If there is an error in the configure probably could be the libqt4-dev
sudo apt-get install libqt4-dev
./configure
make
sudo make install
ln -s /usr/local/lib/libvlc* /usr/lib/
ln -s /usr/local/lib/libx264.a /usr/lib/
ln -s /usr/local/lib/vlc /usr/lib/vlc
Once you have done this you can use vlc as a player, but if you would like to stream some multimedia content you will see an error like “stream_out_standard stream out error: no suitable sout mux module for `udp …” and “no sout mux module matched” and “main stream output error: stream chained failed for ‘standard {mux=” etc.
To solve this install libdvbpsi:
sudo apt-get install libdvbpsi6
sudo apt-get install libdvbpsi-dev
After that type:
./configure
make
make install
Finally you will have working vlc and ffmpeg together, without conflicts !
Force to mount an internal windows drive in ubuntu
Follow these steps:
1.- Open a terminal
2.- Type sudo /bin/bash
3.- Now, type mkdir /media/windisk
4.- To know which is the partition type: fdisk -l
5.- For ntfs drives type: mount -t ntfs-3g /dev/sda1 /media/windisk -o force
For fat32 drives type: mount -t vfat -o umask=000 /dev/sda1 /media/disk
Now you can access to your windows partition
Kivy – Multiple Layouts
I wonder how can I have several layouts and change between them using kv files in kivy. Actually I have the answer.
You have to create an ejercicio.kv file. You have to define the classes you are going to use for each layout such as.
#:kivy 1.0
<MyLabelWithBackground>:
#definition<Ejercicio>:
#definition<Layout1>:
#definition<Layout2>:
#definition
Installing libx264 and ffmpeg on Ubuntu 11.10 – 64 bits
The main goal to compile and install libx264 and ffmpeg is try to make work vlc and ffmpeg at the same time.
First remove old installation
sudo apt-get remove ffmpeg x264 libx264-dev
Install all the packages you will need
sudo apt-get update
sudo apt-get install build-essential checkinstall git libfaac-dev libjack-jackd2-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libva-dev libvdpau-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev texi2html yasm zlib1g-dev
Install X264
Install x264 packages getting the source code using git
Install git with –> sudo apt-get install git
git clone git://git.videolan.org/x264
cd x264/
./configure –enable-shared
make
sudo make install
Install ffmpeg
Install ffmpeg packages getting the source code using git
git clone git://git.videolan.org/ffmpeg
cd ffmpeg/
./configure –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-libfaac –enable-libmp3lame –enable-libtheora –enable-libvorbis –enable-libx264 –enable-libxvid –disable-ffplay –enable-shared –enable-gpl –enable-postproc –enable-version3 –enable-nonfree –enable-avfilter –enable-pthreads
make
sudo make install
Configure global variables:
export LD_LIBRARY_PATH=/usr/local/lib
sudo gedit /etc/ld.so.conf
//add this –> /usr/local/lib at the end of the file
sudo ldconfig
hash x264 ffmpeg ffplay ffprobe or
hash x264 ffmpeg ffprobe
Kivy – Label with background
Kivy is a framework for develop multitouch applications, I started to use pyMT, but pyMT evolved into Kivy.
Adding a background to a label is not possible using the common functions in documentation.
A possible solution by @Mathieu Virbel could be:
class MyLabelWithBackground(Label):pass
<MyLabelWithBackground>:canvas.before:Color:rgb: 1, 0, 0 # your color hereRectangle:pos: self.possize: self.size