• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 15
FileBot TV Renamer and Subtitle Downloader
#16
1, thanks for clarifying

2, Sorry , I thought they had API.

Thanks for the roadmap. I really like video file hash idea of matching subtitles and I hope it will prove sufficient. Otherwise generic (for example "Dexter - S01E01.mkv") search will get multiple hits (and many of those for .avi (SD version )) which will not helps things much, me thinks.

If you need to test some stuff with newer version let me know. I will keep you posted in coming days on how current version is doing. I've set up Hazel to search for recently added files to be processed every 60 minutes for 2 days by your script. Most of the time subtitles show up 12-24 hours after the TV show airs so it should be sufficient criteria.

Thanks again.


rednoah42 Wrote:1. Yep, only OpenSubtitles and Sublight support hash lookups. Without --q there's only hash lookups.

2. I know podnapisi, as far as i know there is no XML/JSON/etc API, only people scraping the page, like what I do with subscene right now.

PS: Worked the whole day on super-charging the -get-subtitles CLI. FileBot 2.3 will auto-detect the query (like with -rename /tvshow), then match subtitles names with filenames (like matching episodes with files) and finally fetch subtitles for you, all auto-magically.
Reply
#17
Lightbulb 
wally007 Wrote:If you need to test some stuff with newer version let me know.

I've uploaded a recent build here:
http://rednoah.users.sourceforge.net/test/filebot/

btw if you're trying to complete your subtitles, maybe it's better to only fetch 1x a day, because filebot will always download all subtitles, not just ones that are missing. Using the CLI/Groovy scripting should be pretty easily to select the videos without subtitles and then get subtitles for those files only.
Reply
#18
Star 
wally007 Wrote:1, thanks for clarifying
Thanks for the roadmap. I really like video file hash idea of matching subtitles and I hope it will prove sufficient. Otherwise generic (for example "Dexter - S01E01.mkv") search will get multiple hits (and many of those for .avi (SD version )) which will not helps things much, me thinks.

Hashing is best obviously, synced to the exact file u have. But there's many many subtitles not linked to hashes yet, also there is file that u may have recorded yourself etc.

The test release i uploaded already does cross-reference subtitle names and file names. Exact/Fuzzy title matching, SxE matching, etc so the subtitles will definitely match the SxE of your show, and if you're lucky title matching will give the subtitle with the name most similar to your filename.

It's a not hash match, but it's a big improvement for looking up and matching / renaming subtitles yourself.
Reply
#19
1, I'm not trying to download subtitles for existing episodes. Only for new ones that are fetched daily.
I did notice script keeps rewriting old(er) .srt file. Is there anyway to tell the script that if .srt is present in the directory then put downloaded srt elsewhere ( or not at all ) ? --> I know it does not make sense if you run script manually but if user has cron job or some kind of automation running there's no way for me to exclude files that have already had subtitles downloaded.
If not, its not biggie, srt file is just going to get overwritten for 2 days ( in my case ) with same file Smile

2, If I run it with -q parameter, are subtitles matched by video hash still going to get priority ?

By the way, I've tried to run the script based solely on video hash and i've gotten 15 subtitles for 15 (recently aired) episodes, nicely synced so far. Can not beat that. Is it the case that these days all recent subtitles are being uploaded with video hash information?

Kind regards
Thanks !
Reply
#20
Yep, video hash has priority of course, --q query is just required in case a search is required. The new 2.3 does not require --q if the name can be auto-detected (works good for tv shows with many files, but not that well for single movie files)

15 out of 15 are linked to hashes? That is encouraging! Smile Haven't had trouble with recent movie neither. But if it's less popular/current stuff, I doubt there a hashes linked a subtitle already.

With filebot -script "completesubs.groovy" you can script just about anything, like fetching subs, but u without Groovy/Java programming skills that might be difficult.
Reply
#21
Well I rip most of my movies myself, so I did not try to run script through anything but TV Shows.

I'm going to give 2.3 a shot. I think its going to work great as according to your description of the new features, 2.3 version will download ANY subtitle that matches my SxEx episode but once it finds hash matched subtitle, it will replace it.

