Different naming results on Linux vs. macOS

All your suggestions, requests and ideas for future development
Post Reply
abandonow
Posts: 32
Joined: 22 Jul 2020, 16:42

Different naming results on Linux vs. macOS

Post by abandonow »

Hi,

I'm pretty new to Filebot, and are experimenting. I use the GUI version sometimes to test stuff out.

Recently I was experimenting with the $hdr tag, and noticed that the output on macOS was HDR10+, while on Linux it only showed up as HDR. This was with the exact same file.

The command i ran on Linux was:

Code: Select all

filebot -script fn:amc --output "/output/dir" --action symlink -non-strict "/source/dir" --log-file /path/to/log  --def excludeList=/path/to/excludelist --def minLengthMS=120000 --def movieFormat='{plex.name}/{plex.name}{" $tags"}{" [$vf $hdr - $source - $ac $channels - $vc]"}' --mode interactive
(Just for reference the original filename was: Moviename.2019.HDR10Plus.2160p.UHD.BluRay.x265.mkv)

The ideal result would be to get HDR10+ everywhere.

Thanks.
User avatar
rednoah
The Source
Posts: 19141
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Different naming results on Linux vs. macOS

Post by rednoah »

You'll want to look the MediaInfo properties, which might be slightly different depending on the version of MediaInfo being used:
viewtopic.php?t=4285


:idea: MediaInfo is bundled on macOS so you'll get the latest and greatest, but on Linux you will get whatever your distribution has available via packages, which might be outdated if you're running and older Linux OS.


:idea: Please read How to Request Help.
:idea: Please read the FAQ and How to Request Help.
abandonow
Posts: 32
Joined: 22 Jul 2020, 16:42

Re: Different naming results on Linux vs. macOS

Post by abandonow »

Thanks. That makes sense.

Running Ubuntu 18.04.4 LTS
Mediainfo version: MediaInfoLib - v17.12

macOS 10.15.5 (19F101)

How do I find out which version is running on macOS? Is it bundled with macOS or with Filebot?

(I downloaded it "manually" via homebrew, and that was version 20.03 – so my Ubuntu install is a few versions old.)

Found the mediainfo repository and upgraded, I'm guessing that will fix the issue going forward. Thanks.
User avatar
rednoah
The Source
Posts: 19141
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Different naming results on Linux vs. macOS

Post by rednoah »

abandonow wrote: 22 Jul 2020, 17:31 How do I find out which version is running on macOS? Is it bundled with macOS or with Filebot?
If you read How to Request Help and follow the instructions then we will find out along the way. ;)
:idea: Please read the FAQ and How to Request Help.
abandonow
Posts: 32
Joined: 22 Jul 2020, 16:42

Re: Different naming results on Linux vs. macOS

Post by abandonow »

Thanks, found it. :)

macOS uses "MediaInfo: 19.09". I did update Mediainfovia Homebrew to 20.03, but that is not reflected in filebot -script fn:sysinfo .
Is it embedded in Filebot app? I did poke around and found libmediainfo.dylib inside the .app container.

(Ubuntu uses "Mediainfo: 20.03" after I updated the package. So updating the package worked there.)
Last edited by abandonow on 22 Jul 2020, 19:04, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 19141
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Different naming results on Linux vs. macOS

Post by rednoah »

Yes, MediaInfo is bundled when possible.
:idea: Please read the FAQ and How to Request Help.
abandonow
Posts: 32
Joined: 22 Jul 2020, 16:42

Re: Different naming results on Linux vs. macOS

Post by abandonow »

Got it, thanks for the swift replies. :)
abandonow
Posts: 32
Joined: 22 Jul 2020, 16:42

Re: Different naming results on Linux vs. macOS

Post by abandonow »

I'm bumping this topic again.

I want to tag files with 10 bit, with [10 bit]. It works on Filebot on macOS, but not on Linux.

Current code that works on macOS, but not on Linux:

Code: Select all

{plex.derive{" " + tags}{" " + [fn.match(/(?i)nordic|norwegian|danish|swedish/).upper()]}{" " + [allOf{allOf {vf}{hdr}.join(" ")}{source}{allOf{ac}{channels}.join(" ")}{allOf{vc}{if(bitdepth == 10)'10bit'}.join(" ")}.join(" - ")]}.tail}'
where this is the relevant part:

Code: Select all

{if(bitdepth == 10)'10bit'}
Version info:

Ubuntu:

Code: Select all

FileBot 4.9.2 (r7752)
JNA Native: 6.1.0
MediaInfo: 20.03
7-Zip-JBinding: 9.20
Chromaprint: 1.4.3
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2020-07-24 (r659)
Groovy: 3.0.5
JRE: OpenJDK Runtime Environment 14.0.2
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 2 Core / 4.2 GB Max Memory / 43 MB Used Memory
OS: Linux (amd64)
HW: Linux <hostname> 4.15.0-108-generic #109-Ubuntu SMP Fri Jun 19 11:33:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
DATA: /home/<user>/.filebot
Package: DEB
License: FileBot License  (Valid-Until: 2070-07-21)
Done ヾ(@⌒ー⌒@)ノ
macOS:

