2019/11/19

Fix for VLC 3.X video freeze during movies

A few days ago I bough new monitor, a Philco 43" FHD. Since then, VLC started to freeze during playback on H264 MKV files.

I've been searching the web for the problem mentioned in title of this post. I have tried official solution which involves setting a higher value for file and video cache among other things. I have even upgraded it to the lastest version: 3.1.8.

But the problem persisted.

So I ended up doing the most basic thing to do when an specific software doesn't work: downgrading to a working version. Uninstalled version 3 and installed version 2.0.7 and I was able to play all H264 videos with no freeze.

Be warned thou, if you want to play H265 you will need either another player  or converting the files to H264. For converting the file, I made an script with generates an h264 dir in the current directory and then output the converted files there:

rudy@madcat3:~/bin$ cat convertir.h265.sh
#!/bin/bash
mkdir 264
for file in *.mkv
        do ffmpeg  -n -i "${file}" -map 0 -c:a aac -c:s copy -c:v libx264 264/"${file}"
done

2019/11/16

Why we shouldn't use Windows

I have been using both Windows and Linux for more than two decades. I have seen both grow, and when I see notes like this I simply can't resist the temptation to comment about it. The article is written from this viewpoint: you are a lazy/sloppy computer user and you don't care about it or you aren't even aware of it. Or perhaps you have a lot of money to spare and you don't care throwing a lot of cash to Microsoft while getting headaches in return, just because everybody uses Windows. Ok, it's almost everybody. But I think you get my point.

So, I will go one by one telling you why the editor of the article is wrong.

1. Lack of Software:

It was true at the very beginning of the Linux world back in the 90's, for the simple reason Linux was new. But at the beginning of 2000, there was a lot of software which could help you do to common task. Netscape Navigator as web browser, StarOffice as a replacement of MS Office, XMMS as replacement of WinAmp, among others. Today, most of the important software are provided for several platforms and O/S. That is: unless it comes from Microsoft or it's something specific for the Windows platform like most games, but in my scale, games aren't listed as important.

The editor also mentions Wine, it is true that not all software can run under it (perhaps a 5% of them?), specially if its new, but I have been able to successfully able to run most of the software I wanted to run under Linux. Example comes to mind: Synergy (for sharing mouse/keyboard among different machines), MySQL Administrator, Lindo, Blackmagic ATEM control software, games like Diablo 2 and Lineage 2.

When a specific software for Windows does not run under Wine, if you start it from the console it may give you clues on what happened. usually the fix involves taking an DLL and placing it on the right directory. Still YMMV. As a side note, the funny thing is: under Windows, most of the time you will never get an idea of what exactly went wrong.

2. Software updates:

First off: ask yourself this question. Do you really need a software update?  There's an old saying which goes: if ain't broke, don't fix it.

If found myself many times downgrading software just because the newer version introduced bugs (probably as a consequence of not enough software testing). LibreOffice comes to mind. Version 5 re-introduced a bug fixed in early versions related with toolbars flashing like crazy.

Another related and relevant question for you to ask yourself: How far do you want to go in  learning how to properly use the tools you have? I ask this because I want you to be aware of this point: it's not the tool' s fault if you don't care about how to properly use it. Once you can consider yourself a master on the tool usage and if you are *really* in need of something else, then go ahead and take a peek at newer versions. But if you are the typical user who doesn't know what Ctrl-C and Ctrl-V does and you think you are satisfied it with it, then don' t bother.

A note about security: if the software you use is *very* insecure (all Windows version are, I don't care about Microsoft lies) then you should either find a replacement or make a decision to stick with it until the bomb explodes. But, at least, you have been warned.

3. Distributions:

Yeah, there's a huge tree of them. A relevant question is: So what? Each  one of these are targeted for specific user and need. I decided to stick with Slackware because its the most complete and more consistent over the years (and trust me, it's been over 20 years!).


But I have also tried others: Red Hat 7 and 8 (has been using it for some years until I came back to Slackware), Mandriva, Debian and the first one I ever used: SLS (which precedes Slackware).

