Integrate Lychee with Google Analytics

Lychee is a cool-looking open source album script.the best reason to choose lychee is that does not compress the images(unlike imgur!). 2.can display technical information such as EXIF data. You can find more information about lychee in their website.

Now, i will show you how to integrate Google Analytics(GA) with your lychee. I assume you have already added your website to google analytics. If not

1.add your domain to google analytics the root Doc F, open index.html

Put the GA code in between <head> </head> tags as shown above. root Doc F, open view.php

Put the GA code in-between <head> and </head>


It might take up to 1 hour for GA to integrate with your website and start showing stats.

HDR to SDR Tone mapping,a practical analysis.

What is HDR?


High-dynamic-range imaging (HDRI) is a high dynamic range (HDR) technique used in imaging and photography to reproduce a greater dynamic range of luminosity than is possible with standard digital imaging or photographic techniques. The aim is to present a similar range of luminance to that experienced through the human visual system. The human eye, through adaptation of the iris and other methods, adjusts constantly to adapt to a broad range of luminance present in the environment. The brain continuously interprets this information so that a viewer can see in a wide range of light conditions.

or just watch this…


The current option’s to reproduce HDR colors in non-HDR env. are:

  • MadVR
  • Hable’s Tone Mapping (passed through pipe to mpv)
  • reinhard Tonemapping Technique (MPV’s Default)
  • Top sekret proprietary methods.(not a option :/)


I will show you example’s how above 3 methods try to produce HDR colors to SDR.(Aka. tonemapping)





madVR is a high quality DirectShow video renderer.

Designed as a no-compromise approach, madVR tries to achieve the best possible video playback quality.


View post on

Hable’s Tone Mapping


Hable’s tone mapping simply put is a algorithm.while many people conside this as very premature.the results are good.


Environment : VS pipe to MPV.

View post on


Reinhard Tonemapping


Environment :MPV.

View post on




SekretMsg v0.01

***Python3 only.***

SekretMsg (v0.01) is a simple python script(<100 lines of code) to encrypt and decrypt text/binary messages.It uses simple-crypt.





pip3 install simple-crypt

git clone



python3 [file]




python3 message.txt




Generate x264 zones from ConditionalFilter Input

Recently i have been playing with x264 and with video encoding.Sometimes it is required to use zones to preserve bitrate/quality whenever it’s needed.Usually when Denoisers or Debanding plugins are used.Most common among debanding plugin is f3kdb(Avisynth) and commanly it is used on specific scenes/ranges where there is visable banding.These ranges can either be specified through Trim() function or using conditionalFilter Trigger.

An example of a generic Conditionalfilter Input:

type int
 default 0

R 24 336 1
R 25 676 2
R 555 6776 1
R 68854 68859 2
#R 4465<--

Start Range


End Range


Condition Trigger

And for these ranges,you have to specify zones to x264 to preserve debanding effect.I wrote a small <1 KB script to automate this task:



The Zookeeper’s Wife


One of the best movie i have seen in 2017, beautifully narrated and well done acting by everyone.It certainly has WW2 vibe but lacks tense in some moments.

Jessica Chastain as always did a fab job.She is apt for the role she played.

I wish the story had given more time to few other characters to develop.we see very little about Jan Zabinski and Ryszard Zabinski.




Wayland is the best and recommended replacement to Xorg. Almost every Linux distribution these days come with xorg,  maybe because of its compactability with huge range of hardware but Xorg is decades old and its time to change,  For Good!Wayland is expected to replace Xorg in Ubuntu family and other major linux distro’s.

What is Wayland?

Wayland is intended as a simpler replacement for X, easier to develop and maintain. GNOME and KDE are expected to be ported to it.

Wayland is a protocol for a compositor to talk to its clients as well as a C library implementation of that protocol. The compositor can be a standalone display server running on Linux kernel modesetting and evdev input devices, an X application, or a wayland client itself. The clients can be traditional applications, X servers (rootless or fullscreen) or other display servers.

Part of the Wayland project is also the Weston reference implementation of a Wayland compositor. Weston can run as an X client or under Linux KMS and ships with a few demo clients. The Weston compositor is a minimal and fast compositor and is suitable for many embedded and mobile use cases.





To Install wayland in Kubuntu 17.04:


1.Run in terminal/Konsole

sudo apt install plasma-workspace-wayland





3.On Left corner you can choose your desktop.Select plasma (Wayland)


4.Enjoy Wayland 🙂



I experienced noticeable improvements in graphics and video playback compared to Xorg.Bugs are to be expected, as wayland is very much still in active development.


Using TOR with Python

What is Tor?

Tor is free software and an open network that helps you defend against traffic analysis, a form of network surveillance that threatens personal freedom and privacy, confidential business activities and relationships, and state security.


Tor Project – Home


There are many misleading answers in stack exchange on “how to use tor with python?” essentially, how to route python traffic via TOR.A while back, i stumbled upon the same question and wasted lot of time trying Stack exchange method’s only to figure out that i am not looking in the right place.

The right way to do it can be found in Tor Stem Documents.



A Mildly edited (by me) version : 😉




Installing VapourSynth in Ubuntu/Mint


Tested with Ubuntu 17.04+ and Mint 18+

VapourSynth is an application for video manipulation. Or a plugin. Or a library. It’s hard to tell because it has a core library written in C++ and a Python module to allow video scripts to be created. It came to be when I started thinking about alternative designs for Avisynth and most of it was written over a 3 month period. The software has been heavily inspired by Avisynth and aims to be a 21st century rewrite, taking advantage of the advancements computers have made since the late 90s. The main features compared to Avisynth are:

  • Multithreaded – Frame level multithreading
  • Generalized Colorspaces – New Colorspaces can be specified at runtime
  • Per Frame Properties – Additional metadata can be attached to frames
  • Python Based – The scripting part is implemented as a Python module so you don’t have have to learn a special language
  • Support for video with format changes – Some video just can’t stick to one format or frame size VapourSynth can handle any kind of change


Installing VapourSynth in Ubuntu/Mint



Add repository for ubuntu :

sudo add-apt-repository ppa:djcj/vapoursynth
sudo apt-get update

Install dependencies:

sudo apt-get install build-essential yasm libass-dev python3-pip python3-dev cython3 autoconf libtool libmagick++-dev qt5-default libfftw3-dev

sudo apt-get install ffmpeg

sudo apt-get install fftw3

sudo apt-get install mpv

sudo apt-get installnnedi3-weights

sudo apt-get install vapoursynth-extra-plugins

sudo apt-get install vapoursynth-waifu2x-models


Now, Install Vspipe,VSEdit,x264:


sudo apt-get install vapoursynth

sudo apt-get install vapoursynth-editor

sudo apt-get install x264

Install l-smash:

sudo apt-get install git

git clone

cd l-smash

./configure --enable-shared

make lib

sudo make install-lib


Install zimg:

git clone

cd zimg




sudo make install


Install Vapoursynth:


git clone

cd vapoursynth




sudo make install


Linking Vapoursynth to Lib:


mkdir $HOME/.config/vapoursynth

echo 'UserPluginDir=/usr/local/lib' | sudo tee --append $HOME/.config/vapoursynth/vapoursynth.conf

echo 'include /usr/local/lib' | sudo tee --append /etc/

sudo ldconfig


And finally,Set up python path:




You can run Vapoursynth editor by running the following command:



Sample script: