GUI Problems? Time to Upgrade Qt

Having upgraded my FreeBSD system and VirtualBox, I found that VirtualBox does not work when invoked from the window manager’s menu. So, I tried running it from the command line, and got the following message:

/usr/local/lib/virtualbox/VirtualBox.so: Undefined symbol “_ZNK6QColor6darkerEi@Qt_5”

I tried to search the web for the cause, and found a link to a compatibility report including added symbols. My symbol was nott found there, but at least I got a clue about what I had to do: upgrade Qt5.

From some reasons I’m not notified that it’s time to upgrade my Qt5.

I found a great option for command pkg:I

pkg version| grep qt5

The output reveals the current version of a package, and if there are later versions; following is a typical output line:

qt5-printsupport-5.12.2 <

The less-then symbols indicates that there is a more recent version.

I started upgrading Qt5 packages, first qt5-core, then qt5-gui and saw a little progress: new undefined symbols. Finally, VirtualBox started working.

Another application affected by the failure to upgrade Qt5 is VLC , the famous media player from https://www.videolan.org

VLC does not show any error message, and you can run it from the command line with no problems. Specifying the path of the media device or file. For example by typing the command:

vlc cdda:///dev/cd0

if you want to listen to a compact disc.

Now, upgrading Qt5 has made VLC displaying its GUI window.

Rotate Your Movie

I have received by e-mail a rotated video in the ‘flv’ format. The video was supposed to be a vertical one, but it turned out to be horizontal, that is ROTATED. So, I wrote a little program to rotate it back using libming.
There are two things to take care of when processing the input FLV:

  • The video stream.
  • The sound stream.

Both can be taken from the FLV file.
The code is written in C++, but can be translated easily into PHP. Following is the code:

#include <iostream>
#include <mingpp.h>

using namespace std;

int main(){
  const char *flvFile ="/path/to/inputVideoFile.flv";

  // Get the video stream from the file. The input file can be in the FLV format.
  SWFVideoStream *stream = new SWFVideoStream(flvFile);

  SWFMovie mov (9);  // Create the movie object.

  // The method 'add' returns a display item.
  // Display items can be rotated, transformed, etc.
  SWFDisplayItem *di=mov.add(stream);  

  // Sound streams are taken from a file object. 
  FILE *soundFD = fopen(flvFile, "rb+");
  SWFSoundStream sound(soundFD);

  // The original dimensions of the video are 426 X 240.
  di->rotate(-90);  // Rotate the item 90 degrees clockwise
  di->move(240, 0);  // The rotation moves point (0,240) to (-240,0).


  mov.setSoundStream(&sound,0);  // Add the sound stream at the beginning
                                 // of the movie.

  // Show the frames one by one.
  int noFrames = stream->getNumFrames();
  for (int i=0; i<noFrames; i++)
      mov.nextFrame();

  mov.setDimension(240, 426); // The new dimensions.
  mov.save("/path/to/outputVideoFile.swf", 9);
  cerr<<"Fin\n";
  return 0;
}

This will create a real vertical movie. Don’t share it on YouTube or anywhere you cannot control your movie dimensions.