Page 23 of 34

Re: [DEB] Debian package

Posted: 19 Nov 2018, 12:06
by Lantizia
If I think I understand you correct, both Debian and Ubuntu have openjfx as it's own package... (which is OpenJFX v8 in Debian 9 - the latest stable version, but it'll be v11 in the next version of Debian) (again it is v8 in Ubuntu 18.04 - the latest long term version that I use, but its v11 in Ubuntu 18.10 and it'll be v11 in 19.04)

I wouldn't be able to say one way or the other how this affects FileBot as I'm not too familiar with the JFX bit.

Your "DEBIAN/control" file in the package could simply change this one line...

Code: Select all

Suggests: openjdk-10-jre, openjfx, xdg-utils, ffmpeg, mediainfo, libchromaprint-tools

Code: Select all

Recommends: openjdk-10-jre, openjfx, xdg-utils, ffmpeg, mediainfo, libchromaprint-tools
I wouldn't specify any "Depends: " unless any of those packages are critical for the core functionality of FileBot to operate normally.
If 100% of those additional packages are optional, then they need to be "Recommends: "

This is fine as *all* Debian-derived distributions I've ever encountered (BOTH servers and desktops) all install recommended packages by default.

It's only certain server-admins (like me) that manually make it system-wide policy not to install recommends on server - just so that we can see what they'd be and choose to install them after if needed to lower the security footprint of the server.

If you do make the above change, remember that in your file you can change...

Code: Select all

sudo apt-get install filebot --install-suggests
To simply be...

Code: Select all

sudo apt-get install filebot
As for the idea about CLI usage vs GUI usage. Most packages I've seen usually have a 'filebot-cli' and a 'filebot' (or filebot-gtk, filebot-ui, etc...). Essentially the 2nd package (the ui one) makes 'filebot-cli' a dependency of itself. That might be one possible thought?

But depends vs recommends vs suggests - this hasn't really got anything to do with purpose such as cli vs gui

Re: [DEB] Debian package

Posted: 27 Nov 2018, 18:33
by rednoah
FileBot 4.8.5 is now in BETA and a new Debian package is available for testing here:

:?: Feedback is welcome.

The new Debian package is now platform-independent and can work an any architecture, but that means that all native code is handled via APT dependencies, i.e. OpenJDK 11 and OpenJFX 11 is now required.

:!: You may need the latest version of Ubuntu, since older LTS releases will give you OpenJFX 8 and not OpenJFX 11 if you do apt install openjfx.

Re: [DEB] Debian package

Posted: 28 Nov 2018, 06:47
by Lantizia
Not tested this package yet - but after reading what you've wrote... this sounds like a step backwards!

Nobody in their right mind runs a non-LTS version of Ubuntu unless they're prepared to deal with the unforeseen consequences of something that...
a) only got knocked up because it happened to be either the month of April or October in a year - and not because it was actually ready or properly tested.
b) only gets support for 9 months.

It's more like a preview release in my mind - not really like bi-annual Windows 10 update... as with a non-LTS Ubuntu *every* package version changes breaking the ability to use many 3rd party bits of software which are not ready for it.

Most people (like me) who use Ubuntu in a production environment (personally for me that is definitely my place of work, but also at home as I don't want to be fixing bugs all day) will use whatever the latest LTS is (usually about 4 months after it came out to let the dust settle) and in the case of 18.04 it'll be supported until April 2023 - but most will switch to 20.04 at around August 2020 (4 months after the release of 20.04).

Please don't make this only usable on (in my opinion) non-stable Ubuntu versions only - and especially on Debian 10 only, as that thing is definitely not stable!

Re: [DEB] Debian package

Posted: 28 Nov 2018, 08:06
by rednoah
Maybe you can try it and see if there's any particular issue on 16.04 LTS or 18.04 LTS. Since I still only use Recommends the package will should install just fine on any system, allowing you to satisfy dependencies manually as needed.

AFAIK, only OpenJFX is a problem, but that's not even required at all if you're only interested in the CLI tools, and easy to install (i.e. copy files) manually if needed and that I could help automate via shell scripts.

If Java 11 is an issue, then we could consider sticking to Java 8 (which makes JavaFX work out of the box on 18.04 but not work on anything newer) but the portable tar is already there to cover people that need backwards compatibility.

Anyway, I'm open to suggestions here, especially considering that GUI users and CLI users might very likely be running on different environments.

Re: [DEB] Debian package

Posted: 28 Nov 2018, 13:16
by Lantizia
So now on a fresh Ubuntu 18.04 install (tested in a VM) - if you just download the .deb file and open/double-click it normally (letting GDebi install it graphically) you'll end up with filebot failing to load with...

/usr/bin/filebot: 14: /usr/bin/filebot: java: not found

If you use 'sudo apt -y install ./FileBot_4.8.5.deb' then you'll get...

Error: LinkageError occurred while loading main class net.filebot.Main
java.lang.UnsupportedClassVersionError: net/filebot/Main has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 54.0

Naturally these *can* be resolved after the fact... but that's not really the point :)

Installing some basic desktop application really ought to just be...
Step 1) Add the additional repository (either graphically through Software & Updates, or via command line)
Step 2) Tell your system the name of the package you want to install (again graphically or command line)

