POSTBUCKET - where random posts in unrelated topics go

Any questions? Need some help?
User avatar
rednoah
The Source
Posts: 19159
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: POSTBUCKET - where random posts in unrelated topics go

Post 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.
:idea: Please read the FAQ and How to Request Help.
User avatar
Ithiel
Power² User
Posts: 204
Joined: 11 Jul 2013, 14:58

Re: [CODE] Examples and Snippets

Post 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.
There can be only one Power² User
neriox
Posts: 18
Joined: 04 Feb 2013, 02:14

Re: [MANUAL] Configure OpenSubtitles and Sublight login

Post 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
java.io.FileNotFoundException: osdb.stats
        at net.sourceforge.filebot.cli.ArgumentProcessor$DefaultScriptProvider.g
etScriptLocation(ArgumentProcessor.java:195)
        at net.sourceforge.filebot.cli.ArgumentProcessor.process(ArgumentProcess
or.java:106)
        at net.sourceforge.filebot.Main.main(Main.java:192)
Failure (░_░)
Launch4j: Failed to run the given command.
O sistema nπo pode encontrar o arquivo especificado.
What can be happened?
User avatar
rednoah
The Source
Posts: 19159
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [MANUAL] Configure OpenSubtitles and Sublight login

Post by rednoah »

For that one you need to use the latest build, the 3.8 release is too old.
:idea: Please read the FAQ and How to Request Help.
Zerelah
Posts: 23
Joined: 18 Feb 2014, 16:22

Re: [SNIPPET] Sort into A-Z folders

Post 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
Nordh
Posts: 5
Joined: 09 Dec 2013, 12:12

Re: Looking for testers on Synology NAS

Post 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.
JFMillerUSA
Posts: 3
Joined: 03 Apr 2014, 06:17

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

Post 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"})
	PAUSE
)
PAUSE
%1 is Status
%2 is Label
%3 is Directory of torrent
jsmitty
Posts: 1
Joined: 03 Apr 2014, 15:02

Re: Add Blacklisted Terms and Improve Movie / Series Detecti

Post by jsmitty »

rednoah, can you please add ddlvalley.net to the blacklist? it matches everything to the tv show 'the net'

thanks in advance
Hematot
Posts: 17
Joined: 31 Mar 2012, 11:33

Re: Fetch all subtitles

Post by Hematot »

rednoah wrote: Fetch subtitles for all folders:

Code: Select all

filebot -script fn:suball /path/to/media
Options:
--def maxAgeDays=7 set a max-age for files that will be processed, older files will be ignored
View Script:
https://github.com/filebot/scripts/blob ... 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
	}	
	getMissingSubtitles(file:videos)
}

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 . . .
Cheerio
/Hematot
User avatar
rednoah
The Source
Posts: 19159
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: POSTBUCKET - where random posts in unrelated topics go

Post by rednoah »

Looks like the condition was the wrong way around. Should be fixed now.
:idea: Please read the FAQ and How to Request Help.
Hematot
Posts: 17
Joined: 31 Mar 2012, 11:33

Re: POSTBUCKET - where random posts in unrelated topics go

Post 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.
User avatar
rednoah
The Source
Posts: 19159
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: POSTBUCKET - where random posts in unrelated topics go

Post 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 [Revolution.2012.S02E18.HDTV.x264-LOL.srt]
Writing [Revolution.2012.S02E18.HDTV.x264-LOL.srt] to [Revolution - S02E18 - Austin City Limits.eng.srt]
The first two have embedded subtitles, thus get ignored. That last episode doesn't have a subtitle track, so it'll fetch subtitles.
:idea: Please read the FAQ and How to Request Help.
Hematot
Posts: 17
Joined: 31 Mar 2012, 11:33

Re: POSTBUCKET - where random posts in unrelated topics go

Post 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

General
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

Video
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

Audio
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
User avatar
rednoah
The Source
Posts: 19159
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: POSTBUCKET - where random posts in unrelated topics go

Post 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:
http://snag.gy/j3DwR.jpg

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.
:idea: Please read the FAQ and How to Request Help.
Hematot
Posts: 17
Joined: 31 Mar 2012, 11:33

Re: POSTBUCKET - where random posts in unrelated topics go

Post 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'

/H
User avatar
rednoah
The Source
Posts: 19159
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: POSTBUCKET - where random posts in unrelated topics go

Post 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.
:idea: Please read the FAQ and How to Request Help.
Hematot
Posts: 17
Joined: 31 Mar 2012, 11:33

Re: POSTBUCKET - where random posts in unrelated topics go

Post by Hematot »

Installed the 32-bit FileBot, that did the trick!
Don't understand why FileBot worked at all though...
Thanks! /H
User avatar
rednoah
The Source
Posts: 19159
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: POSTBUCKET - where random posts in unrelated topics go

Post 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.
:idea: Please read the FAQ and How to Request Help.
Hematot
Posts: 17
Joined: 31 Mar 2012, 11:33

Re: POSTBUCKET - where random posts in unrelated topics go

Post 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 xxx.en.srt?
It downloads new ones and call them xxx.eng.srt.
Have I fiddled with some setting that I've forgot about?
/H
User avatar
rednoah
The Source
Posts: 19159
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: POSTBUCKET - where random posts in unrelated topics go

Post 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.
:idea: Please read the FAQ and How to Request Help.
Hematot
Posts: 17
Joined: 31 Mar 2012, 11:33

Re: POSTBUCKET - where random posts in unrelated topics go

Post 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?
/H
User avatar
rednoah
The Source
Posts: 19159
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: POSTBUCKET - where random posts in unrelated topics go

Post by rednoah »

Latest revision of FileBot. See FAQ.
:idea: Please read the FAQ and How to Request Help.
Hematot
Posts: 17
Joined: 31 Mar 2012, 11:33

Re: POSTBUCKET - where random posts in unrelated topics go

Post by Hematot »

Thanks rednoah!
That did the trick.
/H
aztazt
Posts: 3
Joined: 24 Apr 2014, 21:28

Re: Exclude Blacklist & Series-Mappings

Post by aztazt »

Can you add a filter to exclude/blacklist files that match this pattern :

*.!sync

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 :

(\.!sync)+$

Thx
User avatar
rednoah
The Source
Posts: 19159
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Exclude Blacklist & Series-Mappings

Post 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).
:idea: Please read the FAQ and How to Request Help.
Post Reply