Is script able to determine and try to download subtitle based on SD/HD when its doing search based on file name? ( I think its safe to assume *.AVI = SD , *.MKV = HD )
Above assumes that you're able to determine SD/HD versions on subtitle sites.
Reply
#22
It's mostly determined by SxE, but also filename similarity to some degree. Matching SD/HD doesn't make much sense imho, I can only detect SD/HD from the subtitle name, which in this case would probably exactly match the release name anyway.

In anycase with string similarity matching the name of the selected subtitles should be most similar to the name of the video filename, i.e. out of all the subtitles that match your file by SxE, the one with the most similar filename will be chosen.
Reply
#23
well video files are usually renamed into generic name like "Dexter - S01E01.avi" for SD version and "Dexter - S01E01.mkv" for HD version. ( For mediacenter consumption ).

No biggie, I think video hash matching will be sufficient.
thanks !!!
Reply
#24
edit: nevermind
Reply
#25
Lightbulb 
Try this little script with the latest snapshot (r695), this will just lookup subs for movies that don't have subs yet.

Code:
args.eachMediaFolder { dir ->
    // select videos without subtitles
    def videos = dir.listFiles().findAll{ video ->
        video.isVideo() && !dir.listFiles().find{ sub ->
            sub.isSubtitle() && sub.isDerived(video)
        }
    }
    
    // fetch subtitles by hash only
    getSubtitles(file:videos, strict:true)
}
Reply
#26
1, I actually like the fact that its rewriting existing subtitle file. Reason is that if first match is based on file name , it has high probability of having sync problems. But if within 1-2 days video hash tagged subs are uploaded. I'll have proper subtitles. = win Smile

2, Tried running 2.3 version but ran into error that does not happen with 2.2 version. I guess 2.2 is only looking for hash tagged file ( which does not exist so nothing gets downloaded ) and 2.3 is trying to get subs matching file name which gives me following error:

Code:
/Users/vladik1/Downloads/FileBot.app/Contents/MacOS/JavaApplicationStub -get-subtitles --lang en --format srt PATH_TO_VIDEO_FILE.MKV

and I get response

Code:
Looking up subtitles by filehash via OpenSubtitles
Looking up subtitles by filehash via Sublight
IllegalArgumentException: Unable to auto-select query: []
Failure (?_?)
Reply
#27
wally007 Wrote:1, I actually like the fact that its rewriting existing subtitle file. Reason is that if first match is based on file name , it has high probability of having sync problems. But if within 1-2 days video hash tagged subs are uploaded. I'll have proper subtitles. = win Smile

2, Tried running 2.3 version but ran into error that does not happen with 2.2 version. I guess 2.2 is only looking for hash tagged file ( which does not exist so nothing gets downloaded ) and 2.3 is trying to get subs matching file name which gives me following error: ...


1. r695 will only lookup subtitles via hash by default. The new filename matching has to be enabled via -non-strict cmdline flag.

2. Are u using r695? I did fix that already, but the first version may still have had that problem.
Reply
#28
I'm using

Code:
FileBot_2.3.app.tar.gz    25-Nov-2011 05:12     14M

http://rednoah.users.sourceforge.net/tes...app.tar.gz
Reply
#29
Sorry, didn't bundle the new revisions. Just download the .jar file (r700) and replace the one in your app bundle [FileBot.app/Contents/Resources/Java/FileBot.jar].
Reply
#30
Still getting same error even with r700 FileBot.jar (13.9mb)

Code:
/Users/vladik1/Downloads/FileBot.app/Contents/MacOS/JavaApplicationStub -get-subtitles --lang en --format srt -non-strict /Volumes/Volume15TB/mpg_foreign2/\!Movies\!/Defendor\ \(2009\)/Defendor.mkv
Looking up subtitles by filehash via OpenSubtitles
Looking up subtitles by filehash via Sublight
IllegalArgumentException: Unable to auto-select query: []
Failure (?_?)

I ripped this video file myself, so i'm sure it does not have hash tagged subs available but both sites do have multiple Defendor subs.

rednoah42 Wrote:Sorry, didn't bundle the new revisions. Just download the .jar file (r700) and replace the one in your app bundle [FileBot.app/Contents/Resources/Java/FileBot.jar].
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 15

Logout Mark Read Team Forum Stats Members Help
FileBot TV Renamer and Subtitle Downloader6