Usually I post here on Linux related matters, but things have been very quiet on that front. Instead I have been turning my attention to WordPress and hosting.
There is a major upheaval on the horizon with the arrival of PHP7. Most sites currently run on PHP5 but a lot of coding has been depreciated and in 7 has been eliminated altogether. So at some stage in the future, hosting companies are going to upgrade to PHP7 and sites across the board will suddenly lose a lot of functionality, or worse.
So I have been spending a considerable amount of time trawling through my sites (there's a lot of them) finding plugins that aren't PHP7 compatible. A lot of them aren't. Some of the latter are essential, in which case I contacted the authors and they updated their code (they were extremely grateful for the warning!). Some plugins that were not so critical I just replaced with suitable alternatives and some I just left to chance. The plugin I used in this part of the exercise is PHP Compatibility Checker.
Ultimately I made the switch on the majority of my sites, leaving just a few that as yet haven't got PHP7 as an option on the servers. I hope to migrate those sites to newer servers in the coming weeks.
Another factor I have been working on is to upgrade sites to secure connections, as this another way the Internet is moving. Google apparently intend to (or actually do) penalise non-secure sites.
The main problem with moving to SSL is the need for certificates, which are expensive and are beyond the scope of the hobbyist or even the small business. The simple answer I found is to move all sites to CloudFlare Content Delivery Network. As part of their free package they provide easily installable certificates.
Lastly (but by no means least) I used Weaver II as a theme builder on many of my sites. While this was a very powerful theme creator/customiser it is now depreciated and has been replaced by Weaver Xtreme. At first I found that the latter had a very steep learning curve and was reluctant to switch. However I persevered and eventually found that Weaver Xtreme is immensely powerful and is far superior to the old Weaver. It is also fully PHP7 compatible, uses more efficient coding and is therefore a lot faster.
In the course of all this work, I kept a stern eye on page speed, tweaking plugins (and replacing many) with an ultimate goal of getting every site on my books to load in under 3 seconds. That was not easy. One client in particular had a great fondness for sliding image galleries on his front page – six or seven of them. On of those galleries alone contained 36 images, none of which was reduced in dimensions or compressed. The overall size of the front page was well in excess of 50Mb. Plugins and tweaks can do a lot, but this was the only case where I had to intervene and strongly suggest some alternative layouts!
I recently got myself a Samsung Galaxy Trend Plus mobile phone.
I also bought a 32Gb microSD card with a view to storing some sound files. However, on connecting the device to my laptop I discovered that though I could see and read files on the SD card, I was unable to transfer files onto it. The only way to load files to the SD card was to physically remove the card and plug it into the laptop using a card adaptor, which was messy and tedious.
There is a solution however, and that is to install gMTP.
You should now see gMTP available on the main Menu (under All Applications).
Connect the phone and run the programme. Click "Connect". In the event it says that no RAW devices are found, just wait a few seconds for it to detect the phone.
Once connected you will be presented with an drop-down option of connecting to the phone or the card.
I have quite a few video files which I like to watch fro time to time.
I used to use an XBox 360 as a media player but that finally gave up the ghost. I switched to an original XBox which I got from a good friend. That too recently died the death.
A couple of weeks ago I invested in a WD TV Media Player, which is essentially a solid state interface between a file store and TV. On screen it is very similar to XBMC.
It claims to play all flavours of video. Their list states it will play AVI (Xvid, AVC, MPEG1/2/4), MPG/MPEG, VOB, MKV (h.264, x.264, AVC, MPEG1/2/4, VC-1), TS/TP/M2T (MPEG1/2/4, AVC, VC-1), MP4/MOV (MPEG4, h.264), M2TS, WMV9 and FLV (h.264).
I did however have some problems with some AVI files (I'm still waiting from a response from their Support on this). The files would play for about three to four minutes before dropping out without warning or error. The files in question play perfectly in my laptop Media, so I reckoned on a problem with the file format.
I tried converting them to MKV using HandBrake but while the resulting files apparently worked they crashed again around the thirty minute mark.
I decided to try converting to MP4.
After a lot of research and a few program downloads (that either didn't work or wouldn't do batch processing) I came across WinFF. On the face of it, that would do everything I required. However it failed on my first attempt. The solution is to install an extra package – libavcodec-extra.
I ran a test on one of my dud files and the resulting MP4 worked perfectly.
I now have a spare PC sitting quietly in a corner working its way through all my AVI files.
I have just reinstalled my full system of Linux Mint 13 MATE/Cinnamon and all is working well bar one fault – I tried to play a YouTube video and it played back at at least twice the speed. Naturally audio was non-existent too.
My first suspect was the browser, so I tried running a local MP4 file in Gnome Movie Player and ran into the same problem which eliminated the browser or any plugins.
The culprit, as I discovered is Pulse Audio.
I have Pulse Audio Volume Control installed and found the solution straight off – I went into the Configuration tab and set my soundcard configuration to "off".
In Serving up media (Part 1) a couple of weeks ago I talked about playing media streamed from a Media Server. But what about formatting media to serve up?
For the purposes of this exercise, I’m going to convert the contents of three CDs (Queen’s Greatest Hits, three CD collection) to an MP3 format for use in a Media Server.
The first thing we need is a structured file system. My technique id to create a folder for the album artist. That folder will contain folders for each album/CD. If any album is a CD boxed set (such as my Queen example) I will create a further series of folders to hold the individual CD files.
I have now created my root folder called “Queen”, and within it is a further folder – “Greatest Hits, which in turn contains three folders – Disk 1, Disk 2 and Disc 3. All that remains id to copy the contents of the three cds into the relevant folders.
As you can see, each track is names Track x.wav, where “x” is the track number.
Unfortunately, WAV files are of no use to us as we need to embed Meta information for the Media Server to catalogue the files. I will change them to MP3, as this format uses Meat information and is also compressed giving a smaller footprint on the disk.
Fire up SoundConverter. The first thing is to set preferences (found in “Edit”). I generally set the programme to place the new files in the same folder as the input, with the same name (but replacing the suffix) and delete the original. Click “Convert” and away it goes.
In SoundConverter Click on “Add Folder” and select the album folder (in my case, “Greatest Hits”) and click Select. It will then proceed to load all the files in the subfolders.
Note that SoundConverter has a lot of work to do so it will take a little time. If you were converting the entire works of Mozart it would take many hours. In my example here it took 9 minutes and 54 seconds to convert all 51 files.
W now have the original folder tree containing all our new MP3 files. The next thing is to start creating Meta Tags.
Open EasyTAG and point it to the folder “Greatest Hits”.
Note how the tracks appear in the central frame while everything else is blank.
To get started, we need to fill in any information that is common to the whole album – for example, Artist and Genre. I tend to fill in Composer and Album Artist at this time as I don’t really want to go through the hassle of finding the precise Artist for each individual track.
Firstly, I select all using the Select all button (11th from the left on the toolbar). I then enter the required information In each of the fields, and then press the wee circle button to the right of the field. The latter is important as it then applies the field to all the selected files.
Click on the Save button (9th from the left on the toolbar).
The next bit is the only really tedious bit. We have to name each track. Now I could type the name of each track by reading it off the album box, but there is a slighly less tedious method. Find the album on the Internet! Usually it will have a Wikipedia or Amazon entry and somewhere there will be a list of tracks. So all I have to do is a quick copy & paste from the web page to Title. (in my example, I found my list here) One thing we do NOT do here is use the wee circle (apply to all files) button, unless you want all tracks to have the same name!
Notice how as you modify each file, its information turns red in the centre pane. This is just an indicator that the file has had its tags modified but not saved. There is no need to save each file as you go, as at the end, we can select all and do a bulk save.
Next I select each individual Disk folder and apply the information for that disk (Album [name] and CD [optional]) and again apply it to each file in that folder. One operation which is slightly different – there is no need to enter Track #. Just press the tiny button (with the hash on it) to the left of “Track”. That will number sequentially all highlighted files but will start a new sequence for each folder, if you happen to have more than one folder open.
Once finished there is a simple test to make sure that the system is working so far. Select the album folder to load all our files and then click Tree browser (10th button from the left on the toolbar). The resulting display should show just one artist, with three CDs (and their titles) and the number of tracks in each. If it doesn’t then there is an error somewhere. The most common source of error I have found is to forget to select all before making a change to say an Album title.
The last job that needs to be done, just to add sense to it all is to rename all the actual files. They are currently still names Track 1.mp3, Track 2.mp3 etc, though their Meta information is now updated.
From the Album folder, select all files.
Now select “Scan Files” (5th button from the left on the toolbar). This will open a new small window. There are three options and we want “Rename File and Directory” There will be a text box which requires a very simple code (if the code options aren’t visible. try clicking the wee blue button with the question mark).
The code I am going to use is %n – %t which will change the existing file name to a new one consisting of the track title (%t) prefixed by the track number (%n) and a dash. I could use for example %d%n – %t which would give a four figure prefix (disk and track numbers) assuming I have entered the disk number for each disk. Whatever you chose, it will display a sample below the code input box.
you have entered the code and while all the files are selected, click on the little green button beside the dropdown box (as shown by the curser in the snapshot below)
Close the little window and click the save button. It will ask if you want to change the Meta information, but now it will also ask if you want to rename the files. Click yes and that is it!