Search This Blog

Sunday, December 14, 2014

Subtitles - Converting a DVD MKV to IDX SUB files on a Mac

I've done a few posts about subtitles, and I continue to experiment and learn all the time. If you want to read the other posts, then please have a look at:

Subtitles - Convert SUP to SRT

Ripping your DVDs and Blu Rays pt.2: Extract Subtitles for M4V / MP4 / iTunes

They may help answer your questions. This post is specifically about DVD subtitles in an MKV container. DVD subtitles are not an image, they are a text file (Blu Ray subtitles are images and are stored in SUP files).

I will be using the excellent Swedish drama 'Crimes of Passion' to demonstrate.

When you look in Handbrake you will see they appear as VOBSUB (text files):


What Handbrake does is to then apply the worst font in the world to it to create a horrible looking output:

"Good grief," thought Puck, "I can't be doing with this subtitle font..."

Ahhhh! It's horrible! It looks very jagged even on a small screen, but on a big TV it's awful! Also, if you burn it in, you can't ever turn it off. You never know, you might learn Swedish sometime... Or have Swedish friends over to watch it whilst you are cleaning the car....

Anyway, luckily, the font that Apple devices (iPad, iTunes, Apple TV) use are much nicer and it would be great to have those instead. We just need the subtitles in a file inside the MP4 container

"Well don't burn it in - just rip the subtitles as a file and turn them on in Quicktime or something" I hear you cry! Well, yes, you could try that, but Apple devices don't understand the subtitle output. Don't know why... Subler sees it just fine, but it causes Quicktime to error.

Here's how it's done (as ever, using my Mac - PC/Linux users will have to try and find equivalent software).

For this article, I used:



Handbrake

Rip the MKV to MP4 using Handbrake, but don't include the subtitles! Don't know how? Read this:

Ripping your DVDs and Blu Rays for your Apple Mac / iPod / iPhone / iPad etc

MKVToolNix

You will need a handy little tool called MKVToolNix which can be downloaded for PC, Mac and Linux. Once installed, open the program GUI and find the MKV file you are wanting to rip and "add" it. Now you want to look for the subtitle track you are after and make a note of the ID number - you'll need it in a minute:


Now you need to open Terminal, because you are going to use the non-GUI utility mkvextract, that comes bundled with MKVToolNix, to get the subtitles extracted. You will need to type the following:

/Applications/Mkvtoolnix.app/Contents/MacOS/mkvextract tracks /<MKVpath>/<MKVTitle>.mkv  <TrackNo>:/<OutputPath>/<OutputFile>.sup

<MKVpath> = the directory where your MKV is stored
<MKVTitle> = the name of the MKV
<TrackNo> = The subtitle track number you made a note of earlier
<OutputPath> = the directory where you want the subtitles
<OutputFile> = the output file name

One you hit enter, the subtitles will be extracted:


And once the progress = 100% your subtitle file is ready and waiting!

Now the program is clever - it knows these aren't images so it changes the output file to be IDX and SUB. The IDX file is the index file and the SUB file is where all the subtitle text is held. None of that matters really, it's now a text file, and as such can be understood by a wider variety of programs - including Apple products.

Subler

Good old Subler - where would I be without it - it's a brilliant utility for the Mac.

You just need to add the subtitle track and save it - I've detailed how to do that in this blog post towards the bottom of the article.

You are adding the IDX file this time, rather than the SRT, but it's the same process as before apart from that.

FINISHED!

And so here we are - the finished movie:

"At last", thought Puck, "a subtitle font I can adore..."

These subtitles are now ready to be used on your iDevices and you can set options on devices like Apple TV to make them bigger or smaller or change the font. Huzzah!


iTunes 11 and 12 Not Updating iDevice Apps Automatically

This is a doozy. I've been trying to figure out for a while now why iTunes 11 and 12 no longer updates apps on an iDevice (like an iPod or iPad) automatically. It used to be that when you plugged in an iDevice and synced it, new Apps that had been downloaded to your computer were automatically transferred to the iDevice. This hasn't been the case since iTunes 11. Progress? Not sure about that! Well, I still don't know why but I have found some workarounds. (Screenshots are from iTunes 12.01.26 on a Mac)

Automatically install new apps checkbox

In the "Apps" menu of your iDevice you will see the checkbox shown above at the bottom of the list of apps. Check it and hey presto all apps will sync....along with everything else not on the iDevice. This is fine if you are running one device, but if like me there are family members using the same iTunes account and each have different apps this isn't going to work.