Code: Select all

FileBot 4.9.1 (r7372)
JNA Native: 6.1.0
MediaInfo: 19.09
7-Zip-JBinding: 9.20
Chromaprint: 1.4.4
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2020-07-28 (r663)
Groovy: 3.0.3
JRE: OpenJDK Runtime Environment 14
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 12 Core / 8 GB Max Memory / 42 MB Used Memory
OS: Mac OS X (x86_64)
HW: Darwin <hostname> 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64
DATA: /Users/<user>/.filebot
Package: APP
License: FileBot License  (Valid-Until: 2070-07-21)
Done ヾ(@⌒ー⌒@)ノ
macOS has a bit older mediainfo, and runs the stable version of Filebot.

This is what I want:
<moviename> (2019) [2160p HDR10+ - BluRay - MLPFBA 7.1 - x265 10bit] and it works on macOS but not on Linux where it just get skipped.
User avatar
rednoah
The Source
Posts: 19141
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Different naming results on Linux vs. macOS

Post by rednoah »

1.
What are the relevant MediaInfo properties for each file respectively?
viewtopic.php?t=4285


2.
If you're using the command-line, make sure your format doesn't get mangled by your shell command-line parser. Please read Cmdline and Argument Passing for details.

:idea: There is a trailing ' single quote in the format you pasted, so we have reason to believe that you're using the command-line, yet your post does not indicate that. Please read How to Request Help. ;)
:idea: Please read the FAQ and How to Request Help.
abandonow
Posts: 32
Joined: 22 Jul 2020, 16:42

Re: Different naming results on Linux vs. macOS

Post by abandonow »

Yes, sorry, I have a bit more that I didn't think relevant (path info, etc.) earlier in the command – so it starts with ' :) I'm confident it's not commandline argument, but because then everything should fail afaik. Now it just ignores the 10 bit part – as it should if it don't see it. The issue is that Filebot on mac sees it, while Filebot on Linux don't.

It's the same files, in the same location (I have a test directory with "challenging" filenames).

Mediainfo:
MacOS (via Filebot GUI):

Code: Select all

bitdepth: 10
Via cli on Linux AND macOS:

Code: Select all

Bit depth: 10 bits
I see that the output in Linux cli is a bit different than in Filebot gui? Does Filebot modify the output in any way? Have mediainfo changed the output between version 19 and 20?

Do my command need to look for "bit depth" (instead of "bitdepth") and "10 bits" (instead of "10")?

(I did try to modify to "bit depth" and "10 bits", but did not help. I put them in " quotes inside the command: {if("bit depth" == "10 bits")'10bit'} – not sure if that is correct)

(Here is the whole initial command from start to finish – 10bit part works on Filebot gui, not in cli:

Code: Select all

filebot -script fn:amc --output "/path/to/output/" --action symlink -non-strict "/path/to/testmedia/" --log-file /path/to/fb.log --def minLengthMS=120000 --def movieFormat='movies/{plex.derive{" " + tags}{" " + [allOf{allOf {vf}{hdr}.join(" ")}{source}{allOf{ac}{channels}.join(" ")}{allOf{vc}{if(bitdepth == 10)'10bit'}.join(" ")}.join(" - ")]}.tail}' --def seriesFormat='series/{plex.derive{" " + tags}{" " + [allOf{allOf {vf}{hdr}.join(" ")}{source}{allOf{ac}{channels}.join(" ")}{allOf{vc}{if(bitdepth == 10)'10bit'}.join(" ")}.join(" - ")]}.tail}'
User avatar
rednoah
The Source
Posts: 19141
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Different naming results on Linux vs. macOS

Post by rednoah »

abandonow wrote: 30 Jul 2020, 08:29 I'm confident it's not commandline argument, but because then everything should fail afaik.
Well, in this case, please read Cmdline and Argument Passing again and don't just skim it this time around. ;)


If you look closely at the console log (the reason we always ask for it is so that you look at at) then you will see that the shell mangled your format:

Code: Select all

Parameter: movieFormat = movies/{plex.derive{" " + tags}{" " + [allOf{allOf {vf}{hdr}.join(" ")}{source}{allOf{ac}{channels}.join(" ")}{allOf{vc}{if(bitdepth == 10)10bit}.join(" ")}.join(" - ")]}.tail}
If you can't see the issue yet, look at it via the Format Editor:
Image


Here's some examples of how '...' works that you can play with:

Code: Select all

$ echo 'Hello'my'World'
HellomyWorld
$ echo Hello'my'World
HellomyWorld

:idea: Use the @file syntax for reading command-line arguments from external text files.
:idea: Please read the FAQ and How to Request Help.
abandonow
Posts: 32
Joined: 22 Jul 2020, 16:42

Re: Different naming results on Linux vs. macOS

Post by abandonow »

Famous last words I guess :P I was pretty sure it would throw an error or fail.
I'll try to see if I can figure it out. I will report back.

The @file syntax thing looks nice as well.

Thanks!
Post Reply