Trouble with audio channels

Any questions? Need some help?
User avatar
angus
Posts: 13
Joined: 25 Oct 2013, 17:36

Trouble with audio channels

Post by angus » 25 Oct 2013, 17:50

Hello I've just downloaded FileBot a few hours ago and started playing aroung with this awesome program :)

I was trying to rename a few movies with this expression:
{n} ({y}) [{vc} {vf}] [{ac} {af}]
and I noticed that some movies are renamed
Movie name (2013) [x264 1080p] [AAC 2ch]
but there actually are 6 audio channels...

On the Audio tab in the MediaInfo window I can see:

Channel(s): 2
Channel(s)_Original: 6

Any idea?
Thanks!

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

Re: Trouble with audio channels

Post by rednoah » 25 Oct 2013, 18:03

I guess the channels meta data has been written wrong by the application that made the file. The {af} is using the Channel(s) field for info.

You can grab specific media info like this:

Code: Select all

{audio['Channel(s)']}

Code: Select all

{audio['Channel(s)_Original']}
Have you tried with the latest media info native library? Maybe if you update the media info library you could {af} work.
:idea: Please read the FAQ and How to Request Help.

User avatar
angus
Posts: 13
Joined: 25 Oct 2013, 17:36

Re: Trouble with audio channels

Post by angus » 25 Oct 2013, 20:17

Thank you very much for your quick answer :)

I've tried now with:

Code: Select all

{n} ({y}) [{vc} {vf}] [{ac} {audio['Channel(s)_Original']}ch]
but some movies come out like this:

Movie name (2013) [x264 1080p] [AAC ch]

Is there a way to make a conditional expression? Something like if {audio['Channel(s)_Original']} else {af}?
Have you tried with the latest media info native library? Maybe if you update the media info library you could {af} work.
You mean the mediainfo.dll file?

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

Re: Trouble with audio channels

Post by rednoah » 25 Oct 2013, 20:48

Yep, try the latest FileBot 3.8 RC5 and see if it works better for you. Added that attribute as preferred field for channels and only fall back to the other if the _original isn't set, so {af} should work better the the latest.
:idea: Please read the FAQ and How to Request Help.

User avatar
angus
Posts: 13
Joined: 25 Oct 2013, 17:36

Re: Trouble with audio channels

Post by angus » 26 Oct 2013, 12:15

rednoah wrote:Yep, try the latest FileBot 3.8 RC5
Thanks, where can I download it?

One more question, can I get the value Audio_Language_List from the tab "general" in MediaInfo?

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

Re: Trouble with audio channels

Post by rednoah » 26 Oct 2013, 13:06

1. SF downloads => https://sourceforge.net/projects/filebo ... ebot/HEAD/

2. media.* => {media.Audio_Language_List}
:idea: Please read the FAQ and How to Request Help.

User avatar
angus
Posts: 13
Joined: 25 Oct 2013, 17:36

Re: Trouble with audio channels

Post by angus » 26 Oct 2013, 13:47

Thank you very much :) Everything works like a charm!

User avatar
angus
Posts: 13
Joined: 25 Oct 2013, 17:36

Re: Trouble with audio channels

Post by angus » 23 Dec 2013, 15:13

Hello Rednoah, after upgrading I have a problem, the following error appears:

BindingError: "audio": Could not initialize class.net.sourceforge.filebot.mediainfo.MediaInfoLibrary

Any help? Thanks!

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

Re: Trouble with audio channels

Post by rednoah » 23 Dec 2013, 17:00

Most probably:
Q: Why does MediaInfo not work? Why is 7zip not working? I'm running on 64-bit Windows and installed FileBot x64?
A: If you're on 64-bit Windows but are actually running a 32-bit Java runtime, the whole java process will be in 32-bit compability mode, so the mediainfo native library also has to be the 32-bit version. If you have a 32-bit and a 64-bit Java uninstall all Java and then only install the latest 64-bit Java and latest 64-bit FileBot. If you're using 64-bit Java you must install 64-bit FileBot, if you're using 32-bit Java you must install 32-bit FileBot.
If you want to install 32-bit FileBot on an 64-bit operating system because you only have a 32-bit JRE, but the default installer will automatically install 64-bit FileBot, then you may need to directly grab the 32-bit package from sourceforge.
:idea: Please read the FAQ and How to Request Help.

