Access website via MAC address

There are several ways, how one can access a website. Using domain name (i.e. http//www.example.com/) is one of most popular. We can also use IP address (i.e. http://216.58.194.174/). In certain situations URL can be “enhanced” with port number, login and password etc.

Less known option is that in internal network you can access an URL using… MAC address. You only need to enclose it inside square brackets i.e.:

http://[49d7::2e27:fe80:fe0d:d8ff]/webservices.html

This will, of course, work in any other situation where you know MAC address of the destination device.

Remove default search engines in Opera

This is a revised and updated version of this Super User answer on how to easily remove default search engines in Opera browser. By default they’re not editable or removable at all. Official statement is, that this feature was “forgotten”. But, we all know the facts, that Opera is being paid for keeping these default search available and making removal of them as hard as possible to the end user.

Read More “Remove default search engines in Opera”

Hide right sidebar in Adobe Acrobat Reader

If you’re annoyed with Tools / Fill & Sign / Comment right sidebar in Adobe Acrobat Reader (it is pretty useless, but still occupies a lot of space), then you can hide it with a simple trick.

Press Ctrl+H or select View > Reader Mode to enable Reader Mode.

This will hide all extra stuff (all toolbars and sidebars) except actual document area. If you would like to bring left sidebar (with navigation panel etc.) back, then simply press that keyboard shortcut or select that menu option again, to disable Reader Mode. Left sidebar should return, while right sidebar should remain hidden.

Private repository with public issues on GitHub

On contrary to BitBucket, GitHub does not allow you to have private repository with public issues. But, you can setup a two different repositories — private for code hosting and public for issues (read more in GitHub Help). And, what is most important and what not everyone knows — GitHub’s commit message’s grammar parsing is powerful enough to handle crossed commits.

Read More “Private repository with public issues on GitHub”

Multi-folder usage of IrfanView’s batch mode

Batch conversion tool (B in main screen or File > Batch Conversion/Rename) in IrfanView is both flexible and powerful tool that allows you (as menu item says) to: quickly convert many images, quickly rename many files or mix these two operations.

The Add All button in mentioned tool’s window is even more powerful, because it lets you add files (to be converted or renamed) from given folder and all subfolders. But not everyone knows, that the same goes for saving converted files. They also can be placed by IrfanView in many folders

Read More “Multi-folder usage of IrfanView’s batch mode”

Shortcuts for direct TeamViewer session on Windows desktop

To quickly access some partner or remote computer in TeamViewer 10, you can login to your account, check to be always logged it, and add particular machine to the list there. Each time you start TeamViewer, you’ll have list of your computer ready in a window to the right. All you have to do, is to double click any item in that list. Can it be even faster? Can we initiate TeamViever session to particular machine or customer by double clicking icon on Windows desktop? Sure thing, we can!

Read More “Shortcuts for direct TeamViewer session on Windows desktop”

Plural formula in PHP to evaluate ending for a number in Polish language

Providing correct plural form of countable words in English is easy, because there is a difference only between one (1 item) and other (0 items, 2 items, 5 items etc.).

In Polish (and some other languages) this is much harder, because Polish has two different plural forms and plural form of countable words is way, way more complicated and based sometimes not only on whole number but also on last digit of this number etc.

Read More “Plural formula in PHP to evaluate ending for a number in Polish language”

Legal user right to resell software purchased in EU

Software licensed under COA, OEM and similar licenses can be legally sold on European Union area, according to Court of Justice of the European Union’s verdict dated July 3, 2012. It judged that both private persons and companies can sold original software and licensees purchased from companies like Microsoft.

This judgement is a direct interpretation of the law of European Union directive 2001/29/WE, which says that producer’s law for an exclusive distribution ceases with the moment of software selling for the first time and producer or IT company cannot legally block any attempt of re-selling such software attempted by the person or company, who initially purchased it.

Cyclic jobs in Yii and MySQL

When we are talking about some cyclic tasks executed periodically in PHP, most of us automatically thinks about CRON. It is not surprising, since it is very popular, easy to manage (available often even on shared hostings) and easy to code (it simply fires given PHP script).

However, there are four other ways you can achieve exactly the same in Yii/PHP. And many Yii developers may not be aware about some of them.

Read More “Cyclic jobs in Yii and MySQL”

Migrate PuTTY sessions between computers

PuTTY is one of the first programs, that I install on every computer. Since, it stores sessions in registry, it is a bit difficult to migrate sessions between computers. So far, I manage to do this with a little bit help of regedit.exe program and guides like this one. Today, unfortunately, I hit the wall, when my brand new installed Windows 7 told me, that it can’t merge entries from my putty.reg file, because it can’t access Windows Registry.

Read More “Migrate PuTTY sessions between computers”

Key difference between GPL and BSD licenses

For the project, I’m working on, I came over Plupload library, which is dual-licensed on GPL+OEM model. Since paying commercial license (OEM) in this project is not an option, I told my boss, that we can’t use this library, because we’d have to publish all our project’s sources as open source (base GPL licensing requirement).

He told me, that this is not true, because both PHP and Yii, that we use, are licensed in the same model.

I was so sure, that I’m correct, that I immediately made some research and wrote this article as a summary of all my findings. I was more than happy to prove my boss, that he is wrong! :>

If you think similarly to my boss, then you should definitely read this post.

Read More “Key difference between GPL and BSD licenses”

Remove file from repository and from all revisions [updated]

Say, that you have commited to a Git repository, a file, that contains sensitive or confidential information. You want to literally purge it from the repository history.

Simple git rm --cached <file> won’t do the trick. It will remove a file from the repository (keeping it in your working directory), but it will still keep the file in history. What now?

Read More “Remove file from repository and from all revisions [updated]”

Reverse geolocation with OpenStreet Maps reverse geocoder. Pros and cons

Reverse geolocation is a process of obtaining certain geographical information (like street name, city, country etc.) based on geographical coordinates only.

OpenStreet Maps offers a cool looking (at least at first sight) reverse geocoder that can feed your application or website with a valuable geolocation data. However, as you go deeper in to the details, more cons over pros can appear.

Read More “Reverse geolocation with OpenStreet Maps reverse geocoder. Pros and cons”

List of all countries in the World, split by continent

Here is the list of 197 countries in the world, split by five continents, put as simple, not formatted list (for future use as data for some form or selection) and as HTML code.

Note, that this list contains only “full featured” countries, without any dependent territories, special municipalities, incorporated territories etc. So, you won’t find here many of the Oceania’s or Antarctic islands. Also very small, Caribbean-based dependent territories are not listed here.

Note also, that this list contains both North America’s and South’s America’s contries put together.

Read More “List of all countries in the World, split by continent”

Setup local FTP server on Windows as quickly as possible

If you ever need to setup a FTP server on your Windows machine, with minimum effort, settings, switches and work, consider using Baby FTP Server. It is really the quickest solution, that I found, for setting up local, one-time use, FTP server.

The only scratch is, that it does not support user accounts and operates on anonymous access only. But, hey! You were asking about quickest solution, right?

Read More “Setup local FTP server on Windows as quickly as possible”

Digital Ocean’s introduces AMS2 datacenter

Digital Oceans has officially opened new AMS2 datacenter in Amsterdam. This event forced me to do some small tests on quality of services, from my own (Poland’s perspective) point of view.

I’m not talking about Quality of Service, because this is beyond any discussion. With standard (simple to answer) tickets being answered with 3-5 minutes (!!!) and with more complex cases solved with 3-5 hours, Digital Ocean’s set itself a new world-standard. I have never found or met support of this scale.

So, if we’re not talking about QoS, lets talk about performance.

Read More “Digital Ocean’s introduces AMS2 datacenter”

Capturing desktop video with VideoLAN VLC

Camtasia Studio is powerful, feature-packed, probably best to use and best know software for Windows and Mac for capturing what you’re seeing and doing on screen and for creating mentoring videos with professional polish.

I would use it myself and recommend it to anyone, if it price would not simply kill me! Videos and screen captures that comes out of Camtasia are just amazing and fabulous, but they still not worth (in my opinion) paying as much as… three hundred Euro!

That’s how story of capturing screen video with VideoLAN started.

However, before you continue, consider if $300 is really a lot of money for you. By saving it (with this article) you’re slipping yourself into world of hard work, many failed tries, long time wasted and lot of angry screams in the middle of the night. Maybe it isn’t worth doing so?

GUI

First, I’m going to show you, how to capture your screen as presentation video, using “clickable” GUI way.

If you’re in hurry and don’t want to read this long article or like discovering everything yourself, look at many of example YouTube guides (for example this one or this one) and use them as starting points.

Mouse image

VLC by default captures all your mouse movement, only doesn’t display them due to lack of proper mouse cursor image. Fix that, by first getting one of them (for example this or this or search Google Graphic or any other source).

Mouse image used in VLC desktop capture must be transparent — i.e. the only accepted image formats are .gif with transparency turned on or .png with transparency as alpha channel.

Save your mouse cursor to the disk, then drag&drop it to any browser window and read (from URL bar / onibar) protocol notation of path and file name (i.e. file:///C:/mouse.png). Use it as value of screen-mouse-image parameter. I.e. add:

:screen-mouse-image=file:///C:/mouse.png

as caputre parameters. Don’t forget about trailing space to separate parameters.

This is, of course, a fake, a constant image only pretending your real mouse cursor. You’ll see it always and everywhere, no matter, if you’re in the middle of some edit box or if you’re actually seeing a hourglass, while your computer is processing some CPU-consuming task. If you want to capture your real mouse cursor, you need to use more professional software, like Camtasia Studio.

Alternative

There is an alternative approach of selecting File > Open Network Stream... (Ctrl+N) or File > Stream (Ctrl + S) and starting screen capture from this point (more information in this wikihow.com article).

It let’s you look (last step) for execution switches your clickable configuration would result in. You may try to convert these switches to command-line call of VLC (see below). Unfortunately, my execrises proven than many of them are not tranferable to command line, and usually end with error message saying that VLC is unable to parse such input string.

Command-line

VLC is the most complex program, know to me, if we talk about command-line. There are hundreds of switches and they’re wary from version to version. New version of VLC may (will) deprecate many command-line options, switches or approaches. That is why you probably won’t be able to use many examples for VLC 1.x.x in 2.0.6, for which is this guide.

Most command-line examples in the beginning are short enough to run them directly from Start > Run in Windows. As you go deeper into examples and and commands become longer, you may reach Start > Run limit of 260 characters (commands will be broken in the end and VLC won’t execute correctly). In this case, you have to run cmd and execute commands directly there (copy command and paste it using Paste from context menu).

In this case, either navigate to your VLC directory (cd "C:\Program FilesVideoLAN") and use commands starting from vlc.exe or use full path, but given in double quotes ("C:\Program FilesVideoLANvlc.exe screen:// ..."), as in default VLC installation path, there as space in Program Files which will cause cmd command to fail, if you provide full path without double quotes.

Capturing video with command-line VLC

To start VLC from command-line in screen capture mode, execute following in Windows command-line (cmd):

vlc.exe screen:// --screen-fps=10 :sout=#transcode{vcodec=h264,vb=1800,scale=1}:std{access=file,dst=test.mp4}

Correct path, if you installed VLC in other folder or get rid of it at all, if you used cd C:\Program FilesVideoLAN, to navigate to VLC folder before starting it.

This will start VLC in screen capture mode. To stop recording, press Stop button on main VLC window.

This mode is part of streaming function, so data will be written to file on-the-fly as you record your desktop. This is more resource hunger approach, but your file can be at least partially usable, if something interrupts VLC before it ends writing entire file (this does not secures you, however, from VLC crashes, in which case you’ll most likely loose your work).

You’re file will be written right away (see below), in default VLC’s codec — MP4 / MPEG 4. To record your screen in other codec, for example, in WMV2, use following command:

vlc.exe screen:// --screen-fps=10 :sout=#transcode{vcodec=WMV2,vb=1800,scale=1}:std{access=file,mux=asf,dst=output.wmv}

Follow to “Chapter 4. The command line interface” of VLC User Guide, to “Stream Output” section and “Description of the modules — standard (alias std)” subsection, for more information on formats (and proper switches) in which you can write the destination video of your screen capture.

Start minimized

If you execute above example, you’ll see, that though you started VLC from command line, its window is clearly seen on captured video, which is most likey an unwanted effect. To get rid of it, start VLC in minimized mode, by using --qt-start-minimized switch.

With it in command-line, VLC will start mimized to traybar (an icon next to Windows clock). It will also show a ballon with screen:// message, informing you that your command-line was correct and VLC was started in screeen capture mode. There isn’t any (known to me) way of getting rid of this message directly in VLC. And this is good, as without any notice, VLC could be used to slow down your computer, while you would be most likely unaware of this fact.

There isn’t any way of getting rid of this message directly in VLC? Well… there is… You can always crop your capture area. See in the end of this article.

You can leave this small gap in the beginning of your screen capture, if it isn’t a problem for you or cut it of from final video, using nearly every video editing software.

To stop recording your screen capture, click VLC’s traybar icon with right mouse button and select Quit to exit program. To make it faster / easier, configure your taskbar to never hide VLC’s traybar icon. This moment (when you’re selecting VLC’s context menu and closing it) most likely won’t be recorded as a part of your movie, so you won’t have to edit end of your movie, to get rid of it.

FPS

Here are example configurations for different FPS speeds:

vlc.exe screen:// --qt-start-minimized --screen-fps=5 :sout=#transcode{vcodec=h264,vb=1800,scale=1}:std{access=file,dst=test-fps5.mp4}
vlc.exe screen:// --qt-start-minimized --screen-fps=10 :sout=#transcode{vcodec=h264,vb=1800,scale=1}:std{access=file,dst=test-fps10.mp4}
vlc.exe screen:// --qt-start-minimized --screen-fps=24 :sout=#transcode{vcodec=h264,vb=1800,scale=1}:std{access=file,dst=test-fps24.mp4}

For example, test screen capture video (11 seconds long) I’ve got:

  • 5 FPS = 291 kB,
  • 10 FPS = 504 kB,
  • 24 FPS = 1102 kB.

10 seconds seems fine. Recalculate and check for your needs.

Path to destination file

Without path — VLC installation dir, i.e. C:\Program Files\VideoLAN in default Windows installation.

Windows-path (C:\TEMPtest.mp4) is the only officially accepted. I.e.:

vlc.exe screen:// --qt-start-minimized --screen-fps=10 :sout=#transcode{vcodec=h264,vb=1800,scale=1}:std{access=file,dst=C:\TEMP\test.mp4}

You can also use double-slash notation (C:\TEMP\test.mp4), but this is not advised. Protocol notation (file:///TEMP/test.mp4) is prohibited and won’t work.

Mouse image

Use --screen-mouse-image switch and protocol notation path (file:///C:/mouse.png):

vlc.exe screen:// --qt-start-minimized --screen-mouse-image=file:///C:/mouse.png --screen-fps=10 :sout=#transcode{vcodec=h264,vb=1800,scale=1}:std{access=file,dst=C:\TEMPtest.mp4}

Protocol notation is the only accepted format, as of VLC 2.0.6, for specyfing mouse image. All other ways of specyfing paths, you may find in examples for VLC 1.x.x, are now invalid and will result in screen capture without mouse cursor.

Limit area

Let’s admit — recording entire screen on HD 1920×1080 display with high bitrare and frames per seconds count can produce astonishing video guides, but can be painfull on even fastest Internet connections and on even biggest cloud stores / streaming servers. Therefore, it is a good idea to do something to limit resulting file size.

In nine cases of ten you simply don’t need to capture entire screen area. You can crop it or limit it.

If screen block, that you’re presenting on your desktop capture is permanent, you can simply crop your video with vfilter parameter:

vlc.exe screen:// --qt-start-minimized --screen-mouse-image=file:///C:/mouse.png --screen-fps=10 :sout=#transcode{vcodec=h264,vb=1800,scale=1,vfilter=croppadd{cropleft=300,croptop=300,cropright=300,cropbottom=300}}:std{access=file,dst=C:\TEMPtest.mp4}

In this example, 1680×1050 full screen capture was cropped to 1080×450. Cropping 600 pixels in height and width, resulted in reducing 17 second long video from 696 kB to 296 kB, that is — by half.

You can also reduce captured desktop area, by using screen-width and screen-height parameters to pre-fix area to top, left corner of screen.

vlc.exe screen:// --qt-start-minimized --screen-width=500 --screen-height=300 --screen-mouse-image=file:///C:/mouse.png --screen-fps=10 :sout=#transcode{vcodec=h264,vb=1800,scale=1}:std{access=file,dst=C:\TEMPtest.mp4}

This is more usefull, than cropping, as in this mode, you can use additional paramter screen-follow-mouse, which will make VLC capture prefixed area of screen around your mouse pointer. Once you move it, captured “window” will also move:

vlc.exe screen:// --qt-start-minimized --screen-width=500 --screen-height=300 --screen-mouse-image=file:///C:/mouse.png --screen-follow-mouse --screen-fps=10 :sout=#transcode{vcodec=h264,vb=1800,scale=1}:std{access=file,dst=C:\TEMPtest.mp4}

This will capture a “moving region” around your mouse pointer, sized to the dimensions, you’ve provided. Notice, that this (using screen-follow-mouse parameters) can crash VLC in many versions.

Capturing video with sound

Let me start with underlining, that this is a complete new story, not just clicking some buttons or adding some extra switch to command line.

To be honest, I never follow this path. I always:

  • capture no-sound-like screen capture video with VLC,
  • play in (once finished) in VLC, recording my voice with any audio software,
  • mix audio and video streams in Format Factory to get the final product.

Here are some of my attempts to get everything in VLC.

So far, you’ve been using screen:// protocol, a special build-in VLC protocol for capturing video. Highly configurable and flexible, yet still having a large bug, that simply does not allows to capture screen and your voice (or background music) together.

You may try the input-slave switch in command-line:

vlc.exe screen:// --qt-start-minimized --screen-mouse-image=file:///C:/mouse.png --input-slave=file:///C:/audio.mp3 --screen-fps=10 :sout=#transcode{vcodec=h264,vb=1800,scale=1,acodec=mpga,ab=128,channels=2,samplerate=44100}:std{access=file,dst=C:\TEMPtest.mp4}

I failed with it so many time, that I simply give away.

Why you should not record your videos with audio?

Here are most important arguments, why (in my opinion) you should resign from adding audio or speach to your video:

  • with each additional stream (here: audio), your video file becomes larger, even using good compression coded,
  • you have to use DirectShow protocol, instead of screen://, which lacks many options and is accessible only via GUI, not via command-line,
  • if you’re focused on making good visual experience and giving audio decription in the same time, you’re twice more open for making mistakes in either,
  • your video should be self-explanatory; don’t treat your watchers as complete idiots, that must actually hear, that they need to click a button, you’re pointing on screen, etc.

If you really need audio description, record your video (with VLC) in a first pass, make yourself sure, that it is perfect in the way you would like it to be, play it yourself on screen, record audio for it, using any software (even system-bundled) and finally mix audio and video streams together (for example using VLC or any software).

Whether you’re doing mux (mixing audio and video) of your own voice (audio description) or just want to add cool background music to your video, you may consider Format Factory software. Aside being perfect (yet free) media type converter, it has also option for muxing “hidden” in extra (last) left sidebar pane.

But, can we do it in VLC?

Still not convinced? Sure, we can… But, since it requires using a different protocol, which goes far beyond area of this post, it will be covered only in minimum details.

Follow to Roger’s woze blog, to read about capturing video and audio in the same time, using VLC and DirectShow protocol. Basically, you need one or another DirectShow screen capture filters. Some of them are mentioned in separate Roger’s blog entry.
Roger has even authored his own free and open source plugin, you can grab at SourceForge.net. Download it and install.

In basic, default installation, it lets you record desktop video along with any musing played in the background. You need to use different audio player — for example Windows Media Player — if you have VLC configured to play your music. Using VideoLAN to both play background music and stream it into captured video desktop may end up in empty, unreadable output video file or even whole Universe colapse. Don’t try this at home, OK?

After simply installing plugin, start your VLC and use it like decribled above, in “GUI” section. Leave default DirectShow in Capture mode, instead of changing it into Desktop as usual. Select screen-capture-recorder for Video device name and virtual-audio-capturer as Audio device name. If they’re not appearing, hit Refresh list or restart VLC. Click on Advanced options to change other parameters, for example video aspect rate (which in default is set to 4:3). Follow other steps unchanged.

Recording this way will record your desktop with any background audio being played (that you can here through speakers or headphones).

If you want to record desktop video with your own voice, you have to re-configure your audio card to make it able to capture wave-out. Roger’s blog gives you details on how to do this in Windows XP. If you’re on Windows 7 then:

  • right-click volume control icon next to your system clock and select Recordind devices,
  • select your microphone and click on Properties button,
  • switch to Hearing tab and mark Listening to this device checkbox,
  • if you can hear, whatever your speaking to your microphone, then all is fine.

Now, you can record video from your desktop with your own audio description.

Final words

Wow, that was long one! :] And surely I didn’t plan this article turn out to be soooo long, when I sit down to write it.

And to tell you even more, this is just an tip of iceberg, what you should know or what VLC can do about screen capture with it. So, belive me or not, if you still not willing to spend that three hundred bucks for Camtasia Studio, there’s a lot of learning still before you.

And remember… “Chapter 4. The command line interface” is always your good friend! :] Though, soon you’re going to scream, next time you’ll see it…

Rotate and save a video using VLC media player

Rotating incorrectly recorded video might be painful, as many software that claims, it can do this (for example Format Factory), actually fails, usually on aspect ratio, and usually output video is ugly stretched. And here comes the solution, in form of your favorite, must-have video player, called VideoLAN VLC. Yes, that very good video player can also act as media converter, video rotation software, screen capture software and so on.

Read More “Rotate and save a video using VLC media player”

Are password-protected ZIP files really secure?

In general, password-protected .zip files can be considered secure.

Some may be surprised to find out that (without knowing the correct password) any program (or user) can:

  • browse list of files inside password-protected ZIP archive,
  • check file types (try to send encrypted, password-protected ZIP containing EXE file via Gmail).

And… there are some other “interesting” things you should be aware of…

Read More “Are password-protected ZIP files really secure?”