Summary: fine if you want all your apps on all your devices
Command key

If you scroll down the list of apps in the "Apps" menu of you iDevice and find one that needs updating, click on the "Update" button whilst holding down the Command key. Magically, all of the icons will then turn to "Will Update"!


Now, there is a catch. If you have a lot of apps that need updating and not a lot of room on your device, you may well get an error message.



If you do, find the triangle icon with an exclamation mark and click on it:

You will get a message like this:


Panic ye not! It's just there isn't enough free space to get all the apps on in one go. Just find another "Update" button, click on it again (whilst holding the Command key) and repeat the process as before. The more free space you have, the less iterations it will take. So get rid of those old apps crowding your iDevice!

Some really large apps may be left and simply won't update in a batch. You'll have to do those one at a time or free up more space. 

If you can't free any more space, then try updating via the App Store app on the iDevice itself. If that doesn't work, you will have to free up more space or just keep the old version of the app.

It works - it's a bit manual - but it does work...

Conclusions

A bit of 'trial and error' has yielded two ways to get apps from your computer onto your iDevice. of course, I might have just missed a setting somewhere - so if I have - please leave a comment!

Friday, March 14, 2014

Citrix Receiver Mac - How To Change From Fullscreen To Window

Spent a frustrating few minutes trying to figure out how to exit Full Screen mode on Citrix Receiver with no menu and no idea what the shortcut key on the Mac was to get to the menu. Then hit my friend Google for advice. Came across a post which helped my out on the Citrix Discussion board

"ctrl + alt on the Mac keyboard was what I am looking for. It brings up the menu bar and the dock and lets you get out of the fullscreen mode."

Thanks to Matthias Hofmann for that answer!

You have chosen not to trust... - Citrix Receiver certificates for Mac

My work has a Citrix desktop meaning I can log in remotely to it using Citrix Receiver for Mac and a web browser. I recently tried to do this from my Mac (having used a Windows laptop previously with no issues) but came up against a curious error message:

"You not chosen to trust Thwaite Authority, the issuer of this servers certificate"

Really? Have I? Didn't remember not trusting anything... So off to Google I went. I found out the answer in a post on the Apple Communities from MacManiac_ which I thought I would outline here for reference.

The basic issue seems to be that Windows can navigate into the Citrix farm and get it's own certificate. The Mac cannot, without being given it explicitly. But the good news is you can copy the certificate from a Windows machine to a Mac and it will work. So you will need a Windows PC and this is how it goes:

Windows Machine Instructions:

1) From a Windows computer, log in to the Citrix Gateway once and launch any application.     This will ensure that the certificate gets installed in Windows, if it’s not already present.
2) In Windows, log out of the Citrix gateway.
3) launch Internet Explorer if not already running.
4) in IE, go to the Tools menu –> Internet Options –> Content tab
5) click the Certificates button
6) click the Intermediate Certification Authorities tab
7) find the “xxx Authority” certificate in the list (where "xxx" is the name in the certificate error from Citrix Receiver on your Mac - in my case - Thwaite Authority)
8) click the certificate once to highlight, then click Export
9) click Next
10) choose DER Encoded Binary X.509 (.CER)
11) click Next
12) click Browse, and change to the Desktop if not there already
13) in the file name field, type or paste: Network Solutions Certificate Authority
14) click Save, click Next, click Finish.
15) there should now be a file on the Windows desktop with the name
       Network Solutions Certificate Authority.cer
16) copy this file to the Mac in whatever way you normally move files.

Mac Machine Instructions:

17) on the Mac, copy the file to your desktop.
18) in Finder, go to Applications –> Utilities
19) launch Keychain Access
20) open the System keychain and import the certificate
21) restart your Macintosh and then try to access your Citrix Gateway again

This is reproduced from that post from MacManiac_ so a big shout out to him/her. This works like a charm and I was logged in and working in no time!

NOTE - I am using Windows 7 and Mac OSX 10.8.5 but I suspect it's broadly similar across operating system versions


Sunday, March 2, 2014

Subtitles - Convert SUP to SRT

Ah subtitles... When ripping Blu Rays from an MKV to M4V (MP4) they used to be quite a pain in the backside (see this previous post for details!). But if you are happy with 'burning in' subtitles (i.e. having them form part of the picture) then Handbrake v 0.9.9 will happily provide this service for you out of the box.