User avatar
angus
Posts: 13
Joined: 25 Oct 2013, 17:36

Re: Trouble with audio channels

Post by angus » 23 Dec 2013, 22:14

That was it...
Thank you very much and happy holidays!

User avatar
angus
Posts: 13
Joined: 25 Oct 2013, 17:36

Re: Trouble with audio channels

Post by angus » 10 Jul 2014, 12:51

Hello it's me again with another question, I'm using the following expression:

Code: Select all

{n} ({y}) [{vc} {vf}] [{ac} {media.Audio_Language_List} {audio['Channel(s)']}ch]
eg: American Hustle (2013) [x264 720p] [AC3 English 6ch]


But I have some movies with double languages and I'm trying to do something like that:

Code: Select all

{n} ({y}) [{vc} {vf}] [{ac} 1st language {audio['Channel(s)']}ch + 2nd language {audio['Channel(s)']}ch]
eg: American Hustle (2013) [x264 720p] [AC3 English 6ch + MP3 Italian 2ch]


How can I do that?

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

Re: Trouble with audio channels

Post by rednoah » 10 Jul 2014, 16:08

You might find this thread inspiring:
http://www.filebot.net/forums/viewtopic.php?f=5&t=1775

Think along the lines of

Code: Select all

{audios.collect{ [ac, it.language, it.channels+'ch'].join(' ') }.join(' + ')}
:idea: Please read the FAQ and How to Request Help.

User avatar
angus
Posts: 13
Joined: 25 Oct 2013, 17:36

Re: Trouble with audio channels

Post by angus » 12 Jul 2014, 17:47

Thank you very much RedNoah!
This works perfectly for some movies, but unfortunately most of the movies show the error BindingException: "language": undefined.
Any idea how to fix this?

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

Re: Trouble with audio channels

Post by rednoah » 12 Jul 2014, 18:08

This is probably the most elegant way to solve this issue for all cases:

Code: Select all

{audios.collect{ aud -> allOf{ac}{aud.language}{aud.channels+'ch'} }*.join(' ').join(' + ')}
Note that in this expression ac is always forced to the value of Audio Stream 1 whereas language and channels are actually values from Stream N.
:idea: Please read the FAQ and How to Request Help.

User avatar
angus
Posts: 13
Joined: 25 Oct 2013, 17:36

Re: Trouble with audio channels

Post by angus » 13 Jul 2014, 14:20

Thanks again, but this expression doesn't work properly, some movies are renamed like this:

300 (2006) [XviD 360p] [AC3 6ch + AC3 2ch]

Instead it should be:

300 (2006) [XviD 360p] [AC3 Italian 6ch + MP3 English 2ch]

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

Re: Trouble with audio channels

Post by rednoah » 13 Jul 2014, 14:32

1.
I know. Did you not read my post?
rednoah wrote:Note that in this expression ac is always forced to the value of Audio Stream 1 whereas language and channels are actually values from Stream N.
2.
You're using ac. Looks like you can't use ac. I'm sure you'll figure out an alternative. ;)

3.
As for the language, if that information is missing in the metadata, then you're simply out of luck.
:idea: Please read the FAQ and How to Request Help.

User avatar
angus
Posts: 13
Joined: 25 Oct 2013, 17:36

Re: Trouble with audio channels

Post by angus » 13 Jul 2014, 15:04

Thanks for the suggestion!
I tried that now:

Code: Select all

{audios.collect{ aud -> allOf{aud.codec}{aud.language}{aud.channels+'ch'} }*.join(' ').join(' + ')}
and

Code: Select all

{audios.collect{ aud -> allOf{aud.format}{aud.language}{aud.channels+'ch'} }*.join(' ').join(' + ')}
And it kinda works.
Is there a way to estrapolate the parameter Codec/Family instead of Codec from the Audio tabs in MediaInfo?
Thanks again for your help!

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

Re: Trouble with audio channels

Post by rednoah » 13 Jul 2014, 15:36

I suppose so. It's your code.

Code: Select all

audio.CodecFamily
:idea: Please read the FAQ and How to Request Help.

User avatar
angus
Posts: 13
Joined: 25 Oct 2013, 17:36

Re: Trouble with audio channels

Post by angus » 13 Jul 2014, 16:47

Thanks a lot :) :) :)

