Search within Lanny's blog:


Leave me comments so I know people are actually reading my blogs! Thanks!

Tuesday, August 06, 2019

Daily Battles: How to Play Two Video Clips Simultaneously and Synchronously Side-by-Side

I was trying to compare two computer vision models on how well they handle object detection on certain scenarios and wanted to see the bounding boxes from each model drawn in the same clip and compare visually side by side. So I need a way to play two clips (same clip but with different bounding boxes drawn on top of them) synchronously so I can compare the exact same frame for both clips.

Problem Statement:
Be able to play two 1:1 ratio clips side by side simultaneously and synchronously (frame synced to frame) and be able to start and pause both clips simultaneously without spending any money on new software.
It was actually not easy to find the exact solution. Let me share with you what I learned.

Option 1: iMovie App on Mac

Obviously this tool is only available on a Mac. However, it is a free tool that comes with the Mac OS, which is handy.


The iMovie app has a split screen button that let you easily place two video clips side by side. Then you can even export the resulting split screen movie to a new video clip, so you can play them side by side again and again in the future.

You basically import two clips into the app, and then drag each one to the timeline with one above the other (not drag on on top of the other, which confused me quite a while). Selecting one of them in the timeline, and then click that split screen button. That's it!

This article link below will give you all the details.

iMovie for Mac: Create a split-screen effect

However, since my two clips are 1:1 ratio, and iMovie only allows for 16:9 and 4:3 ratio, my two side by side clips all got cropped automatically (because two clips side by side becomes 2:1, which is 18:9), and I lost a section of my clip on the left side for both clips. And there is absolutely no way to create custom size ratios in iMovie. You have to pay Apple money to get their better version of the app, which doesn't meet my requirement. So this is not a solution for me!

Option 2: VLC Media Player

VLC Media Player is a free and open source cross-platform multimedia player that runs on both Windows and Mac.



Many people have posted tutorials (such as the one linked below) on how to change some settings in VLC that will allow you to open multiple instances of the VLC app, thus, allowing you to play multiple clips at the same time. You basically uncheck a few checkboxes in settings (which is not available for the Mac version and you have to do some command line trick to get it working).

VLC HowTo/Play multiple instances

But opening multiple instances of the player doesn't let me control both clips in order to simultaneously start and pause. In order to that, I have to create complicated across instance hotkeys, which I won't do.

Inside the VLC player, there are actually functionalities built in to allow you to play two clips side by side with synchronous control. In the 3.0.X versions, you go to File--Advanced Open File, and you get this screen below:
In here you can supposedly specify two different clips to be played synchronously. I was so happy when I found this, and then I was so sad when I found out it doesn't work!!

Then I found that I am not the only one suffering. Someone else has already reported a bug to VLC:

#22495 new defect: Advanced File Open - Play another media synchronously not functioning in 3.0.x

AAAAAHHHH!!!!

Anyway, if you are willing to go back to the 2.x.x versions, this function still works there. You do create security risks if you downgrade though.

So again, not a solution for me!

Option 3: QuickTime Player

QuickTime player is another Mac built in multimedia player. You can double clip on your two clips to open two QuickTime windows and drag them to be side by side. But how can you play/pause both clips at the same time?


I did find this web page below that says you can either select "Play All Movies" from the Movie menu, or press command-option-space to start both clips at the same time. But guess what? I don't have the option of "Play All Movies." That is only available in the paid version of QuickTime Pro app! Dang! And command-option-space also doesn't work!! Dang!!

Play two movies simultaneously in QuickTime Player

After many trial and error, I finally figured out what works, and you are in luck!!

To start both clips at the same time, press Command-Enter. And to pause, press Command-Enter again!

That's it! And this would meet my needs. So problem solved and for this battle, I won!

Option 4: Command Line Tools

You can also play multiple videos side by side from command line control. But this requires installing and configuring frameworks, so not for the faint-hearted.

You can use gstreamer/gst-launch pipeline described in this article.

I've also heard you can use the tiling plugin in Nvidia's DeepStream SDK.

I will eventually get those working on my computer. For now, option 3 works for me!



Video of the Day:

Think of your life challenge as a bear approaching you. Don't panic and stay calm. The problem might not be that bad!




BTW: The easiest way to remember my blog address is http://lanny.lannyland.com

Monday, August 05, 2019

Daily Battles: Google Blogger Editor Bug Removes Everything From Your Saved Draft Post

I can't believe I am blogging about a bug in Google Blogger in my daily battles blog series on Google Blogger!!

I have a blog post I saved as a draft and used as a template for all my standard formatting needs (and with images and fonts I use for things such as Tao of the Day). When I was about to start a daily battle blog post on software bugs,  I went to this draft post (I normally leave it open) so I can hit the shortcut keys ⌘+A (CTRL+A for windows) to select everything, then ⌘+C (CTRL+C for windows) to copy them, so I can go to a new post and ⌘+V (CTRL+V for windows) to paste it as a starting template.

