Boxee on OSX


eduo that sounds exactly like what i am trying to achieve. The only barriers for my workflow you seem to have solved!
I have downloaded tvrenamer.pl already but I don't know hot to execute it. Is there a terminal command or something available?
Can you post or give me the program you've made for the subtitles? I found somewhere something similar but it didn't quite work on a mac...
Your help would be greatly appreciated as I am a TV Show junkie (~20 shows per season), and downloading them (thank God for TVShows.app), managing them, renaming and finding subtitles for them (I use TVSubtitles.net) is a huge pain in the A**! :(


***WARNING***: This is a LONG post. I started going and couldn't stop. I hope this is helpful for others out there.

Sigalakos,

I have simplified for the sake of the post and mixed up. The first and second steps you quoted are swapped. I move the files to their directories and then tvrenamer.pl does its thing.

[tvrenamer.pl](http://robmeerman.co.uk/coding/file_renamer) is a command-line [program in Perl](http://robmeerman.co.uk/downloads/tvrenamer.pl) which may need additional modules installed before it works. I can't remember what needed to be installed because I did it a long time ago, but I can help you with it if it's giving you grief with the condition that you document for other mac users that need it ;) (I regret not having done it back then)

My current process, somewhat more explained (I recommend clicking ALL links):

[list]
[*][TVShows](http://tvshows.sourceforge.net/index2.html) downloads torrents for the 50+ tv series we watch over the year, as they come up. [TED could do this as well](http://www.ted.nu/), and is not as dead as TVShows.
[*][Transmission](http://www.transmissionbt.com/) is checking the directory where TVShows drops its torrent files and loads the torrents, as they pop up. Other Torrent clients can work as well. I used to use [Xtorrent](http://www.xtorrentp2p.com/) for the same.
[*]Transmission finishes the download and moves the file into a TVShows directory I have just for that.
[*]I have a launchd script I created with [Lingon](http://lingon.sourceforge.net/) that runs every time there's a new file in the TVShows directory ([Launchd Plist in Lingon](http://www.grabup.com/uploads/1e7d8a77240eafb6dcae8f2eb2c49f39.png%5b)). This script ([tellme](http://pastebin.com/f791a0672)) verifies if there are new files and if there are, it moves them to another directory, says a text out loud and opens the directory.
[*]When I notice the files have been downloaded (if I'm busy or lazy I could just close the window and it will open again in the next file downloaded) I move them to their final directories(see NOTE 1)
[*]Once the files are moved, I run tvrenamer.pl (see NOTE 2) on them. TVrenamer checks the path (which includes the series name and season) and [renames the files](http://www.grabup.com/uploads/6c4fa8c5ed95d54e1011e2bda6d3e1bf.png) accordingly.
[*]Once the files are renamed (process can be automated, but it's infrequent enough that I run it manually) I execute a program [I made](http://eduo.info/soleol/) which searches subtitles in OpenSubtitles.org (see NOTE 3). My program can handle whole directories so I tend to let files accumulate [before searching their subtitles](http://www.grabup.com/uploads/f2cec154b65b4840119cd8833db469ba.png). Waiting a couple of days helps the subtitles pop-up as well (see NOTE 4).
[*]That's it.
[/list]

The process can be more automated and in fact I haven't done that because I have started adding more and more functionality into the little program I started to download the subs, and that means it is never completed.

**NOTES:**

*NOTE 1:*
These final directories always follow this structure:


/Drive/<br />
  /TV Shows/<br />
	 /TV Show Name/<br />
		/TV Show Season/



So, for example, I have [this structure](http://www.grabup.com/uploads/f008000b5c8f3bb856c8ed21211c4036.png) for Heroes:


/TV/Heroes/Heroes 1x <--- Season 1<br />
/TV/Heroes/Heroes 2x <--- Season 2



*NOTE 2:*
I believe the following command could take care of missing dependencies for the Perl Script but, as I did whatever was needed so long ago, I can no longer know:


cpan install Switch Term::ReadKey Cwd LWP::Simple3 URI::Escape Compress::Zlib File::Glob



In reality, I think I did this, but can't be 100% sure:

cpan install Switch Term Cwd LWP URI Compress File



And of course CPAN is not something that just runs. The first time it asks for dozens of questions (most of whom have adequate default values).

*NOTE 3:*
I like [OpenSubtitles](http://opensubtitles.org/) because it uses [a "fingerprinting" hash process](http://trac.opensubtitles.org/projects/opensubtitles/wiki/HashSourceCodes) that [matches video files to their subtitles](http://trac.opensubtitles.org/projects/opensubtitles/wiki/OSDb). It's a "social" site in the sense that users upload subtitles matched to specific video files. The process is very clever and reliable, although the website suffers from looking kind of over-designed at the moment.

Their whole process is [fully documented and has an open API](http://trac.opensubtitles.org/projects/opensubtitles/wiki/XMLRPC), so several of us [have made our own programs](http://trac.opensubtitles.org/projects/opensubtitles#Programsusingopensubtitles.org) for obtaining and uploading subtitles. Mine is still private, as it doesn't work yet as well as I'd want. But I've made a [Download-only version](http://forum.opensubtitles.org/viewtopic.php?p=4039) called [HdP available in my website](http://eduo.info/hdp/).

*NOTE 4:*
I should mention, even if it means my own program won't be used but for the sake of full disclosure, that there are a bunch of other alternatives for downloading subtitles from OpenSubtitles, including a [python script for XBMC](http://xbmc.org/forum/showthread.php?t=31499).

Thanks eduo for a very detailed post! :slight_smile:

I downloaded your app but it says that this beta is expired and I should download a new one. :frowning: Also, I couldn’t get tvrenamer.pl to work no matter what I tried. I tried installing cpan and stuff like that. When I run tvrenamer.pl it says there is an error on line 42 of the script. So after, 1~2 hours trying to make it work I gave up. However I would really like to use your app. I downloaded and installed the OpenSubtitles script for XBMC, but I am not that impressed by it as I have to manually search for each of the video file, instead of doing batch searches.

Anyway, thanks again for your post :slight_smile:



I find it very strange that I don't get notifications.

I can make a version of HDP that doesn't expire if you tell me what language you'd want in it. I added only english in spanish originally because that's what I needed. I assume you'd want greek?

Feel free to contact me via IM to help you out with the other stuff. The IM contacts are in the screenshot here:
[http://eduo.info/contact](http://eduo.info/contact)

I'm in Spain, so our timezones may be close.


Thanks eduo, you're being most helpful! I watch all my videos with English subtitles as too much gets lost in the translation process and my English skills are adequate. However, in some rare instances, OpenSubtitles.org offers Greek subtitles and no English ones. I think OpenSubtitles.org has its healthy dose of Greek users. So if it's not a hassle, add Greek as well for those rare moments when I do need them. If multilanguage support is not something that can be done, I'd prefer English.
Regarding tvrenamer.pl and the problems I keep having, I might as well skip that part of the equation (I lost too much time troubleshooting it already) or decide to take you up on your offer and contact you via IM for some help on installing it. :P You can send me your HDP modified version on my email anthonysigalas at gmail dot com or post a link here. I will be happy to give it a try and make it a part of my workflow. Thanks again! :)

You can try now. I have uploaded a version called SolEol which should serve your needs.



I have made a quick & dirty program page:



http://eduo.info/soleol/



Thanks! I tried it already and so far so good. It works like a charm! I'll keep on using it and report back any bugs to you. :)

I will keep updating it, adding functionality. I’d appreciate any bug reports or suggestions (there is a form for comments in the page). I just can’t allocate as much time as I’d wish to it.



Next thing in the menu is adding support for uploading subtitles. Something VITAL for the subtitle scene to continue. Otherwise we’re all leeches.



BTW, I saw your post in GoMac. Cool.

Wow, SolEol looks promising!

I’ll definately try it out when I get home!



I looked here quickly at the windows version (yeah, i'm at work...), and I'm curious, is it possible to set multiple languages? Like first choice is Dutch, but if that one isn't available, seach for an English subtitle?


Ah. This is... complicated ;)

The problem is not technical, the query methods to accept multiple language queries. Where currently you do "eng" you could do "eng,spa" for "english + spanish" search.

The problem is how to present this to the user as a preference. I wouldn't be able to use the current menu I have there, I'd have to either use a text field (no, no) or a clunky table where languages can be checked/added/otherwise marked.

If you have an idea let me know. If you have an example it would be great too.

A good compromise might be to put one additional popup menu and making only the first mandatory. Having the second optional for a secondary language, I guess.

Put comments in the original page or in the dedicated thread here in the forums (or send me messages or use the thread in my signature). I don't think it's a good idea to keep hijacking the Boxee thread.

I have never before heard about these subtitle web sites. How do I use these srt files?



Quick summary:

The "scene" realized early on that subtitles (both for hearing impaired and for non-native language speaking people) were becoming an issue. TV has CC or Teletext and DVDs have VOB Subtitles but nothing existed for standalone video files. So formats and solutions started popping up.

Bmfrosty, for whom subtitles are serious business, has posted a [quick history lesson on the origination of the formats of subtitles elsewhere](http://forums.osxbmc.com/index.php?showtopic=282&view=findpost&p=2217) but it may be enough to feed your curiosity to know that the most common text-based formats for subtitles are SRT, SUB, SMI, SSA, ASS and TXT, in that order (probably, after a quick stats check in my own library). These are all different formats and in reality are all text-files. Some can support advanced features like styling and position while others are just frame-keyed or time-keyed text.

Subtitle files can be either embedded as tracks in a container (MKV and MP4 are the most common formats with embedded subtitles, although others can as well) but the most common use is to have them located in the same directory as the original file, with the same name but different extension. Players (like XBMC or VLC or mPlayer) will pick up the file and make it available through a menu or an option (if not by default).

Multiple subtitles can be made available for a video file, if an intermediate extension is used.

Movie.avi <-- Original movie file
Movie.srt <-- Subtitles in SRT format
Movie.en.sub <-- Subtitles in english in SUB format

NOTE: I have included "TXT" as a format but in reality it's obvious it isn't so. It's just that some countries (most notably Poland) have adopted the extension because their subtitle editors (which supported special characters when others didn't) had "txt" as default extension (a design bug, which shaped a country-wide custom) and their players (which also supported special characters) auto-detected the format, so the extension was irrelevant. Now this just provokes confusion, as in the end polish (and other TXT) subtitles are in reality MicroDVD (SUB) or SubRip (SRT) files .

NOTE2: Bmfrosty may come at any time and give a much more complete/better/different version of all this. If he does so, you should believe him as I'm mostly talking out of my ass whereas he actually knows his stuff :)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.