As you can seem you just simply go to the 'Subtitles' tab and choose the subs you want and lo and behold the Bitmap image of the subtitles will adorn your movie:


It even retains the font and colouring because these are images - not text.

Now this is fine for 'Forced Subtitles' (where the characters speak gibberish - in the case above taken from "Thor - The Dark World" - 'Dark Elven') but when you want to have the ability to turn the subtitles on and off, this won't work. These subs are burnt onto the picture. If you want to have the ability to switch languages, or something like that, the subtitles need to be stored in a file - usually a text file.

A media player like VLC does understand the subtitle files that are images natively and will happily let you turn them on and off through a menu option. iTunes or QuickTime does not support image subtitle files - only text. So how to convert the bitmap image to a text file? Well, as ever, it's a bit complex....

Fear not - I shall attempt to steer you through the pitfalls. You will need the following software:


You will need a nice MKV version of your movie with the subtitle track that you want included (no idea what I mean by that, then please refer to a previous blog post of mine on how to do this).

This walkthrough is for a Mac, with a bit of Windows PC software thrown in. I'm sure equivalent software are available for both platforms. The reason I use Subtitle Edit is a friend recommended it and I haven't found a Mac equivalent.

Let's begin...

MKVTools

(1) Open MKVTools and open your MKV file.

(2) Navigate to the "Edit" Tab and choose the subtitle track you want to export (If you aren't sure, open the MKV is something like VLC Player and fiddle with turning on the different subtitle tracks until you find the one you want, then go back into MKVTools).

(3) Check the "Extract Selected Tracks" box on the right and click "OK". Another window will open and you will see the progress of the file extraction. It will store the subsequent SUP file in the same folder as your MKV file.

UPDATE - 14th December 2014 - An alternative to MKVTools

I haven't been using MKVTools recently. I've found a better way using MKVToolNix. I've detailed how to use this in a seperate blog post (which deals with subtitles from DVDs, but can also be used to get the SUP file from Blu Rays using exactly the same method):

Subtitles - Converting a DVD MKV to IDX SUB files on a Mac

Subtitle Edit

Switching to my Windows PC now, I take my extracted file and load up Subtitle Edit

(1) Open the software and select the "Open" menu option then choose your SUP file. It will open into the "Import/OCR" screen like the image below:


(2) The software will now attempt to OCR the subtitle images. In plain english, it will scan the subtitle images and translate what it reads into plain text. No OCR is perfect, it will make mistakes (especially in a fantasy tale like Thor! - "Send in the Kursed" sugggested as being changed to "Send in the Nursed"!) but we can correct those as we go along, ignore them or sort them out later...




(3) And so you end up with an editable list where you can go and make corrections where necessary. Click into the Text box and correct away. If you want to compare it to the source images, then open up the SUP file in a tool like BDSup2Sub and browse through the file.


Now I've only scratched the surface with this program. You can look at the Subs over the video, correct timings and do all sorts of funky things. But if you've ripped the subtitles from the same MKV as you ripped the movie, then there's no need. You simple need to focus on getting the spellings and words correct.

Obviously, in my example, there aren't many lines of text. I appreciate in a fully subtitled movie there is a lot of work potentially - but that's just the way it is!

One you have finished your corrections, save your file as a SubRip (.srt) format and back to the Mac you go...

Subler

If you have read some of my other blog posts, you will know I like Subler and it makes this last step super easy. 

(1) Open up the movie (the MP4 or M4V you ripped from the MKV) and click on the + button in the top left-hand corner:


(2) Locate the SRT file you saved earlier and click "Open". You will see the screen below which you just click "Add" on:


(3) Save your work. This also assigns the subtitle a Track ID, which you will need

(4) Now click on the Subtitle track and set the following options:

Language: English (or whatever language you are using)
Alternate Group: None
Forced: All Samples Are Forced
Forced Track: Choose your subtitle track


(5) Now Save again - and you are done!

THE FINISHED MOVIE

Here's a screen shot using QuickTime player:


The text subtitles are at the bottom. QuickTime doesn't support the forcing of the subtitles. iTunes does, and so your subs should display automatically - but if they don't just choose them in the menu option manually.

SUMMARY

If it's alien speak you're after, or you will always want the subtitles on (such as in a foreign language film) then just burn them straight onto the image using Handbrake. Easy peasy and it retains the nice fonts and colours.

If you use Quick Time or iTunes, and want to turn the Subs on and off, then it's a bit of a painful process, but it works just fine.

As ever - any feedback - please leave me a comment below...