Fix incorrect mp3 duration with mp3val

I’ve found a few files for which:

  • Video LAN for Windows was playing them without any problems (after a 1 second glitch),
  • Winamp for Windows was playing them also without problems, but showing 00:00 as each file’s duration
  • mobile player for Android failed to play them showing Cannot play content error.

A quick look-around the Internet showed that a tiny mp3val program can validate any .mp3 file and fix most errors, it finds.

Read More “Fix incorrect mp3 duration with mp3val”

Batch remove silence from many MP3 files

I’ve downloaded over fifty one hour long recordings of my church-related celebrations. As with most of such recordings, every file contains about 5-6 minutes of:

  • silence or
  • non-related sounds

in the beginning during priest’s processing, people gathering etc. Plus it concludes some silence during various moments of celebrations. I wanted to get rid of it.

I found this eleven years old question at Super User. It’s not only very old, but also off-topic (no software recommendation-like questions allowed at SU) so I decided to put my own update here.

Read More “Batch remove silence from many MP3 files”

My most popular filename patterns in MusicBrainz Picard

I am using free and powerful MusicBrainz Picard program to clean-up my entire MP3 files collection.

Aside of actual job (pooling MusicBrainz database and fixing, sorting, correcting and cleaning-up tags in your music files), it can also rename actual files on your disk in the same time.

The thing is that it uses a very complex filename pattern by default, while I am using something as simple as:

%artist% - %title%
$num(%tracknumber%,2). %title%

First for standard files and second for parts of albums. Thus, I have written them down here to keep in mind.

Read More “My most popular filename patterns in MusicBrainz Picard”

Convert Webex’s WRF files to some other video format

I had some serious troubles converting Webex’s video session, saved to .wrf file, to some other video format (namely, .mp4). I have ended up using Webex WRF2WMV Converter, but only after contacting Webex support (mostly due to a lot of incorrect information on their website).

To avoid others wasting the time the same way, here is a short memo on this topic.

Read More “Convert Webex’s WRF files to some other video format”

Media supported by Samsung 50HU6900 4K TV

Three months ago I have purchased my first 4K / UHD TV — Samsung 50HU6900 — and after some time I tried to used the built-in media player to play some of my files. At the very end it turned out that — as in all Samsung devices — this is a piece of crap, full of some strange limitations. Finally, I have reverted back to my old, good standalone FHD player and I’m using Samsung one only for UHD / 4K files.

But, for all of you, that aren’t so reluctant, here is a list of media supported by this TV (and probably many more Samsung TVs) and all the limitations, you need to fulfill in order to have your media played.

Read More “Media supported by Samsung 50HU6900 4K TV”

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:

[code language=”shell”]
:screen-mouse-image=file:///C:/mouse.png
[/code]

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):

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

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:

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

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:

[code language=”shell”]
vlc.exe screen:// –qt-start-minimized –screen-fps=5 :sout=#transcode{vcodec=h264,vb=1800,scale=1}:std{access=file,dst=test-fps5.mp4}
[/code]

[code language=”shell”]
vlc.exe screen:// –qt-start-minimized –screen-fps=10 :sout=#transcode{vcodec=h264,vb=1800,scale=1}:std{access=file,dst=test-fps10.mp4}
[/code]

[code language=”shell”]
vlc.exe screen:// –qt-start-minimized –screen-fps=24 :sout=#transcode{vcodec=h264,vb=1800,scale=1}:std{access=file,dst=test-fps24.mp4}
[/code]

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.:

[code language=”shell”]
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}
[/code]

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):

[code language=”shell”]
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}
[/code]

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:

[code language=”shell”]
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}
[/code]

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.

[code language=”shell”]
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}
[/code]

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:

[code language=”shell”]
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}
[/code]

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:

[code language=”shell”]
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}
[/code]

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”

Handling Apple’s .dmg files in Windows

If you just want to look into (or extract) contents of .dmg file, a good, old and free 7-Zip will take care of this. This should also work for Apple .sparseimage files. But, beware that (just like in case of .iso files for Windows) these formats can contain bootable information and or whole disk images (Apple .hps files), rather useless under Windows. So, for example, if someone tell you that he has Windows XP image ready to be used in VirtualPC for Macintosh, keep in mind that you rather won’t be able to use in in Windows version of VirtualPC. Or you’ll have a lot, lot of work with extraction, conversion, tune-up etc.

Read More “Handling Apple’s .dmg files in Windows”

Incorrect music or audiobook order in MP3 player

You may notice, that many MP3 players (both Windows programs — not tested on other OSs — as good as external hardwares) are making their file lists in some strange order. This may not be a big deal, when talking about music (though, when listening to a particular album, you may get yourself pissed-off as well), but became a really pain in the ass, if we’re talking about audiobooks.

Read More “Incorrect music or audiobook order in MP3 player”

Get rid of ID3v2 tag from many files at once using Winamp

If you’re an “old-school” MP3 user, and ID3 Tag version 1 data is all you need to get happy, you may find a shit stick to version 2 of ID3 Tag a little bit annoying. If it is so, then the big question is, how to quickly get rid of ID3v2 data for many files? Many programs are allowing to do a massive ID3 tags (both versions) change/edit, but there aren’t many of them that allows to delete particular tag version out of many files massively. And here comes my little trick.

Read More “Get rid of ID3v2 tag from many files at once using Winamp”