Thursday, July 11, 2013

avcon: change frame, resize ogv obtained from RecordMyDesktop

avconv -i test.ogv -r 10 -s 1280x720 -q 1 output.ogvr is frames per second, s is the new size and q is quality, from 1(worse) to 32(best).

Tuesday, July 02, 2013

Matlab: deal - assign values in vector into variables

Mex files in Matlab for linux: failed to map segment from shared object: Operation not permitted

This happens when you have no permissions to execute given file or library. In my case it was happening because I was trying to run mex files using Matlab for linux that were located in NTFS partition. Often the partition is mounted in linux without exec arguments. To fix it, I edited my /etc/fstab file and aded exec argument to the line responsible for mounting NTFS partition:

UUID=F4B664646C02A51D /mnt/c ntfs users,defaults,exec 0 0

Monday, July 01, 2013

Problems with libstdc++.so.6 when compiling mex files in Matlab 2013a x64 on Xubuntu 13.04 x64

Problem compiling mex files in Matlab 2013a x64 on Linux (Xubuntu 13.04 x64):/usr/lib/gcc/x86_64-linux-gnu/4.7/cc1plus: /usr/local/MATLAB/R2013a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /usr/lib/x86_64-linux-gnu/libppl_c.so.4) /usr/lib/gcc/x86_64-linux-gnu/4.7/cc1plus: /usr/local/MATLAB/R2013a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /usr/lib/x86_64-linux-gnu/libppl.so.12)

The problem was that Matlab was linking libstdc++.so.6 (located in /usr/local/MATLAB/R2013a/sys/os/glnxa64) to the file it provides, i.e. libstdc++.so.6.0.13 (located in /usr/local/MATLAB/R2013a/sys/os/glnxa64).

This is the old version of libstdc++, and xubuntu has newer version, i.e. libstdc++.so.6.0.17 (located in /usr/lib/x86_64-linux-gnu).

Thus, I solved this problem by changing the symbolic link in Matlab to point to the new version:cd /usr/local/MATLAB/R2013a/sys/os/glnxa64
sudo mv libstdc++.so.6 libstdc++.so.6_org
sudo ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17 libstdc++.so.6

Saturday, January 21, 2012

Linux Mint 11 (32 bit): Logitech C210 webcam and skype

Logitech C210 works without any issues in cheese.
However to make it work in skype I needed to execute skype beta 2.2.0.35 through the following commandLD_PRELOAD=/usr/lib/libv4l/v4l1compat.so /usr/bin/skypeIf this does not work, than u can try to use:LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so /usr/bin/skype

If u don't already libv4l installed, than u can install it as follows: sudo apt-get install libv4l-0

Sunday, September 18, 2011

ffmpeg: Convert mp4 to mov

To convert mp4 movie into mov movie the following command can be used:ffmpeg -i input_file.mp4 -acodec copy -vcodec copy -f mov output_file.mov

Thursday, August 18, 2011

CentOS 5: Mount samba share in read-write mode

To mount a windows share on centos with read-write mode, I used the following command as a root
/sbin/mount.cifs //ip_address/windows_sharename/ /home/w/my_folder_on_centos/ -o rw,user=windows_username,password=windows_password,uid=linux_usernameI noticed, that without uid=linux_username, the command will mount the share in read-only mode.

Tuesday, July 26, 2011

Git: change commit editor to vim

This command can be used:git config --global core.editor "vim"or one can setup environment variable GIT_EDITOR:export GIT_EDITOR="vim"