Category Archives: How to

How to watch a 3D video in regular 2D

How to watch a 3D video in regular 2D

The problem

Let’s say you want to rip a 3D movie, but you want to be able to play it on every device (2D or 3D), don’t rip it twice, but keep the 3D version (SBS) and play it on PC with vlc.

My situation

Ubuntu Linux 13.04 with vlc player installed:

max@yoda:~$ vlc --version
VLC media player 2.0.8 Twoflower (revision 2.0.8a-0-g68cf50b)
VLC version 2.0.8 Twoflower (2.0.8a-0-g68cf50b)
Compiled by buildd on panlong.buildd (Aug  2 2013 01:37:47)
Compiler: gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1)
This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute it under the terms of the GNU General Public License;
see the file named COPYING for details.
Written by the VideoLAN team; see the AUTHORS file.

My solution

Keep only the “left eye” playing it at a resolution of 32:9 and cropping it at 1920/2 = 960px, all from command line:

max@yoda:~$ vlc my-movie-3d-SBS-1080p.mkv --aspect-ratio 32:9 --crop 960x1080+0+0

Debugging IO on Android

Android is Linux based, so there are some interesting way to monitor and debug IO activity especially on storage.

The one I found more useful is this:

  1. enable dumping of IO info
    echo 1 > /proc/sys/vm/block_dump
  2. observe kernel log
    cat /proc/kmsg
  3. make your analysis
  4. disable dumping of IO info
    echo 0 > /proc/sys/vm/block_dump

The output you will get is similar to this:
<7>[71477.927886] kswapd0(24): WRITE block 21240712 on mmcblk0p12 (8 sectors)
<7>[71477.928436] kswapd0(24): WRITE block 21410792 on mmcblk0p12 (8 sectors)
<7>[71477.928710] kswapd0(24): WRITE block 21240704 on mmcblk0p12 (8 sectors)
<7>[71477.929016] kswapd0(24): WRITE block 21240656 on mmcblk0p12 (8 sectors)
<7>[71477.929443] kswapd0(24): WRITE block 25427968 on mmcblk0p12 (8 sectors)
<7>[71477.929687] kswapd0(24): WRITE block 8 on mmcblk0p12 (8 sectors)
<7>[71477.930084] kswapd0(24): WRITE block 0 on mmcblk0p12 (8 sectors)
<7>[71478.086639] sdcard(159): READ block 23431168 on mmcblk0p12 (256 sectors)
<7>[71478.087036] sdcard(159): READ block 23430912 on mmcblk0p12 (8 sectors)
<7>[71478.258148] sdcard(159): READ block 23430920 on mmcblk0p12 (200 sectors)
<7>[71478.258514] sdcard(159): READ block 23431424 on mmcblk0p12 (8 sectors)
<7>[71478.266967] sdcard(138): READ block 23430656 on mmcblk0p12 (32 sectors)
<7>[71478.268798] sdcard(159): READ block 23430688 on mmcblk0p12 (64 sectors)
<7>[71478.269409] sdcard(159): READ block 23430752 on mmcblk0p12 (128 sectors)
<7>[71478.271484] sdcard(159): READ block 23430880 on mmcblk0p12 (32 sectors)
<7>[71478.600646] sdcard(138): READ block 23431432 on mmcblk0p12 (512 sectors)
<7>[71478.765136] sdcard(159): READ block 23431944 on mmcblk0p12 (256 sectors)
<7>[71478.958129] Compiler(412): READ block 327320 on mmcblk0p11 (8 sectors)
<7>[71478.958557] Compiler(412): READ block 327400 on mmcblk0p11 (48 sectors)

Tried on my rooted Galaxy Nexus with CyanogenMod 10.1.0-RC1.

 

Postfix with gmail as relay on Debian Squeeze

My Situation

A server running Debian Squeeze.
A valid Gmail account.

Procedure

Make sure you have the right packages installed
# aptitude install postfix libsasl2 ca-certificates libsasl2-modules

Make a backup of your original files
# tar cfz /var/backups/etc-postfix_20121105.tgz /etc/postfix/

Modify /etc/postfix/main.cf
relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl/passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_use_tls = yes

Create /etc/postfix/sasl/passwd with your “user” and “password” values
[smtp.gmail.com]:587 theuser@gmail.com:thesecretpassword

Secure your new file and make it usable for Postfix
# chmod 400 /etc/postfix/sasl/passwd
# postmap /etc/postfix/sasl/passwd
# ls -l /etc/postfix/sasl/
total 12
-r-------- 1 root root 57 Nov 5 00:39 passwd
-rw------- 1 root root 12288 Nov 5 00:40 passwd.db

Make sure you have the right certification authorities available to Postfix
# cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem >> /etc/postfix/cacert.pem
# cat /etc/ssl/certs/Equifax_Secure_Global_eBusiness_CA.pem >> /etc/postfix/cacert.pem

Restart Postfix
/etc/init.d/postfix restart

done