AMC: External AC3 and DTS files

All your suggestions, requests and ideas for future development
Post Reply
thielj
Posts: 55
Joined: 05 Nov 2017, 22:15

AMC: External AC3 and DTS files

Post by thielj »

FileBot is treating external audio (.dts .ac3) as movie files. For example, I have:

Code: Select all

Redacted (1996).eng.dts
Redacted (1996).mkv
Observations:
  • FileBot tries to get subtitles for both (with a subtitles=xx parameter)
  • When it comes to the renaming phase, each of them is processed individually as if both were the inferred movie. Of course, this fails horrible as the DTS track doesn't have video information etc.
Suggested solution: Don't treat accompanying files containing only audio as movies.

May be related to: source/net/filebot/MediaTypes.properties seeting a mime type of 'video/audio-stream' for .ac3 and .dts files.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC: External AC3 and DTS files

Post by rednoah »

Makes sense. I'll remove ac3/dts from the list of video extensions.
:idea: Please read the FAQ and How to Request Help.
thielj
Posts: 55
Joined: 05 Nov 2017, 22:15

Re: AMC: External AC3 and DTS files

Post by thielj »

There should be an additional sanity check that a 'video file' contains at the minimum one video stream
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC: External AC3 and DTS files

Post by rednoah »

That might not be such a good idea. The file extension usually does a good job at identifying video files, and can be understood by users. Inspecting files is slower by a few magnitudes and slower by a few more magnitudes if the files happen to be on a network share.
:idea: Please read the FAQ and How to Request Help.
thielj
Posts: 55
Joined: 05 Nov 2017, 22:15

Re: AMC: External AC3 and DTS files

Post by thielj »

I've tried this with the latest jar, but judging from the file date (Nov 15), it's not updated yet and AC3 or DTS files are still processed as movies.

Strangely enough, mp3 or m4a files are not grouped or processed as companion files at all, even if the source files have the perfect naming. Do I miss a switch/option for that?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC: External AC3 and DTS files

Post by rednoah »

What are the filenames? A companion file must begin with the video file name. The extension is irrelevant in this case and could be anything (xml, txt, dat, etc).

e.g.

Code: Select all

$ filebot -rename *.mp4 *.mp3 -non-strict --db TheMovieDB --log INFO --action TEST
[TEST] from [Avatar.2009.mp4] to [Avatar (2009).mp4]
[TEST] from [Avatar.2009.eng.mp3] to [Avatar (2009).mp3]
:idea: Please read the FAQ and How to Request Help.
thielj
Posts: 55
Joined: 05 Nov 2017, 22:15

Re: AMC: External AC3 and DTS files

Post by thielj »

It's not -rename, but -script fn:amc inside your filebot-watcher container.

Files have the proper naming.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC: External AC3 and DTS files

Post by rednoah »

I see. Looks like the amc script doesn't support companion files at all.

Normal audio files would be especially problematic, because --def music=y would simply funnel all audio files into music mode, which is not what you want for external audio streams for your movies.
:idea: Please read the FAQ and How to Request Help.
thielj
Posts: 55
Joined: 05 Nov 2017, 22:15

Re: AMC: External AC3 and DTS files

Post by thielj »

Yeah, maybe I need to consider rolling my own amc.groovy, moving the if (music && forceAudio(f)) check to the button, and creating Movies/TV Shows/Music top level input folders.

ut_label=movie might work on a movies-only input folder.

and I will need to do some experiments with -rename as well...
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC: External AC3 and DTS files

Post by rednoah »

You probably do have enough special use cases to warrant your own fork. The amc script is kept simple, so it shouldn't be too hard. :D

-rename / rename(...) is used internally by the amc script in various ways after grouping files that might / should belong together. If you know that you will only process movies, and if you know that your movies are all in movie folders and that all files in the same folder belong together, then things can be simplified quite a bit, to the point where you might not even want or need the amc script.
:idea: Please read the FAQ and How to Request Help.
thielj
Posts: 55
Joined: 05 Nov 2017, 22:15

Re: AMC: External AC3 and DTS files

Post by thielj »

I just have a wide selection of samples and know how to pick my test cases ;)

The idea of using FileBot as a library that can help with the discovery, processing and enrichment of media files isn't that unattractive. I wonder how far this would be supported, in terms of API stability etc?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC: External AC3 and DTS files

Post by rednoah »

The filebot command-line tools are very stable, as are the scripting interfaces. I wouldn't expect any breaking changes here.
:idea: Please read the FAQ and How to Request Help.
Post Reply