"{channels}ch" gives "2chch"

All your suggestions, requests and ideas for future development
Post Reply
tlc
Posts: 4
Joined: 30 Apr 2020, 12:15

"{channels}ch" gives "2chch"

Post by tlc »

I recently downloaded 4.9.1 and replaced 4.8.5 on Mac. I'm sure the line worked as intended before. I've searched my tree for "chch" and no older files have it. The files are 480p DivX if it matters. The full format is

{n} - {s00e00} - {t} - {tags}[{source+'-'}{vf} {vc}][{channels}ch {ac}]{'-'+group}{'.'+lang}

I do see '2.0ch' and '5.1ch' in my tree, but I'm not sure if they were tagged by FileBot or another tool.

Should '{channels}' include a 'ch'?

Thanks,
tlc
Last edited by tlc on 30 Apr 2020, 12:29, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 23932
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: "{channels}ch" gives "2chch"

Post by rednoah »

What does MediaInfo say?
viewtopic.php?t=4285


:idea: Please include System Information. Please read How to Request Help for details.


:idea: channels is typically based on audio.ChannelLayout but it will default to af if channels would otherwise be undefined. Not sure if this is new, or if you just didn't encounter this corner case before.
:idea: Please read the FAQ and How to Request Help.
tlc
Posts: 4
Joined: 30 Apr 2020, 12:15

Re: "{channels}ch" gives "2chch"

Post by tlc »

Both "af" and "channels" are "2ch".
User avatar
rednoah
The Source
Posts: 23932
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: "{channels}ch" gives "2chch"

Post by rednoah »

An easy solution would be this:

Code: Select all

[{channels} {ac}]
You'll get 5.1 for files where channel positions are available, and 6ch otherwise.


Alternatively, just using {af} would be an easy solution as well, but you'll get less precise information about channel positioning.
:idea: Please read the FAQ and How to Request Help.
tlc
Posts: 4
Joined: 30 Apr 2020, 12:15

Re: "{channels}ch" gives "2chch"

Post by tlc »

I looked though some other 2.0 material. I found one where FileBot/MediaInfo says af=2ch and channels=2.0
(The UI is a little confusing because some of the fields still reference the Firefly "Match Object" although I set a "Media File".)

So MediaInfo is inconsistent about adding "ch" to channels. You mentioned "where channel positions are available" above. Do you think MediaInfo knows left from right in some cases but not others?

BTW, what happens with files with multiple audio streams?

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

Re: "{channels}ch" gives "2chch"

Post by rednoah »

1.
A Match consists of Metadata Object (e.g. Episode Alias 1x01) and Media File (e.g. File /path/to/Alias.1x01.avi). You can arbitrarily configure either side for testing. Some bindings are based on only metadata information. Some only file information. Some both.


2.
FileBot will read raw MediaInfo and then apply lots of logic to give you the value you probably wanna see. Bindings like {channels} and {af} ideally give you what you want to see, i.e. the highest number of channels across all streams.


:idea: FileBot adds the ch part when you're using {af}. {channels} accidentally does so when it's defaulting to the value of {af} when raw channel position information is not available. (EDIT: FileBot r7484 fixes this accidental behaviour)


:idea: You can use {audio} to access raw MediaInfo properties for all streams and then apply your own logic, but you will run into many unforeseen difficulties.
:idea: Please read the FAQ and How to Request Help.
tlc
Posts: 4
Joined: 30 Apr 2020, 12:15

Re: "{channels}ch" gives "2chch"

Post by tlc »

Thank you!
Post Reply