Borderless video with mplayer

mplayer borderless window

mplayer borderless window

Below is the command that will display borderless video with the mplayer. The command below is specific to mplayer only.

mplayer -noborder "video.mp4" -geometry 2%:98% -zoom -x 325 -y 190 -vf crop=1280:544:0:88

Here ‘-noborder’ option turns off the border of th window.

-geometry : place the video window in xoffset: 2%, yoffset: 98% from top

-zoom : resizes the actual movie size to 325×190

-vf crop= : option removes the black borders that appear in some video. This needs to be tweaked video to video.

Use -vf cropdetect to detect what needs to be used to crop the black borders

To keep video, ‘always on top’ click the video windowand then hit capital ‘T.’

Mplayer hint:
Aspect Ratio Calculator:

Download udemy course videos using youtube-dl

Tools Required

  1.  youtube-dl
  2.  youtube-dl extractors – udemy, udemy:course
$ youtube-dl --list-extractors | grep udemy

Please refer to Youtube-dl Download page for the installation.


  1.  Get link to the course to download. e.g.
  2.  Login into udemy website, save the cookie from chrome using Chrome Cookie.txt export extension. Save it to file udemycookies.txt
  3.  Get the link of the video that you want to download. usually in format. Use the command provided below where you have to replace the {course_link} and {path_to_cookies_file} with respective paths.
# $ youtube-dl {course_link} --cookies {path_to_cookies_file}

$ youtube-dl --cookies ~/udemycookies.txt

General Tips

I prefer to keep downloaded videos inside the directory. So, at first I create a normal directory and put cookies.txt into it. Then `cd` into this directory and execute the above command. This way I will have all videos downloaded into a directory.


[Solved] avconv: error while loading shared libraries:

I recently installed the youtube-dl and while running it I got the error as follows.

avconv: error while loading shared libraries: cannot open shared object file: No such file or directory


Find the one that is currently in use

$ ldd $(which ffmpeg) | grep -i "libx265"

It will display something like => /usr/lib/x86_64-linux-gnu/ (0x00007fdff37b7000)

Now, we have to create symlink to this file. In my case, I symlink to We should use the full path for both files. Use the command given below.

$ sudo ln -s "full_path_to_actual_file" "full_path_to_missing_file"

Here, actual_file is and missing_file is that was reported earlier.

$ sudo ln -s /usr/lib/x86_64-linux-gnu/libx265.s0.79 /usr/lib/x86_64-linux-gnu/

After this command was executed. My avconv started working. I can now use it with youtube-dl, ffmpeg.

[Solved] Font render issue in Ubuntu

I recently faced a font rendering issue in Ubuntu. Though I used to have
these problems before back then I used to fix these by installing the appropriate languages
from Regional and Language settings. But it didn’t work this time. I then researched
on it and have come across the following solution that might be helpful to other
having the same problem like mine. It had to follow all the way upto solution5 to get this

My System specifications:
Distributor ID: Ubuntu
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial

Solution 1:
– From Regional and Language settings install Nepali (macrolanguage). Apply
this system wide.
– if everything is fine you should see correct rendering of the Devnagiri fonts
in google chrome. This doesn’t need the logout/login to see the change.

Installed the Nepali (macrolanguage) but still you are facing the same font
rendering problem then you might want to try the below solutions one by one.

Solution 2:
– remove/rename the font that might be causing the issue.
– I preferred to rename the font instead of delete.

$ sudo mv /usr/share/fonts/truetype/freefont/FreeSerif.ttf /usr/share/fonts/truetype/freefont/FreeSerif.ttf.backup
$ sudo mv /usr/share/fonts/truetype/freefont/FreeSans.ttf /usr/share/fonts/truetype/freefont/FreeSans.ttf.backup

– for details on why it might work, see

Solution 3:
– Some websites by default use Mangal.ttf fonts that are unicode devnagiri fonts. And thus installing this font locally solves most of the rendering issue. BBC Nepali uses this font and thus if you are having problem with BBC Nepali you might want to give it a try.

Solution 4:
– During research, I also came across this bug report (
in Ubuntu which is quite not related to the problem specified here. But I thought
to give it a try by installing the fonts-lohit-deva
– Try to install the fonts-lohit-dev and see if this solves your problem

$ sudo apt-get install fonts-lohit-dev

Solution 5:
– install fontconfig-infinality and use its setstyle to linux
– please refer to this link for the instructions on how to do it.