(Last updated: 2.8.2012)
I've been looking for a good music player for advanced users. I have a large music collection (hundreds of gigs) on a server which is mounted over sshfs. My requirements are
- iTunes like UI based on tags - NOT file names and directories.
- Ability to scan the large connection over and sshfs share in reasonable time.
- Must not forget the whole database if the network share is down temporarily.
- Stay responsive. All programmers know that you shouldn't do any potentially long operations in UI thread, but most players seem to do so.
- Ability to edit tags. A large part of collection is either untagged or wrongly tagged.
Wishlist:
- Allow multiple locations to be selected for library.
- Some kind of indicator about what the scanner is doing. Ability to force re-scan of collection.
And now to the players:
Rhythmbox (Updated 30.7.2012)
The Gnome's default music player. UI is pretty slick and nice. Works pretty well, except tagging files doesn't work at all (Unable to save song information - Timeout was reached). And sometimes grays out a little bit.
If the network gets congested, Rhythmbox's UI gets totally confused and grays out. Looks like file operations are done in UI thread. This is the player i use the most, as on good day it can scan the full collection and be usable.
Amarok 2.5.0
Started scanning the library nicely and UI stays responsive. After 6 hours the
scanner progress bar hasn't moved at all and there are 0 tracks in collection.
Quod Libet
I selected the library directory and hit "Reload Library". 0 files found. Maybe it doesn't understand symlinks?
Ok, let's try playing from file system. I enter the library directory and.. The player grays out for a couple of minutes. The UI is very slow.. maybe it's scanning after all? I'll never know as i kill it.
Exaile
I add the library directory. Ui grays out just a little bit but says "Scanning collection..".
After a while it still is scanning and has found 0 songs. The Radio tab seems to work and i can play a Shoutcast radio while waiting. UI is slow, so looks like some processing is done in the UI thread.
I left exaile scanning for the weekend. On monday morning it was still scanning at 0%.
Banshee (Tested 23.11.2011, Ubuntu Oneiric)
UI seems very nice and possibly even better than Rhythmbox so this player gives a lot of hope. I added the collection directory and the app started scanning very nicely. Now, after almost 24 hours it displays 78%, uses 3.3 gigabytes of memory and is very unresponsive.
Nightingale (Tested 30.7.2012)
Download link and the ppa advertised do not work, so unable to test.
Clementine (Tested 2.8.2012)
UI looks nice and might be a good player if it works. Unfortunately it doesn't. It starts updating library and gets to 99% soon.. but the percentage drops to 85% and then back up.. until it repeadetly drops down. During scanning it doesn't add anything to library to be playable so it's impossible to see if it is really progressing. To give it a chance i left it running overnight. After over 24 hours of scanning it is "Updating library 98%" and i decide to quit it.
Conclusion
They all suck, more or less. Let me know if you find any good player to be added here. I'll try to update this post whenever i test new players.
perjantai 5. marraskuuta 2010
sunnuntai 8. elokuuta 2010
Cross-compiling Qt applications for Windows, the easy way
For a while I've been looking for a way to cross-compile my Qt app for Windows on Linux. I don't have any Windows PC's at home or at office, so native build is out of question. There are several instructions how to do this, but they involve cross-compiling the whole Qt from source and a lot of other manual work.
I found and easier way using Wine.
1. Install Nokia Qt SDK for Windows using Wine. It should install fine.
2. Create a build script that does something like this:
export QTDIR=$HOME/.wine/drive_c/Qt/2010.04
export Path=C:\\windows\\system32\\\;C:\\windows\\\;C:\\windows\\system32\\wbem\;C:\\Qt\\2010.04\\mingw\\bin\\\;C:\\Qt\\2010.04\\qt\\bin\\\;\
C:\\Program\ Files\\NSIS\\
cdapp_directory
wineconsole --backend=curses qmake.exe
wineconsole --backend=curses mingw32-make.exe
3. That's it! You should now have a working .exe in yout project directory. You can run it using wine.
When shipping your application, you need to include the required mingw and Qt DLL's with it. For example:
$QTDIR/qt/bin/mingwm10.dll
$QTDIR/qt/bin/libgcc_s_dw2-1.dll
$QTDIR/qt/bin/QtCore4.dll
$QTDIR/qt/bin/QtGui4.dll
.. and any other DLL's your app needs. Remember to use the d-versions if you build your app in debug mode.
For SQL drivers install them into directory named sqldrivers in the directory where your .exe is installed. For SQLITE the DLL is $QTDIR/qt/plugins/sqldrivers/qsqlited4.dll.
If you want to create an installer, I can recommend the open source Nullsoft installer (NSIS).
I found and easier way using Wine.
1. Install Nokia Qt SDK for Windows using Wine. It should install fine.
2. Create a build script that does something like this:
export QTDIR=$HOME/.wine/drive_c/Qt/2010.04
export Path=C:\\windows\\system32\\\;C:\\windows\\\;C:\\windows\\system32\\wbem\;C:\\Qt\\2010.04\\mingw\\bin\\\;C:\\Qt\\2010.04\\qt\\bin\\\;\
C:\\Program\ Files\\NSIS\\
cd
wineconsole --backend=curses qmake.exe
wineconsole --backend=curses mingw32-make.exe
3. That's it! You should now have a working .exe in yout project directory. You can run it using wine.
When shipping your application, you need to include the required mingw and Qt DLL's with it. For example:
$QTDIR/qt/bin/mingwm10.dll
$QTDIR/qt/bin/libgcc_s_dw2-1.dll
$QTDIR/qt/bin/QtCore4.dll
$QTDIR/qt/bin/QtGui4.dll
.. and any other DLL's your app needs. Remember to use the d-versions if you build your app in debug mode.
For SQL drivers install them into directory named sqldrivers in the directory where your .exe is installed. For SQLITE the DLL is $QTDIR/qt/plugins/sqldrivers/qsqlited4.dll.
If you want to create an installer, I can recommend the open source Nullsoft installer (NSIS).
maanantai 31. toukokuuta 2010
RC Hornet first flight
Recently I bought a F-18 Hornet model from Bananahobby.com. It's a ARF foamie which is pre-painted and looks pretty good. It has a brushless electric ducted fan motor and a 4 cell LiPo battery pack. The model took a few hours to build, most time taken by gluing wings and stabilizers and installing servo wires. The kit had a 2.4Ghz radio included and installed, but i opted to use my own DX7 with it's 7 channel receiver. If you or your friends need a cheap 4 channel RC radio set at Tampere area, let me know. I haven't tested if the receiver works with DX7 yet.
I also decided to connect left and right ailerons to different channels in receiver and thus making them flaperons with DX7's mixing functions.
Yesterday was the first flight day. First i flew with a full size sailplane (LS-8) and then made some preparations and waited for a rain shower to go away. When the rain stopped, weather was semi ok for first flight - there was some light wind but no strong gusts.

