Thanks for the reply, nhyone! This is good feedback.
nhyone wrote:I'll go with a "inheritance"-based config file. If an episode-specific config file exists, use it. Else use the directory-level config file. Else use the parent directory's config file and so on, and it ends with the default config file. By doing this, it is possible to provide sensible defaults for most videos, but is still able to handle problematic ones.
I had thought about inheritance in config files, but I'll admit only in the sense that there might be a 'global' config and a machine-specific config that might overwrite some settings, like the paths to the executable or input files. Your idea is much more scalable and, frankly, easier to implement. I'll definitely put some thought into the details and you'll probably see it in my code relatively soon.
nhyone wrote:I'll use a simpler higher-level text-based config file too. You can support profiles. For example, is the show a TV series, a movie, MTV, a lecture, and so on. The initial settings for a file will be based on this and the output resolution.
I actually started with
ConfigParser, but so many of the config sections needed to be lists. I was endlessly converting config strings into lists by splitting on commas and such, but then were were commas in some of the text itself, and it got complicated fast. Switching to JSON provides native support for both dictionaries and lists, nested arbitrarily, and shipped as an internal Python module. It's a clear win for this particular use-case.
nhyone wrote:You can also add support for pre- and post-processing scripts for the worst-case scenario. Although they can be used for something as simple as setting/changing the track language names.
Good idea!
nhyone wrote:For TV series, you can add a text file that contains the episode names, so that you can name the output files meaningfully.
Interesting; I'd never thought of this. I personally use
Plex as my front-end, which only needs the season/episode numbers to look up the titles on its own. Having a text-based lookup to add episodes names if found wouldn't be too hard, but I wonder if I could go the extra mile and actually look up the episode titles if they're not already in the filename or found in a lookup file. I'll check into what APIs provide that service.
nhyone wrote:If you have multiple PCs, you can also think about how to allow concurrent encoding using just one queue.
This one, my queue already does! You can basically mount a filesystem on another machine and run my queue script, and it'll take reasonable precautions to not encode the same file twice. You can also provide machine-specific config files, mentioned above, although without any inheritance yet. I've been using multiple machine on my single queue for weeks now without a hiccup.
Thanks for your feedback! I really appreciate it.
Doug