IMAP su Gmail e AOL

Ho cercato degli IMAP provider gratis su internet, e i piu’ famosi sono Gmail
e AOL ma nessuno dei due e’ perfetto.

  • Gmail: se non si sta nello spazio disponibile si puo’ comperare altro spazio e qualcun altro ci ha provato ma si e’ imbattutto in un problema strano: c’e’ un limite di 40 caratteri sulle etichette, che si riflette nel fatto che non si possono creare sub-sub-sub-folders perche’ si eusarisce velocemente lo spazio (link e link)
  • AOL: promette spazio illimitato, ma ho trovato un altro problema (o forse succede solo a me? non ho trovato conferma): puo’ solo avere un livello di folder, cioe’ niente sub-sub-folders.

Chiedo cosi’ tanto? Ora mi sono installato un server mail personale ma possibile che non ci siano alternative?

SOHO server

I recently bought a small NAS for home, to stuff it with media, backup, and the content of the dvds lying around home. My plan was to rip open the external hds I have and put them into the NAS.

I considered

  • Drobo for 380€: no ethernet port but smart use of different size hard disks, which is important for my scenario
  • Promise NS4300N for 300€: cheap
  • Diskstation DS409 for 420€: very good performance
  • QNAP ts-410 for 400€: very good performance

Obviously, I bought a different one: the Synology DS410j for 300€ which as cheap as the others but is newer and has the other stuff I’m interested like streaming to the PS3 and it can use both 3.5 and 2.5 SATA drives (and the DS409 and the QNAP can also do that). By chance, a new beta firmware just came out which introduces a smart RAID system, a la Drobo!

It’s been only a few weeks but I really like it…

Come scegliere un mail server personale?

Per casa o per un piccolo ufficio, quali sono le opzioni a basso costo (cioè gratis)? Per Linux, non ne parlo neanche tanto le soluzioni sono comuni e buone, ma per Windows la situazione è diversa…

  • Hmailserver è stata la mia scelta, visto che è facile guardare avanti: supporta l’indicizzazione dei messaggi e si può anche appoggiare a un database esterno, quindi anche se ora non avete bisogni particolari, siete pronti per il futuro.
  • Mercury Mail Transport System ha altri vantaggi, in particolare l’inclusione in XAMPP che permette di lavorare con uno stack completo dall’inizio e si possono installare facilmente interfacce web quali Squirrelmail o Roundube per accedere via web da remoto.

Ci sono altre opzioni, ma niente gratis che comprenda il supporto IMAP.

Problemi con Google Maps 3.2 e accesso WAP

Qualcun altro ha problemi come me? Io mi sto riscaricando il vecchio maps da http://handheld.softpedia.com/get/Educational/Maps/Google-Maps-S60-3rd-Edition-53314.shtml per provare a vedere se e’ quello il problema… Ma dovevo proprio prendere l’offerta di Vodafone?

SSN and codice fiscale

Una delle cose che mi fanno saltare la mosca al naso è il fatto che la gente non sappia che il Codice Fiscale italiano sia calcolato esattamente (cioé è una funzione) del nome, cognome, data e luogo di nascita (vedi Wikipedia). Inoltre, è altrettanto facile dal Codice Fiscale risalire ai dati anagrafici (beh per il nome e cognome bisogna aggiungere le vocali a naso), e quindi quando ci chiedono sia il Codice Fiscale che altri dati, ci stanno solo facendo perdere tempo.
Negli Stati Uniti invece la situazione è diversa e teoricamente il Social Security Number è segreto e personale, ma ovviamente qualcuno è riuscito ad indovinare il processo di assegnazione del codice e questo potrebbe essere davvero un problema per la sicurezza online ma non solo…

PS3+PlayTV=goodbye HTPC!

I have struggled with my HTPC for a few years: Windows or Linux? Mediaportal or XBMC, or MythTV? Hauppauge DTT or analog? USB or PCI?
A special offer from a local store convinced me to buy a PS3, and I decided to took the plunge and buy the PlayTV adapter as well.
The PS3 has pretty much substituted my HTPC which I barely turn on any longer. Here are the pros and cons the switch.

What I like:

  • Simplicity: the PS3 is MUCH more stable than any PC, and before you say Linux, I assure you that I tried that switch, and it didn’t take. This means that I don’t have to worry about new drivers, and why is this not working anymore, etc.
  • Bluetooth remote: you can hide the PS3 in a closet if you want  to, and the remote and the joypad still work! All the remotes for the PC are infrared which requires a line of sight.