User avatar
angus
Posts: 13
Joined: 25 Oct 2013, 17:36

Re: Trouble with audio channels

Post by angus » 10 May 2016, 10:13

Hi again.
After upgrading to FileBot 4.7 some square brackets are added and I wish them not to be there.

This is the format I use:

Code: Select all

{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’?""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() })}; norm(primaryTitle)} {if (norm(n) != norm(primaryTitle)) ' ('+norm(n)+') '}({y}) [{vc} {vf}] [{audio['CodecFamily']} {media.Audio_Language_List} {audio['Channel(s)']}ch] {" #$pi"}
This the ouput:
Black Mass (2015) [x264 1080p] [[DTS] English [6]ch]
Before FileBot 4.7:
Black Mass (2015) [x264 1080p] [DTS English 6ch]
How can I remove the extra brackets?
Thanks!

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

Re: Trouble with audio channels

Post by rednoah » 10 May 2016, 10:30

Use the {af} or the {channels} binding.
:idea: Please read the FAQ and How to Request Help.

User avatar
angus
Posts: 13
Joined: 25 Oct 2013, 17:36

Re: Trouble with audio channels

Post by angus » 10 May 2016, 10:50

Thank you very much, this is the new format ad it works as before:

Code: Select all

{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’?""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() })}; norm(primaryTitle)} {if (norm(n) != norm(primaryTitle)) ' ('+norm(n)+') '}({y}) [{vc} {vf}] [{ac} {media.Audio_Language_List} {af}] {" #$pi"}

Morgenstern72
Donor
Posts: 35
Joined: 09 May 2014, 18:57

Re: Trouble with audio channels

Post by Morgenstern72 » 24 Jul 2017, 22:18

I have a problem with media.Audio_Language_List on Windows 10
I use it in this syntax and it looks fine when I see how Filebot wants to rename it

../{n} aka {primarytitle} ({y}){' ['+fn.replaceAll(/(?i)directors|theatrical|ultimate/,'$0 Cut').matchAll(/UNRATED|REMASTERED|EXTENDED|UNCUT|DIRECTORS.CUT|THEATRICAL.CUT|ULTIMATE.CUT|SPECIAL.EDITION/).join('][').upperInitial().lowerTrail()+']'} [{vf}] [{ac}{fn.match("-HD.MA.")}-{af}] [{media.Audio_Language_List}]/{n} aka {primarytitle} ({y}) {vc}{" (CD$pi)"} [{media.Audio_Language_List}]

But then it creates subfolders for every language found, since they are divided by "/"

Example
M:\Filebot\movies\MovieName aka ForeignName (2008) [1080p] [AC3-6ch] [Hebrew\
English\
English]\
MovieName aka ForeignName (2008) x264 [Hebrew\
English\
English].mkv

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

Re: Trouble with audio channels

Post by rednoah » 25 Jul 2017, 02:48

media.Audio_Language_List will give you a value that contains slashes. Since you want to get rid of the slashes, you can just replace them with something else.

e.g.

Code: Select all

'A/B/C'.slash('.')

PS: I'd use the new built-in {audioLanguages} binding though.
:idea: Please read the FAQ and How to Request Help.

Morgenstern72
Donor
Posts: 35
Joined: 09 May 2014, 18:57

Re: Trouble with audio channels

Post by Morgenstern72 » 25 Jul 2017, 08:57

rednoah wrote:
25 Jul 2017, 02:48
PS: I'd use the new built-in {audioLanguages} binding though.
This works perfect :)
Could you help me with the code, so that it only display the language, if its not english [eng]?

Code: Select all

../{n} aka {primarytitle} ({y}){' ['+fn.replaceAll(/(?i)directors|theatrical|ultimate/,'$0 Cut').matchAll(/UNRATED|REMASTERED|EXTENDED|UNCUT|DIRECTORS.CUT|THEATRICAL.CUT|ULTIMATE.CUT|SPECIAL.EDITION/).join('][').upperInitial().lowerTrail()+']'} [{vf}] [{ac}{fn.match("-HD.MA.")}-{af}] {audioLanguages}/{n} aka {primarytitle} ({y}) {vc}{" (CD$pi)"} {audioLanguages}
At the moment I just use two presets for it: the first is like the above, so I can check if there are multiple languages. The second has no language information and I use it, if the movie is in english. But that's not very elegant...

Post Reply