However, by mistake, I hit ⌘+Z, instead, because the Z key is right below the A key and I've got fat fingers. Normally, ⌘+Z means undo in the computer world. However in Blogger's case, it actually deleted everything in my post draft. As I was completed puzzled, Blogger's auto save automatically kicked in and saved my draft post with nothing in it. AAAAAHHHHHH!!!!!

This can't be true! I just lost all my contents in my template!

But it is true! I can actually reproduce this bug every time!

You see, you can have a draft post like this:


And if you hit ⌘+Z, it turns into this:


And then that Save button on the upper right corner flashes into Saving, and wah-lah (viola in French), your draft has just been wiped clean and there's no way to undo that!!

Thanks Google!!

I know software all have bugs, and my programs have plenty of bugs in them too. But a bug that makes bloggers lose their drafts completely with no way to reverse the damage is a CRITICAL bug!

As a good netizen, I clicked that "Send feedback" button and reported the bug. But we all know that Google is famous for ignoring feedbacks for 10+ years, so I am not keeping my hope hight.

For now, all you bloggers out there, avoid using any shortcut key combos when you just get into a post draft. After you have already typed something in there, ⌘+Z will work correctly as undo and you are not risking losing all existing contents you thoughtfully put together into a draft post and just haven't post.

By the way, the same bug exists if you edit an already published post. But as long as you don't revert to draft, nothing gets saved, so at least you don't lose anything! Thanks God for that, because I actually tried it on a published blog post!!






You win some, and you lose some! But never give up your daily battles!







BTW: The easiest way to remember my blog address is http://lanny.lannyland.com

Sunday, August 04, 2019

Daily Battles: Why LG Electronic Dryer Cut Drying Cycle Short and Stops Drying

Appliances today can be very fancy. For example, Washers and Dryers these days can automatically detect your load and adjust washing/drying cycles automatically for best laundry experience.

However, you might notice that sometimes when you start the drying cycle, your dryer machine tells you that it will take 55 minutes, but the dryer would stop only 10-15 minutes into the drying cycle, and your laundry ended up not dry at all.

This also happened to my LG Electronic Dryer!


No need to dig up your warranty and call tech support. What most likely happened is that the load sensor in your dryer just got dirty and you happen to be doing a light load of laundry.

There are two ways to solve the problem:

First option is to clean the sensor yourself. Just pull the lint filter out (the one you have to clean each time after you dry a load of laundry, and the sensor is located inside the slot for the filter. Stick your fingers in and rub them against a metal piece you can feel to clean it. Since the sensor can get dirty easily, you really should be cleaning it each time you clean the lint filter.

Another option, which is my preferred option, is to use laundry balls when you dry your laundry. These laundry balls will make the load heavier, so the "smart" dryer won't cut the drying cycle short. You also get the added benefits of reducing wrinkles and lint and saving the need of using liquid fabric softeners and dry sheet. Laundry balls are very cheap, you can buy a 6-pack laundry balls on Amazon for only $7.99.


Happy laundrying!! Moving on to my next daily battle!!

BTW: The easiest way to remember my blog address is http://lanny.lannyland.com

Saturday, August 03, 2019

Daily Battles: Logitech K750 Wireless Solar Keyboard for Mac Not Working


If you actually follow my blog, then you'll know that my Logitech wireless solar keyboard ran out of battery yesterday. My keyboard is the exact same one shown above, a Logitech K750 Wireless Solar Keyboard for Mac, which sells for $53.97 on Amazon.

When the keyboard was working before but stops working, most likely it is out of battery. The easiest way to check is to push the sun button (upper left in the image below) and see if you get a happy face light (has battery) or a sad face light (out of battery). Note that if it is out of battery, there's no way to plug it into a power source, so your best bet is to leave it somewhere very bright during the day and leave it there for the entire day for it to charge.


However, after it has charged, it is very possible that even with a happy face, the keyboard still doesn't work. Don't panic, the fix is actually very simple. Plugged into your USB port, you'll find a 2.4GHz Wireless Receiver that looks similar to the one below. Simply unplug it and plug it into a different USB port would solve your problem and get your keyboard back working again.


Another option is to restart your Mac, and most likely the keyboard will resume working. I don't like rebooting my computers with so many things I have already running, so I'll stick with the first option.

So why do we have to do this? Well, just another bug or stupid design by Apple. Life goes on, so don't sweat too much over it.

Moving on to my next daily battles with technology!!






Key to Happiness: ARK - A random act of kindness a day.






BTW: The easiest way to remember my blog address is http://lanny.lannyland.com

Friday, August 02, 2019

Daily Battles: 64GB USB Disk Not Recognized Correctly in Windows

So it all started from me trying to move some large files between computers and smart devices. I plugged the USB drive into Jane (a Windows computer and one of Philip Jane's many physical existences where Philip Jane is my virtual smart home butler), but the USB drive only showed a capacity of 200MB.

"What's going on?" I asked myself as I correctly ejected the drive safely (following proper Windows procedures) and plugged the USB drive onto my Mac, my main computer. It showed 58GB space.

"Maybe the drive is formatted into a Mac only format," I though to myself. And sure enough, it was in the Mac OS Extended (Journaled) format.

No problem for a tech savvy geek like me! Within one minute, I have successfully formatted the USB drive in exFAT format, a format that both Mac and Windows can understand.

I unmounted the USB drive (proper Mac procedure in handing USB drives) and plugged the it into Jane again. "What the heck?" It still only showed 200MB.

"Is something wrong with Jane?" I asked myself as I promptly unplugged the USB drive from Jane and plugged it into Philip (another Windows computer and one of Philip Jane's many physical existences). This time it correctly showed the USB drive as 58GB.

"Maybe Jane just can't read exFAT," I told myself, "and I really should make it FAT32, Window's favorite disk format.

I quickly launched the disk format utility in Philip. But wait? Why isn't FAT32 an option for format? The only option available is NTFS.

After reading an article named "Help Article – Fix for “Windows Format, no FAT32 option," I got it. Turned out Windows can't format any USB drive bigger than 32GB. The article suggested that I download a free utility which will let me format the drive even though it is big. But guess what, the link sent me to a page like this:


Hey, you can't fool me! Didn't I say I am a tech savvy geek? These are advertisements disguised as a legit web page! I clicked the back button and looked at the date of that help article. Yep, that article was written in 2014, 5 years ago.

I searched again, and this time I decided to open an article named "Solved: FAT32 Option Not Available in Windows 10/8/7." This one suggested that I download a free (for home use) utility called AOMEI Partition Assistant. This one looks okay. So I happily downloaded the tool and installed in on Philip. Upon opening the utility, I realized that the utility is not even recognizing the USB drive at all.

I guess I am back to square one.

I vaguely recalled that Jane recognized the drive with a volume name of something EFI, so I plugged the USB drive back in to Jane. I was correct, the volume was named "EFI System." So I started googling EFI System. Turned out an EFI System is a bootable windows partition.

Plugging the USB drive back into Philip, I opened Disk Manager so I can look at all the partitions. The USB drive actually had two partitions, an EFI System partition, a exFAT partition, and also an unused partition.

Maybe that AOMEI tool will correctly recognize the drive is there's only one partition. I quickly deleted the unused partition and the exFAT partition. Loaded up AOMEI again. Nope, still not recognizing the drive. When I tried to delete the last EFI System partition, I found out that Windows Disk Manager doesn't let me delete this partition. All options grayed out. Great!

More searching online landed on this article: "How to Delete EFI System Partition in Windows 10/8.1/8/7/XP/Vista." Didn't want to mess with rebooting Philip using a bootable disk (since Philip is a headless computer, meaning it doesn't have a monitor plugged into it), I went all commando. And this time, I was able to delete the partition successfully. Thanks Brithny!

Going back into Disk Manager on Philip, I created a single partition and a single volume and formatted it as exFAT and went back into AOMEI again. GUESS WHAT? AOMEI still doesn't recognize the drive. What a piece of junk. I am uninstalling this %&*!

"Let's try the drive on Jane again!" I decided. And as soon as I plugged it back into Jane, the drive was recognized correctly as a 58GB drive. I didn't need FAT32 at all!!

So what was really going on here?

First, since the USB drive had both a FAT partition and a Mac OS Extended partition, on Jane, a windows computer, it recognized the FAT partition only, and on my Mac, it recognized the Mac OS Extended partition only. Nothing strange here.

Secondly, once I reformatted the Mac OS Extended partition to exFAT, Philip decided to use the exFAT partition over the FAT partition because Philip is a Windows 10 machine. And Jane decided to use the FAT partition and not the exFAT partition because Jane is a Windows 8.1 machine.

Thirdly, Windows won't let you format a USB disk to FAT32 when it is bigger than 32GB. But you can format it to exFAT and that should still work fine with Windows 8.1.

Mystery finally solved and I can finally move my large files in peace. Just another daily battle with technology, and I have come out triumphant once again! Hooray!!

Mind you that I did all these (and posted this blog) all without my Logitech wireless keyboard, which is out of battery!!

BTW: 58GB is the measurement in actual Gigabytes and 64GB really meant 64,000,000,000 Bytes. Manufactures like to call that 64GB to make it sound bigger and worth more!

Picture of the Day:

Don't ask me why I use a Mac keyboard on Philip and Jane, two Windows computers. But when this thing is dead, it is dead for a long while.




BTW: The easiest way to remember my blog address is http://lanny.lannyland.com