What I miss:

  • Program guide: now I’m stuck with the program guide that is delivered over DTT which is nowhere as complete as the one I had using XMLTV. So for Rai I have two days worth of stuff but Mediaset only show the current and the next program.
  • Compatibility: there are some files which are not playable n the PS3, for codec and/or container reasons, like MKV. There are ways to convert the files, easiest is MKV2VOB, or you can just host the files on another computer and stream them (and transcode if necessary) like with PS3 Media Server.

Managing a large multimedia database (2)

Other weird ideas following my previous post.

  • VMware appliance: just build a vmware appliance that exports the files inside as nfs or whatever. Rsync will behave because the files are all inside a vmdk files, but the partial checkout is kinda impossible. For the backups, one would need to use something like rdiff-backup or duplicity.
  • Bittorrent or some P2P technology: just create a bittorrent file on the server for the directory that contains all the files. It is easy to do a partial checkout which you can actually resume (if you didn’t finish it in one go). But bittorent is not that smart at detecting changes, and will just re-download a file whose name was changed. Again, backups are out.
  • Managing a large multimedia database

    Nowadays, most of my stuff is in digital format: music, movies, and photos. I probably have about 50GB of music, more than I can count that of movies and tv series, and maybe 10GB of photos. Lately I started thinking about how to handle all of that stuff, including backups and sharing with other computers. By the way, when I talk about “database” I don’t mean MySQL or whatever, but just a collection of data. Here is what I would like to have:

  • Repository: The base should be just files on a drive. No database like MySQL or using strange properties of the filesystem, since I’d like it to be accessible from both Windows and Linux (and Mac, why not?) . Maybe there can be extraneous stuff in the directories which I will just ignore while browsing for content, but the extra size should not be too big. Since I will be working with hundreds of gigabytes, an extra of 10% would be acceptable, but more than that should be banished.
  • Partial checkout: I should be able to download just a portion of it and push back the changes to the server. It should be smart at detecting changes and so minimize the data transfers.
  • Backups: It should take care of making automatic incremental backups.
  • There are different approaches to this problem, and I investigated a few.

  • Flat file repo + rsync: This is the easiest solution. Just keep your files in a directory exported by samba or whatever and so the repo wasted space is at 0%. To do partial checkouts you can just copy the files you are interested in and to keep directories in sync you can use rsync. The problem is that rsync is not that smart at detecting changes, and if I just decide to rename a directory, it will just retransfer all the files of that directory, and I like to remind you we are talking about gigabytes of transfers. Producing backups is again just manual.
  • Files inside a tar or iso + rsync: Just create a “virtual filesystem”, i.e., store files inside an iso and mount it, so it should be transparent to dumb media player who don’t care, but now rsync has a much better chance to detect renames or moves automatically and very efficiently. But now the partial checkout doesn’t really work but it’s a bit easier to do the backups since one can store just the deltas of the iso file.
  • Use git or subversion: just stuff all the files inside a git or subversion repository and so partial checkouts and updating files is very very efficient! Well, for now git cannot do partial checkout, but I guess it’s coming, while svn can, and git is very very smart at finding renames and moves inside the repo. This last bit is important because of considerations of the repo size: they make a distinction between the repo and a working copy (the stuff that the dumb media player will read) and so there is wasted space. They do compress their repos, but since we are already dealing with compressed files, the savings are negligible and so we are around a 100% overhead for space on the server. Git actually also has the same overhead in each client, since you (essentially) always transfer your whole repo, and not just a working copy, but if you start moving things around, the git repo is very smart at increasing the least possible, while svn grows a lot. Mercurial (just to throw another one in) has the good property that inside its repo, there is a clean working copy, but its size increases a lot when moving things around so it’s not very good for my purpose. On the backup side, the repo is automatically an incremental backup.
  • Batch file fun!

    The x264 compressor is great, but it is really slow! Sometimes it goes at 2fps! So what I did is coming up with a simple way to split a large encode in smaller pieces which can be done separately:


    set X264OPTS=--crf 24
    d:\multimedia\convert\x264.exe "%~f1" --frames 1 --output "%~dpn1_stat.mp4" 2>"%~dpn1.stats"
    for /f "tokens=7,8 delims=() " %%F in (%~dpns1.stats) do if "%%G"=="frames" SET FRAMES=%%F
    set /a REMAIND="%FRAMES% %% 10000"
    set /a RESULT="(%FRAMES%-%REMAIND%)/10000"
    set /a RESULTMINONE="%RESULT%-1"
    set /a LASTONE="%FRAMES%-%REMAIND%"
    echo %REMAIND% %RESULT% %RESULTMINONE%
    echo start /belownormal /B /wait x264.exe --progress --frames 9999 %X264OPTS% -o stage_0.264 "%~nx1" >stage_0.bat
    echo echo "Done!" ^>stage_0.txt >>stage_0.bat
    for /l %%n in (1,1,%RESULTMINONE%) do (
    echo set /a NUMBER=%%n >stage_%%n.bat
    echo set /a SEEKFRAME="%%NUMBER%% * 10000" >>stage_%%n.bat
    echo start /belownormal /B /wait x264.exe --progress --seek %%SEEKFRAME%% --frames 9999 %X264OPTS% -o stage_%%n.264 "%~nx1" >>stage_%%n.bat
    echo echo "Done!" ^>stage_%%n.txt >>stage_%%n.bat
    )
    echo start /belownormal /B /wait x264.exe --progress --seek %LASTONE% %X264OPTS% -o stage_%RESULT%.264 "%~nx1" >stage_%RESULT%.bat
    echo echo "Done!" ^>stage_%RESULT%.txt >>stage_%RESULT%.bat

    So feed it a avs file and it will split a bunch on stage_xx.bat files which encode each 10000 frames.

    Audio on my cell SonyEricsson W300i!

    So, in the beginning, there was light. And then, there was music! The audio support of the W300i are actually better than the video one, and we can skip straight through MP3 to go to AAC (but only LC, that’s too bad). For a podcast 32kbps are quite enough, but for music 64kbps is recommended. The problem is that I manly use it in the gym, and I don’t want to mess around with the volume, so I need to even out the volume of the tracks. You can use Wavegain, but I find that The Levelator is so much better. They only work on WAV files, so we first convert to WAV, normalize, and convert back to AAC (actually MP4, which we use as container for AAC encoded files) using Nero Digital Audio. I created a small convert.bat file to use:


    :main
    if not "%~f1"=="" goto convert
    pause
    exit

    :convert
    d:\multimedia\lame.exe --decode "%~f1" "%~dpn1_temp.wav"
    d:\multimedia\level.exe "%~dpn1_temp.wav" "%~dpn1_temp.wav"
    d:\multimedia\neroaacenc_sse2.exe -2pass -lc -br 64000 -if "%~dpn1_temp.wav" -of "%~dpn1.mp4"
    del "%~dpn1_temp.wav"
    shift
    goto main

    which you can use as such convert.bat track.mp3 or (and that’s the preferred way) just drag and drop a bunch of mp3 on the file (but not too many, because windows is picky) and it goes through them one by one. Notes: level.exe is The Levelator, but you’ll have to look for it in your My Documents directory after you go through the weird Java install; if you’re not converting MP3, lame decoding won’t do much for you, so you could use ffmpeg instead like so:


    d:\multimedia\ffmpeg.exe -i "%~f1" "%~dpn1_temp.wav"

    TimeCodec, H264, ffdshow, CoreAVC

    Playing DivX/XviD files is very easy, even for a not so fresh cpu. Playing H.264 on the other hand… I used timecodec to do some tests in comparing the relative speeds of ffdshow and CoreAVC (the old 0.0.4 alpha release, now I’m sure it’s faster, and I’ll probably buy it when the 1.2 comes out) and different renderers, and here is what I get (fps/dfps):

    ffdshowcoreavc
    overlay32/3139/38
    VMR732/3040/35
    VMR933/3039/32

    ASUSTeK Computer Inc.

    Another interesting wireless router is the ASUSTeK WL-700GE and this one also is a NAS with a USB2.0 port to attach external storage, but it also include a 160GB hard disk! I really need to stop looking at these things, or I’ll buy one on a whim ;) Another one with similar option is the AsusTeK WL-500g, or the Linksts WRT50N or the old WRTSL54GS. If you don’t need a wireless router, the NSLU2 is much cheaper.

    Movies on my cell!

    Yesterday I read the docs on my cell SonyEricsson W300i at the Multimedia Docs and Tools page and probably found the best options for me. Since the screen is 128×160 with about 200000 colors, the best format for movies is 128×96 (no, I cannot turn it on the side and use the higher resolution since it has no fullscreen mode). It can also read QCIF 176×144 but it (has to) scale it and I think I see jaggies on cartoons, very disturbing. Anyway, the lower resolution has the perk that I can use less bitrate to get the same quality. It can read 3GP files, but it’s better to use the more standard MP4, for example using Avidemux, and MPEG4 Part 2 Simple profile, i.e., no b-frames at all. I have not yet run into any variable frame rate limitation, but for such a small video, 128kbs is probably a waste of bits, maybe around 64kbps is better, or fixed quantiser 6 (or something less, i.e., higher quantizer). For audio, MP4 was ideally created to contain AAC and the cell supports the AAC-LC variant, so 48kbps stereo is fine (altough for music 64kbps is more appropriate) or donwmix to 32kbps mono.

    Mojopac

    Here is a great article by Lifehacker on Mojopac which is an application that lets you take your applications with you and run them on a different computer. Neither on windows nor on linux this is a trivial feat: programs nowadays write config files and libraries/dll all over the place. Since this does not look like a full virtual machine and it only “emulates” windows under windows, I guess it just intercepts all the calls from certain programs to the file system and the registry and redirects them to the virtual disk it creates. I guess it’s more similar to SandboxIE (i.e., an application sandbox) than to VMware.

    Setting up Subversion repository

    There is plenty of explanations at Version Control with Subversion but here is the short version: on the server run
    svnadmin create /path/to/repo
    to create the repository directory and setting up the needed files in that directory. On the client set up a temp directory with the three subdirectories
    branches/
    tags/
    trunk/

    and put the stuff you need in trunk/. Then in the temp directory execute
    svn import . svn+ssh://server/path/to/repo --message 'Initial import'
    So when you want to use it, checkout with
    svn co svn+ssh://server/path/to/repo/trunk repo
    and you’re on your merry way!

    Cheap HTPC cases

    Well, cheap is a relative word since if you need a LCD display in your case you’ll spend around 200€, but here are some options:

    Silverstone LC10M
    Silverstone LC03V
    Silverstone LC16M
    Antec Fusion
    Thermaltake Mozart
    Thermaletake Mozart SX
    Thermaltake bach

    More expensive are the Zalman
    Zalman HD135
    Zalman HD160

    Anyhow an external display which is HD44780 compatible should be fine.

    Batch renaming

    A few cool hints for renaming from the Mini HOWTO: Batch renaming.
    To change all .htm in .html just type
    for file in *.htm ; do mv $file `echo $file | sed 's/\(.*\.\)htm/\1html/'` ; done
    and in general
    for file in [filenamepattern] ; do mv $file `echo $file | sed 's/[search pattern]/[replace pattern]/'` ; done

    New themes!

    These days, and in particular yesterday, I tried to change the blog theme to something a little more personal… I also installed Gallery2 and so I tried to see if it was possible to integrate them. The main plugin I found is WPG2. The first isssue was that it needs Gallery2 version 2.1 or higher, and Ubuntu has an old version. So uninstall apt-get remove gallery2 and install by hand the newest one. Then you need to apply to Gallery2 a theme which makes it usable inside a wordpress blog, and so you need to install this theme and configure it using the instructions at the wiki. Then WordPress needs a theme which plays nice with Gallery2 and altough it is probably not too hard to do it by hand, some of the most famous themes have already been converted at http://dev.cal-family.org/.

    Linux: Harnessing The Über-Powerful Find Command (+xargs)

    A story from digg on other tricks for using find. Good read!
    read more | digg story

    x264 log file

    One of my interests is compression, and in particular video compression. So it is quite natural that I use x264 regularly, since it’s the best (free) H.264 compressor out there. The log files are a little bit criptic however, but I’ve found an explanation (in french!):

    itex : taille des textures pour les macroblocks intra
    ptex : taille des textures pour les macroblocks inter ( P + B )
    mv : taille des vecteurs de mouvement pour les macroblocks inter ( P + B )
    misc : taille des headers
    imb : nombre de macroblocks intra
    pmb : nombre de macroblocks inter ( P + B )
    smb : nombre de macroblocks skippés
    taille des textures : taille prise par les ciefficients DCT encodés
    taille des vecteurs de mouvement : c’est la taille en bits du vecteur encodé, pas la longueur du vecteur
    taille des headers : taille des macroblocks – taille des vecteurs – taille des textures