Page 12 of 25

Re: POSTBUCKET - where random posts in unrelated topics go

Posted: 14 Jan 2014, 00:04
by rednoah
You'd have to modify the script to re-encode into Windows-1256, probably easier to just do a post processing script that turns UTF-8 into Win-1256, though any text file really should be in UTF-8, that would safe the world a lot of trouble.

Re: [CODE] Examples and Snippets

Posted: 16 Jan 2014, 14:16
by Ithiel
Here's an example of running two commands in a single command line:

Code: Select all

cmd /c filebot -get-subtitles "%1" -non-strict --lang en --log-file context.log && filebot -get-subtitles "%1" -non-strict --lang da --log-file context.log
The above example is for a context menu option to download subtitles in two languages at once. If you want to string multiple commands together on a single line, simply use &&

You can also read more about using multiple commands and conditional processing symbols in the official Microsoft documentation.

Re: [MANUAL] Configure OpenSubtitles and Sublight login

Posted: 20 Feb 2014, 01:51
by neriox
I try this command:

Code: Select all

>filebot -script fn:osdb.login
and I got this >>

Code: Select all

>Enter OpenSubtitles username: XX
Enter OpenSubtitles password: XX
Testing OpenSubtitles... OK
Done ?(?????)?
But when I try this>

Code: Select all

>filebot -script osdb.stats
I got this >>

Code: Select all