You've kind of got all the information you need, it's up to you how to do this. I suspect you don't package for Linux all that often (just a feeling).

Personally I'd whack arch-dependant versions of openjfx in to the package itself (and the package could stay multi-arch) just like you do

To be honest including only aarch64/armv7l/i686/x86_64 versions of means the package isn't really 'all' arch anyway - and the Debian lintian systems picks up on that and may warn people the package is of bad quality :S But I don't care about that personally.

Re: [DEB] Debian package

Posted: 28 Nov 2018, 14:46
by rednoah
Does apt not automatically install Recommends packages? It seems that openjdk-11-jre is not installed automatically.

:idea: Forcing things via Depends has its own pitfalls. See discussions above.

:idea: Including OpenJFX is possible, but then it's gonna be amd64 only, as OpenJFX only publishes amd64 binaries. There seem to be more and more Raspberry Pi GUI users recently, so multi-platform would be preferred.

Re: [DEB] Debian package

Posted: 28 Nov 2018, 15:10
by Lantizia
rednoah wrote: 28 Nov 2018, 08:06 If Java 11 is an issue, then we could consider sticking to Java 8 (which makes JavaFX work out of the box on 18.04 but not work on anything newer)
Another way to look at this is... don't bother giving people a .deb file at all.

Make them use the repository - it's the best way IMO. Really .deb files aren't meant to be used in this way (which is why apt only *just* like this/last year got the ability to install from them directly - granted dpkg could, but it wouldn't resolve dependencies without then calling apt-get after to fix the system).

If you stick with the repository you can do what everyone else does and instead of having...

Code: Select all

deb [arch=amd64] stable main

Code: Select all

deb raspbian-jessie main
deb raspbian-stretch main
deb [arch=amd64] trusty main
deb [arch=amd64] xenial main
deb [arch=amd64] bionic main
deb [arch=amd64] cosmic main
deb [arch=amd64] jessie main
deb [arch=amd64] stretch main
That way you can have packages that are tailored to the situation they're going to find themselves in.

Additionally I don't think Recommends are followed when installing an individual .deb package - it is something read by apt... something that is being bypassed by not installing from a repository.

Re: [DEB] Debian package

Posted: 28 Nov 2018, 17:10
by rednoah
New DEB for testing:

* Changed to amd64 only and included OpenJFX
* Changed Recommends to Depends

Code: Select all
:idea: The APT repository is built from DEB packages, so there's gonna be DEB packages regardless of whether I make them visible or not. Either way, the final release will be available via APT so users can auto-update easily.

:idea: I'd rather not maintain multiple packages for multiple platforms if at all possible.

:idea: Multi-Arch DEB for Raspbian / armhf support will come eventually, but I guess that can wait until next year. There's always the portable package in the meanwhile.

Re: [DEB] Debian package

Posted: 29 Nov 2018, 06:56
by rednoah
The FileBot 4.8.5 release now contains two additional DEB packages:

* universal (requires OpenJDK 11 and OpenJFX 11)
* universal-jdk8 (requires OpenJDK 8 and OpenJFX 8)

The universal one should work on Ubuntu 18.10 / Debian 10. The universal-jdk8 one should work on Ubuntu 16.04 LTS / Ubuntu 18.04 LTS / Debian 9 and Raspbian / Raspberry Pi (untested). Both rely on apt for all native dependencies.

Re: MediaInfo Inspector

Posted: 05 Dec 2018, 08:09
by weyb06

my expression is :

Code: Select all

{s00e00} - {t} ({resolution}_{kbps}_{vc}_{channels}_{ac}_{source}_{languages}_{lang}_{subt})
1/my 1st question is :
where does Filebot take the informations {source}, {languages}, {lang} and {subt} from ? MediaInfo for all of them ?

indeed, I have plenty of cartoons and when I look at them with MediaInfo, most of them don't have the language set, neither the source, and when i apply the expression, i get "fra" as language --> why ?

2/I don't see how Filebot could retrieve the "source", as i never saw it in MediaInfo --> does it come from MediaInfo ??? how can i set it in the cartoons ? with which tool ?

thank you very much in advance for your reply


I found mkvtoolnix to set the language, but i don't see how to set the "source" :-(

Re: MediaInfo Inspector

Posted: 05 Dec 2018, 09:20
by rednoah
weyb06 wrote: 05 Dec 2018, 08:09 where does Filebot take the informations {source}, {languages}, {lang} and {subt} from ? MediaInfo for all of them ?
Does NOT use MediaInfo:
{source} is based on the file path only, matching kown patterns such as BluRay.
{lang} and {subt} is for subtitles, matching the subtitle language suffix from the file path, or by running statistical language detection on the file contents of text-based subtitle files.

Does use MediaInfo:
{languages} is a convenience binding for reading audio languages (via libmediainfo or ffprobe depending on your install).

weyb06 wrote: 05 Dec 2018, 08:09 I don't see how Filebot could retrieve the "source", as i never saw it in MediaInfo --> does it come from MediaInfo ??? how can i set it in the cartoons ? with which tool ?
If the filename doesn't say Bluray / DVDRip / WebDL / etc then {source} won't work. If you just have the video file, then it's impossible to tell if it came from BD / DVD / Netflix / iTunes / etc. You could guess based on file size / resolution / bitrate / etc in your own format code but it's ultimately guesswork unless the file is explicitly tagged in some way.

Re: MediaInfo Inspector

Posted: 05 Dec 2018, 14:01
by weyb06

thank you for your reply !
i understand a little better how it works !

I found mkvtoolnix to set the language, but i don't see how to set the "source"
--> which property could i set (with mkvtoolnix) as the "source" so filebot recognizes/reads it with MediaInfo (and then afterwards i'll be able to get it), please ?
--> I mean to use a property i don't use to set the "source"...

EDIT : you should precise on that {lang} is for subtitles only ;-)

Re: MediaInfo Inspector

Posted: 05 Dec 2018, 14:37
by rednoah
{source} only works if a known keyword such as BluRay appears in the file path. mkvtoolnix doesn't help you there. Presumably, you can add your own custom tags though, which will then be accessible via mediainfo.

EDIT: I'll be making changes to FileBot 4.8.5 also check the media title (e.g. from mkv title tag if available) as well for bindings such as {source} that are based on the current or original filename.

Re: MediaInfo Inspector

Posted: 05 Dec 2018, 15:01
by weyb06
If i set the Mediainfo "Encoded_Library/String" parameter with "VHS" for example, how can i retrieve/read it with filebot ?
I saw there is "media" able to get <any any general media parameter>, but how do i do that please ? {media} is enough ?

Re: MediaInfo Inspector

Posted: 05 Dec 2018, 15:53
by rednoah
You can access any media info property by name.

Object/Property style:

Code: Select all

Map/Key style:

Code: Select all


Re: MediaInfo Inspector

Posted: 05 Dec 2018, 16:42
by weyb06
ok i get it !

Q : i have set the language with mkvtoolnix, and i can see "Language/String: en" in the audio section of Mediainfo, so why do i get [fra] with {languages} in my expression ?


Re: MediaInfo Inspector

Posted: 06 Dec 2018, 00:15
by rednoah

{languages} is the TheTVDB language / TheMovieDB spoken languages field.

{audioLanguages} is the convenience binding for accessing audio languages (as List of Language objects).

{audio.LanguageString} is direct access for the Language/String value for each audio stream.

Re: [TAR] How to install FileBot on Linux / FreeBSD / Solaris / any Unix OS

Posted: 17 Jan 2019, 14:47
by elgallo
I am on FreeBSD 12, when trying to install filebot I get the following error

Code: Select all

~/filebot-portable# sh -script fn:sysinfo java: not found
which version of java should I use/search for?

Re: [TAR] How to install FileBot on Linux / FreeBSD / Solaris / any Unix OS

Posted: 17 Jan 2019, 14:49
by rednoah
The *-portable.tar.xz package is compiled for Java 8.

Re: [JDownloader] Setup for Windows, Linux and Mac OS X

Posted: 18 Jan 2019, 18:45
by chest069

I am trying to setup and run your JDownloader script and can't seem to get it to work.

I am using Windows 10 64 bit and JDownloader2 (instead of JDownloader) to download my files to a folder and that is the folder I would then like to be processed by filebot and you AMC script.

I figured out how to install the scripting plugin in to JDownloader2 and I created a script based on what you posted here and the following web site ... downloader .

When I test run it in the scripter it seems to work but nothing is happening when the download completes. My files are not processed by filebot or the AMC script.

I'm new to this and trying to learn, please help. Also where do I put the files I download that you created if that is the issue.

Re: [JDownloader] Setup for Windows, Linux and Mac OS X

Posted: 18 Jan 2019, 18:53
by rednoah
The first step is to figure out if JDownloader is calling your scripts at all. The JDownloader logs might give some indication. JDownloader forums might also be helpful on general JDownloader help and support.

Note that if you're on Windows, you'll need to use the *.cmd script and not the *.sh script, so you'll modify this line:

Code: Select all

var script = JD_HOME + '/'
and replace it with the path to your *.cmd script:

Code: Select all

var script = 'C:/jdownloader-postprocess.cmd'
where script is the absolute path to the cmd script you want to execute, i.e. jdownloader-postprocess.cmd

Re: [JDownloader] Setup for Windows, Linux and Mac OS X

Posted: 20 Jan 2019, 18:27
by chest069
Sorry for the late reply and thanks for the suggestion.

I did make a event script/trigger from other things I read and added your suggestion. Here is the event script/trigger :

Code: Select all

    "eventTrigger": "ON_PACKAGE_FINISHED",
    "enabled": true,
    "name": "Execute FileBot (PackageFinished)",
    "script": "var script = 'C:/jdownloader-postprocess.cmd'\n\nvar path = package.getDownloadFolder()\nvar name = package.getName()\nvar label = package.getComment() ? package.getComment() : 'N/A'\n\nvar command = [script, path, name, label, 'PACKAGE_FINISHED']\n\nlog(command)\nlog(callSync(command))\n",
    "eventTriggerSettings": {}
It shows everything is ok in the scripter gui and i get no errors on the test run i did but it doesn't seem to work still. I did as you said and asked for help in the JDownloader forum under scripting too. Thanks for your help and anymore you can give. I wasn't able to figure out the logs I found where they were but there is a ton of them and I am not sure which is for what I am doing.

Re: [JDownloader] Setup for Windows, Linux and Mac OS X

Posted: 21 Jan 2019, 02:12
by rednoah
Is your C:/jdownloader-postprocess.cmd script called at all? That is the first step we need to clear.

If it's not called, then maybe because the JDownloader hook doesn't work, which means we simplify:

Code: Select all

var command = ['C:/Windows/System32/notepad.exe']
Just call that one command, nothing else, can't not work, should pop up notepad, unless it's a JDownloader bug / issue, which means we know where to start fixing things.

Re: [JDownloader] Setup for Windows, Linux and Mac OS X

Posted: 21 Jan 2019, 10:48
by chest069
Thanks for the reply.

What you gave me to try worked. (as far as executing notepad.exe)

I wasn't able to find out or figure which log was for JDownloader2 and the script I was trying though. So I don't know if it actually runs the CMD file.

Thanks again for the help.

Re: [JDownloader] Setup for Windows, Linux and Mac OS X

Posted: 21 Jan 2019, 10:54
by rednoah
If notepad.exe is called, then we know that works, so the next step is to do the same with C:/Windows/System32/cmd.exe /c C:/script.bat.

Just write a script that does something like this:

Code: Select all

DATE /T > C:\date.txt
If the CMD script is called, then C:\date.txt will be created.