Pre-flight photo.
The flights went fine. I flew 3 flights, totalling maybe 15 minutes. I was alone at the airfield so there are no in-flight photos, sorry. The model has plenty of power - maybe close to 1:1 power to weight ratio. Cruising can be done at half throttle. It's also surprisingly stable - center of gravity is so low that it tends to correct any bank by itself. It's also pretty agile and looks great in flight. It's not easy to fly though - for example stalling can cost 10 meters of altitude easily. Landings must be done pretty carefully and at low angle to avoid hitting ground tail first.
I tried using flaps (both up and down) but they caused huge trim change and almost losing control so i didn't use them during landings yet.
The ESC that came with the kit doesn't warn about low battery by cutting power like ESC's usually do. This one just outputs less power which came as a surprise to me and caused unscheduled landing. I guess I'll have to have a stopwatch to estimate flight time left.

Construction pic. Electronics are behind the plastic door which is glued into the fuselage.

Looks like I'll have to buy a larger car if I want to get larger models than this.
Link to the model (it's on sale now!):
http://www.bananahobby.com/1940.html
I also decided to connect left and right ailerons to different channels in receiver and thus making them flaperons with DX7's mixing functions.
Yesterday was the first flight day. First i flew with a full size sailplane (LS-8) and then made some preparations and waited for a rain shower to go away. When the rain stopped, weather was semi ok for first flight - there was some light wind but no strong gusts.
Pre-flight photo.
The flights went fine. I flew 3 flights, totalling maybe 15 minutes. I was alone at the airfield so there are no in-flight photos, sorry. The model has plenty of power - maybe close to 1:1 power to weight ratio. Cruising can be done at half throttle. It's also surprisingly stable - center of gravity is so low that it tends to correct any bank by itself. It's also pretty agile and looks great in flight. It's not easy to fly though - for example stalling can cost 10 meters of altitude easily. Landings must be done pretty carefully and at low angle to avoid hitting ground tail first.
I tried using flaps (both up and down) but they caused huge trim change and almost losing control so i didn't use them during landings yet.
The ESC that came with the kit doesn't warn about low battery by cutting power like ESC's usually do. This one just outputs less power which came as a surprise to me and caused unscheduled landing. I guess I'll have to have a stopwatch to estimate flight time left.
Construction pic. Electronics are behind the plastic door which is glued into the fuselage.
Looks like I'll have to buy a larger car if I want to get larger models than this.
Link to the model (it's on sale now!):
http://www.bananahobby.com/1940.html
perjantai 26. helmikuuta 2010
Converting music to mp3 in place
I bought a new car stereo a while ago. I'm not going to specifics about it as this is not a car hifi blog. What's interesting is that the player can play mp3's from CD, USB memory and SD card.
My digital audio collection is mostly in ogg and flac format for better quality/file size and the player can't handle them. I tried to find a nice solution to mass convert files from ogg/flac to mp3 but none of them were satisfactory so i wrote my own script:
#!/bin/bash
# Convert flac & ogg audio to low quality mp3 for mobile playing.
# By Ville Ranki
find -type f -name "*.flac" -o -name "*.ogg" | while read file
do
outfile=`echo $file | sed 's/\.[^\.]*$/.mp3/'`
echo "Converting $file to $outfile"
gst-launch-1.0 filesrc location="$file" ! decodebin ! audioconvert ! lamemp3enc target=quality quality=4 ! id3v2mux ! filesink location="$outfile"
if [ -f "$outfile" ];
then
echo "Removing original $file"
rm "$file"
else
echo "Error: File $outfile was not created."
fi
done
This script will find recursively all files in current directory, convert them to mp3's (while preserving id3 tags) and delete the original files. It preserves directories as they are - my car player should be able to browse by directory although i haven't figured out how to do so.
I use it by copying wanted music to a temporary directory, run the script in the directory and copy the results to usb stick or other media.
Make sure you have all the commands installed before running the script, such as gst-launch-0.10. Also don't run the script where the original collection is or you'll lose it. Copy files somewhere else first.
I hope this is helpful for others with the same problem.
(Updated 23.7.2015 for gst-launch-1.0 and simplified the script at the same time)
My digital audio collection is mostly in ogg and flac format for better quality/file size and the player can't handle them. I tried to find a nice solution to mass convert files from ogg/flac to mp3 but none of them were satisfactory so i wrote my own script:
#!/bin/bash
# Convert flac & ogg audio to low quality mp3 for mobile playing.
# By Ville Ranki
find -type f -name "*.flac" -o -name "*.ogg" | while read file
do
outfile=`echo $file | sed 's/\.[^\.]*$/.mp3/'`
echo "Converting $file to $outfile"
gst-launch-1.0 filesrc location="$file" ! decodebin ! audioconvert ! lamemp3enc target=quality quality=4 ! id3v2mux ! filesink location="$outfile"
if [ -f "$outfile" ];
then
echo "Removing original $file"
rm "$file"
else
echo "Error: File $outfile was not created."
fi
done
This script will find recursively all files in current directory, convert them to mp3's (while preserving id3 tags) and delete the original files. It preserves directories as they are - my car player should be able to browse by directory although i haven't figured out how to do so.
I use it by copying wanted music to a temporary directory, run the script in the directory and copy the results to usb stick or other media.
Make sure you have all the commands installed before running the script, such as gst-launch-0.10. Also don't run the script where the original collection is or you'll lose it. Copy files somewhere else first.
I hope this is helpful for others with the same problem.
(Updated 23.7.2015 for gst-launch-1.0 and simplified the script at the same time)
sunnuntai 13. joulukuuta 2009
Sergei gunsight without the cover
I'd like to add a couple more photos about the gunsight and how it looks without the cover. The cover reduces some glare and is good for anti-aircraft guns but for aircraft it may block visibility too much so most ww2 aircraft have the gunsight without any cover.
Well, here are the photos:

Side view. The reflector glass is in 45 degree angle.
Another view
Looking through the gunsight.
Looking through, from longer distance

This is what it looks like from top of the gunsight. It shows the reticle through the glass and inverted reflection.
For the simpit i'll naturally remove the cover. This way the gunsight looks just like any WW2 fighter's gunsight. At least il2 supports removing any on-screen sights so maybe i'll even get to play some games with hardware gunsight. Otherwise it'll just look cool :-)
Btw notice how the size of reticle is always the same regardless of the distance. That's how the reflection gunsight (and modern HUDs) are supposed to work.
Next step is to mount the thing to the simpit. Let's see when that happens, as i have some other projects (hacks) to do such as the RC 109 used as practice target in photos above.
Well, here are the photos:

Side view. The reflector glass is in 45 degree angle.
Another view
Looking through the gunsight.
Looking through, from longer distance
This is what it looks like from top of the gunsight. It shows the reticle through the glass and inverted reflection.
For the simpit i'll naturally remove the cover. This way the gunsight looks just like any WW2 fighter's gunsight. At least il2 supports removing any on-screen sights so maybe i'll even get to play some games with hardware gunsight. Otherwise it'll just look cool :-)
Btw notice how the size of reticle is always the same regardless of the distance. That's how the reflection gunsight (and modern HUDs) are supposed to work.
Next step is to mount the thing to the simpit. Let's see when that happens, as i have some other projects (hacks) to do such as the RC 109 used as practice target in photos above.
perjantai 11. joulukuuta 2009
Sergei gunsight illuminated
Long time no post.
Today i built a light for the sergei gunsight i've had for some time. It illuminates the reticle so it's more visible in various lighting conditions. Here's the photos:
Lamp assembly is mounted on the bottom of the gunsight. The assembly is actually a plastic cap from a Pisang Ambon liquer bottle.