Oh by the way, formally speaking, "DISTRIBUTIONS" are only a few of them (Slackware, Debian, Red Hat, Suse and another one I can't remember now). "META-DISTRIBUTIONS"  are based on "DISTRIBUTIONS". For example: Ubuntu is based on Debian.

4.Bugs:

Yeah, most software has at least 1 bug lurking. The problem with Windows is: it has too many of them, namely in the form of "features". Operating System should do what you want it to do, and I don't really care if you just want to delete the entire filesystem on your hard disk, a good one will allow you even if it wont boot anymore. On the other side and as I mentioned before, if you don't know what are you doing then it's not the tool fault.

I get really angry when Windows forbids me to delete a file because its  "protected" even with Administrator privileges (happened more than once to me while dealing with viruses).

5. Support.

Let's face it: you don't know whats happening. If you do, you can fix it yourself. But as you really don't, you have no choice and have to call in "the experts". I have earned some money and I still do. There's nothing wrong with that. I have invested too much time learning both Windows and Linux, so I consider at least fair to get paid for both my time and the time I have spent learning.

Which leads me to one conclusion: if you have a problem and you want to solve it, you can either invest money and save time, or invest time learning and save money, but you can't save both and solve the problem.

And talking about Linux: if you have an specific problem, most of the time you can get an proper answer simply by looking at linuxquestions.org.

If Windows were well made as they claim, it should not need any support. But since it does a lot of thing on your back  and they keep you as much in the dark as possible, at some point you end up needing help.

6. Drivers.

Just like point 1, this is totally outdated and false. A complete Linux distro should provide you with drivers for the most hardware around. Specific cases like Nvidia Cards might require downloading a file and execute it. But again, you will need to learn a bit.

7. Games.

Kinda true. But as I mentioned in point 1, some games run just fine under Linux. Mame has both versions for Windows and Linux and its quite fun. Software companies like ID develop both versions of their games.

Main problem with games is: developers usually use DirectX which is essentially a Microsoft library. If the Linux usage increases over the years, at some point they might have no choice but to take a took at alternatives like SDL which is a cross platform library for both Win and Linux.


8. Peripherals

Also false and same as Drivers. Most of the time I connect anything into my Linux, it works. Specially HP Printers, since HP has been doing Linux support since the 90's.

Still, you might into some hardware with doesn't have Linux drivers, usually someone else developed one for it. Just Google for it and read the instructions, just like you should under Windows.

9. Complicated:

this is the most stupid argument mentioned. Do I need to ask again the question I did in point 2? Look around you. The world IS complicated. Life IS complicated. Computers are not from outside of this world nor they came from the Heavens. Computers  are just TOOLS. If you want to take a look into Linux, your goal should be to get the results you want, no matter the cost.

Sure, the editor mentioned my case: I have over 20 years of Linux and yes, to me is a lot easier to deal with things than with Windows. But the results are far different. As a normal user under Linux I have control of everything going around. As an Administrator user under Windows I may have a sightly idea. That' s because I took the time to learn, both Windows and Linux, and I assure you, I have never been as satisfied with Windows as I had been with Linux.

10. Installing Linux is Hard.

Yeah, like everything I mentioned before, if you have read so far, you should realize its also false. Why? Because if you want to do it right, understanding how to properly install any operating system is not a trivial task. It forces you to learn a lot about a lot of things and leaving Linux alone in the middle is a fallacy.

Extras:

11. Privacy.

Since main Windows source code is not open for inspection, no-one can take a deep look to say "yes, it does respect your privacy". And trust me on this: over twenty years I have learned to don't believe anything Microsoft says.


Have you ever read a Microsoft User Agreement? If you don't I will summarize it to you: They are responsible for nothing and you can't blame them for anything that goes wrong.

So if they have a hidden Trojan horse embedded with the Operating System, all three letters agencies can take a peek on your files and your activities even if you think have nothing to hide.

Under Linux, any skilled user who noticed anything suspicious would investigate and spread the word about it like they did with SSH flaw and Bash vulnerability some years ago.

12. Cost

At the time of writting this, Wind 10 Pro version cost 200 u$s on USA which is a lot for most of the rest of the world.

Some Linux Distros may charge you for the media but esencially Linux is free.

If you have a lot of money to spare and don't care about learning, then my suggestion is: go Mac and follow a few rules: get to know your tool and don't update it unless you *really* need it. High chances are that you won't regret it.

Conclusion:

So, my conclusion is: There's no shortcuts to excellence and I honestly believe Linux is taking me to that path.

How to speed up ktorrent 4.3.1 startup

this fix is to address an specific problem with KTorrent startup, since some years ago started very slowly (about a minute) and then a popup appears complaining about a missing web file in maxmind.com

At first I tried to upgrade it but I found out newest version need a newer version of KDE. Since I decided to stick to Slackware 14.2 I had to look for alternatives.

So, here it is:

simply add a line at the end of  /etc/hosts with the following content:

0.0.0.1 geolite.maxmind.com

Close KTorrent if you have it open already then next time you start it  it will load up in a flash (It will show the popup again but this time with a different error).

2019/09/15

installing php from source

./configure --with-config-file-path=/etc/ --enable-mbstring --enable-zip --enable-bcmath --enable-pcntl --enable-exif --enable-calendar --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --enable-intl --with-curl --with-iconv --with-gmp --with-pspell --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --with-openssl --with-pdo-mysql=/usr --with-gettext=/usr --with-zlib=/usr --with-bz2 --with-apxs2=/usr/bin/apxs --with-mysqli=/usr/bin/mysql_config --with-ldap --with-libdir=lib64

rm /etc/php.ini