FileNotFoundException: osdb.stats osdb.stats
        at net.sourceforge.filebot.cli.ArgumentProcessor$DefaultScriptProvider.g
        at net.sourceforge.filebot.cli.ArgumentProcessor.process(ArgumentProcess
        at net.sourceforge.filebot.Main.main(
Failure (░_░)
Launch4j: Failed to run the given command.
O sistema nπo pode encontrar o arquivo especificado.
What can be happened?

Re: [MANUAL] Configure OpenSubtitles and Sublight login

Posted: 20 Feb 2014, 04:32
by rednoah
For that one you need to use the latest build, the 3.8 release is too old.

Re: [SNIPPET] Sort into A-Z folders

Posted: 26 Feb 2014, 06:37
by Zerelah
Can this be changed to work with ABCD folder instead so movies beginning with a-d goes in ABCD ?
I have tried to modify this with sort to drives but with no success :(
I currently have The one with sort to drives set up but if I ever need to change paths I have to change them alll here it is just one.
Hope you understand what i mean

Re: Looking for testers on Synology NAS

Posted: 13 Mar 2014, 08:21
by Nordh
rednoah wrote: * What do you think it should like like?
* What use-cases do you have? What workflow do you think would make sense?
* What features should be supported?
Still failing to get FileBot to run on my ReadyNAS, I'm not 100% sure of all its features. When I first came to this site I was looking for a program that did a few things that I've now had to resort to several different programs to work out. I'll go through my workflow:

1a Movies downloads via Couchpotato
1b Movies are unrared and sorted via Couchpotato
(It's a good setup that doesn't need fixing.)

2a TV shows are downloaded via FlexGet
2b TV shows are unrared and moved to a "finished folder" once every day via pyexpand, this will unrar all folders in my download folder, no matter if it's been done on a previous day or not. TV shows that aren't rar:ed will fail to go to the next step because of a lack of copy-support in pyexpand, and I've found no other scripts that can do both.
2c Sickbeard renames and sorts the files in the finished folder.

Both FlexGet and Couchpotato uses Transmission for the downloads, and puts the downloads in seperate folders to make sure their scripts don't interfere with each other.

So as you can see, my step 2b really needs refinement, and that's what I hope can be found with FileBot, and since I don't use Sickbeard for its webui database of TV shows, only for its renamer, it would replace step 2c as well.

Unless you will be working on my 1a and 2a steps, those are the basic needs I have.

Re: [SNIPPET] Put the "The" at the end

Posted: 03 Apr 2014, 06:24
by JFMillerUSA
trying to make a batch file for uTorrent and my movie IF doesn't seem to work but the Television does any ideas

Code: Select all

IF %1==11 (
	IF /I %2==Television ("C:\Program Files\FileBot\filebot.exe" -rename %3 --db thetvdb --action move --conflict override -non-strict --output C:\Users\Jeremy\Videos\Television --format {n}\{n}.{s00e00}.{t}) 
	IF /I %2==OldMovie ("C:\Program Files\FileBot\filebot.exe" -rename %3 --db imdb --action move --conflict override -non-strict --output "C:\Users\Jeremy\Videos\Old Movies" --format {n.replaceFirst^(/^^(?i^)^(The^)\s^(.+^)/, /$2, $1/^)[0]}\{n} ^({y}^){" CD$pi"})
%1 is Status
%2 is Label
%3 is Directory of torrent

Re: Add Blacklisted Terms and Improve Movie / Series Detecti

Posted: 03 Apr 2014, 15:11
by jsmitty
rednoah, can you please add to the blacklist? it matches everything to the tv show 'the net'

thanks in advance

Re: Fetch all subtitles

Posted: 06 Apr 2014, 12:08
by Hematot
rednoah wrote: Fetch subtitles for all folders:

Code: Select all

filebot -script fn:suball /path/to/media
--def maxAgeDays=7 set a max-age for files that will be processed, older files will be ignored
View Script: ... all.groovy

Hi rednoah,
this script isn't working for me...
For some reason it thinks all the .mkv files I've tried it with already have subs, even the ones that neither MediaInfo, openelec or VLC can find any for.
I won't try to speculate why since I have no idea how getMediaInfo(file:f, format:'''{media.TextCodecList}''').isEmpty() works...
I've also tried to edit and run the script locally in order to rule out that it is the maxAgeDays part that is excluding the subs to be downloaded. Same result, see below.
Tried to find documentation on getMediaInfo and its parameters but with no luck.

Local code:

Code: Select all

// filebot -script fn:suball <options> <folder>

def lastModifiedLimit = tryQuietly{ System.currentTimeMillis() - (maxAgeDays.toLong() * 24 * 60 * 60 * 1000) }

def young = { f ->
	// ignore files that are too old
	if (lastModifiedLimit != null && f.lastModified() < lastModifiedLimit)
		return false
	return true

def unsubbed = { f ->
	// ignore files that already have subtitles
	if (getMediaInfo(file:f, format:'''{media.TextCodecList}''').isEmpty())
		return false
	return true

 * Get subtitles for all your media files  
args.eachMediaFolder {
	def videos = it.listFiles{ it.isVideo() }	
	// ignore videos that are too old or already have embedded subtitles
	videos = videos.findAll{ 
		if (!young(it)) {
			_log.finest "Too OLD: " + it.getName()
			return false
		if (!unsubbed(it)) {
			_log.finest "Already SUBBED: " + it.getName()
			return false
		return true

Code: Select all

C:\Program Files\FileBot>filebot -script "C:\Program Files\FileBot\suball.groovy
" "T:\TVserier\Xxxx\Season 01"
Already SUBBED: Xxxx - 1x01 - Pilot.mkv
Already SUBBED: Xxxx - 1x02 - Title02.mkv
Already SUBBED: Xxxx - 1x13 - Title13.mkv
No missing subtitles
Done ?(?????)?

C:\Program Files\FileBot>pause
Press any key to continue . . .

Re: POSTBUCKET - where random posts in unrelated topics go

Posted: 06 Apr 2014, 14:32
by rednoah
Looks like the condition was the wrong way around. Should be fixed now.

Re: POSTBUCKET - where random posts in unrelated topics go

Posted: 06 Apr 2014, 14:46
by Hematot
But then it thinks that none of the .mkv files I've tried it with have subs...
I wasn't clear on the fact that some, but only some, of the .mkv's are missing embedded subs.

Re: POSTBUCKET - where random posts in unrelated topics go

Posted: 06 Apr 2014, 15:13
by rednoah
Make sure to use the latest script. Works fine now:

Code: Select all

C:\testdata>filebot -script fn:suball .
Exclude: C:\testdata\evangelion 1.11 480p dual audio w-soft subs.mkv
Exclude: C:\testdata\Lawrence of Arabia (1962).mkv
Get [English] subtitles for 1 files
Looking up subtitles by filehash via OpenSubtitles
Matched [Revolution - S02E18 - Austin City Limits.mkv] to [Revolution.2012.S02E18.HDTV.x264-LOL] via filehash
Fetching []
Writing [] to [Revolution - S02E18 - Austin City]
The first two have embedded subtitles, thus get ignored. That last episode doesn't have a subtitle track, so it'll fetch subtitles.

Re: POSTBUCKET - where random posts in unrelated topics go

Posted: 06 Apr 2014, 20:18
by Hematot
Well, for me the files with no embedded subtitles still gets identified as having them.
Running the script via fn:suball which I believe always points to your current script?
If it's to any help, here's what MediaInfo reports for one of them:

Code: Select all

Unique ID                                : xxx (0xyyy)
Complete name                            : zzz
Format                                   : Matroska
Format version                           : Version 2
File size                                : 995 MiB
Duration                                 : 47mn 3s
Overall bit rate                         : 2 957 Kbps
Encoded date                             : UTC 2013-05-01 16:54:35
Writing application                      : mkvmerge v3.0.0 ('Hang up your Hang-Ups') built on Apr 19 2010 11:58:49
Writing library                          : libebml v0.7.7 + libmatroska v0.8.1

ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : [email protected]
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 9 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 47mn 3s
Bit rate                                 : 2 450 Kbps
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.111
Stream size                              : 825 MiB (83%)
Writing library                          : x264 core 130 r2273 b3065e6
Encoding settings                        : cabac=1 / ref=9 / deblock=1:1:1 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=14 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=5 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=18.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Language                                 : English
Default                                  : No
Forced                                   : No
Matrix coefficients                      : BT.709

ID                                       : 2
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Codec ID                                 : A_AC3
Duration                                 : 47mn 3s
Bit rate mode                            : Constant
Bit rate                                 : 448 Kbps
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 151 MiB (15%)
Default                                  : Yes
Forced                                   : No
For now I'll just use the getMissingSubtitles and switch to the embedded if need be!
Rock on! /Hematot

Re: POSTBUCKET - where random posts in unrelated topics go

Posted: 07 Apr 2014, 05:06
by rednoah
According to MediaInfo this file does not contain subtitles.

Have you tried checking from FileBot? Edit Format -> Variables (icon only) -> Select file and click table:

Also the fn:name always uses the latest, but only updates once a day, so you might wanna try doing -clear-cache once if I've updated the script less than a day before.

Re: POSTBUCKET - where random posts in unrelated topics go

Posted: 07 Apr 2014, 16:25
by Hematot
Exactly, it doesn't contain any subtitles but was identified as having it. Just as the ones actually having subtitles...

So I cleared the cache and ran the script again and just as expected ALL files was identified as NOT having any subtitles.
The reversing of the logical test came through but the getMediaInfo function failed to discriminate between the videos with and without embedded subtitles as before.

It took a while to find the media info function in FileBot, even with your instruction (you've hidden that function quite well!), but after trying to run it an explanation of why getMediaInfo doesn't work might have presented itself!
The result after pressing the table button was an error message saying:
Unable to load 32-bit native library 'mediainfo'

Looking in C:\Program Files\FileBot there's a 'MediaInfo.dll'.
I've just recently installed 4.0 over whatever previous version I had (3.x).
filebot -version gives 'FileBot 4.0 (r2056) / Java(TM) SE Runtime Environment 1.7.0_51'


Re: POSTBUCKET - where random posts in unrelated topics go

Posted: 07 Apr 2014, 17:18
by rednoah
Read the FAQ. You're probably running a 32-bit JVM when you should be running a 64-bit JVM. You can also check with the sysinfo script if everything is working correctly.

Re: POSTBUCKET - where random posts in unrelated topics go

Posted: 07 Apr 2014, 17:38
by Hematot
Installed the 32-bit FileBot, that did the trick!
Don't understand why FileBot worked at all though...
Thanks! /H

Re: POSTBUCKET - where random posts in unrelated topics go

Posted: 07 Apr 2014, 17:58
by rednoah
FileBot is all Java code, which is then run by a JVM, doesn't matter if it's the 32-bit or 64-bit one. Though once external native libraries, e.g. MediaInfo.dll, get linked into the process architecture must match, or the library will be ignored, that's just how programs work.

Re: POSTBUCKET - where random posts in unrelated topics go

Posted: 07 Apr 2014, 18:48
by Hematot
I get a little bit of a deja vu feeling asking this: can the getMissingSubtitles function that is called from suball recognize my existing external subtitles that are named
It downloads new ones and call them
Have I fiddled with some setting that I've forgot about?

Re: POSTBUCKET - where random posts in unrelated topics go

Posted: 07 Apr 2014, 23:43
by rednoah
Nope, currently only checks for matching 3-letter codes. But you can try the latest revision which should work for what you're trying to do.

Re: POSTBUCKET - where random posts in unrelated topics go

Posted: 08 Apr 2014, 04:44
by Hematot
Well, I installed "FileBot_4.0_x86.msi" yesterday, is there a newer revision?
Suball hasn't changed either from what I can tell... (except the fix you did on sunday)
Sorry, I don't understand; latest revision of what?

Re: POSTBUCKET - where random posts in unrelated topics go

Posted: 08 Apr 2014, 05:20
by rednoah
Latest revision of FileBot. See FAQ.

Re: POSTBUCKET - where random posts in unrelated topics go

Posted: 08 Apr 2014, 19:33
by Hematot
Thanks rednoah!
That did the trick.

Re: Exclude Blacklist & Series-Mappings

Posted: 24 Apr 2014, 21:38
by aztazt
Can you add a filter to exclude/blacklist files that match this pattern :


They are from BitTotrrent Sync while syncing and renamed by BTSync when finished.

I'm not a regexp guru but it may look like this :



Re: Exclude Blacklist & Series-Mappings

Posted: 25 Apr 2014, 02:52
by rednoah
Those !sync files don't have video extensions right? So it's already excluded from the start. Give me the complete path of one of these !sync files and how you think it affects matching in a negative way (with logs or examples).