This is the lamp holder, looking inside. Inside i put a piece of paper to spread the light evenly. Without the paper reticle was uneven as the light bulb could be seen through the reticle.

Photos taken with my new Nokia N900 phone. Less bad than the previous ones.
Today i built a light for the sergei gunsight i've had for some time. It illuminates the reticle so it's more visible in various lighting conditions. Here's the photos:
Lamp assembly is mounted on the bottom of the gunsight. The assembly is actually a plastic cap from a Pisang Ambon liquer bottle.
This is the lamp holder, looking inside. Inside i put a piece of paper to spread the light evenly. Without the paper reticle was uneven as the light bulb could be seen through the reticle.

This shows the whole reticle. Pretty nice!
Photos taken with my new Nokia N900 phone. Less bad than the previous ones.
lauantai 25. huhtikuuta 2009
F-18 simulator on TV
They showed Finnish Air Force's WTSAT F-18 simulator on tv in "Äijät" tv show. It's in Finnish, but i think everyone understands what's the idea. See the whole episode at:
http://www.sub.fi/netti-tv/index.shtml/ohjelmat/aijat?12856
Also getting to fly a Hawk is quite cool.
http://www.sub.fi/netti-tv/index.shtml/ohjelmat/aijat?12856
Also getting to fly a Hawk is quite cool.
Tilaa:
Blogitekstit (Atom)

