Generating NFO Files¶
Parsec provides a robust nfogen command for generating XML or text .nfo files for your media. It uses the media file's name and internal Matroska tags (if available), queries TMDB/TVDB/IMDB for rich metadata, and formats it all using Go text/template files.
Basic Usage¶
To generate an NFO file for a media file or a directory (season pack):
parsec nfogen "Movie.Name.2023.1080p.WEB-DL.x264-GROUP.mkv"
# Or for a season pack directory:
parsec nfogen "Show.Name.S01.1080p.WEB-DL.x264-GROUP"
mediainfo, fetch metadata from the configured databases, and write the .nfo file using the default NFO template. If a directory is provided, Parsec aggregates the metadata across all contained media files to generate a comprehensive season pack NFO.
Flags¶
| Flag | Shorthand | Type | Description |
|---|---|---|---|
--template |
-t |
string | The NFO template to use (builtin or .tmpl in config dir). Defaults to the nfogen.template config value. |
--notes |
string | Custom notes to embed in the NFO under {{ .Notes }}. |
|
--source |
string | Add a source release name (can be used multiple times). Populates {{ .Sources }} in the template. |
|
--source-map |
string | Map tracks to a source (e.g., v1,a1-3:Release-Name). Sets .Source on the matched track structs. |
|
--full-diff |
boolean | Show the full context for NFO diffs instead of just changed lines. | |
--quiet |
-q |
boolean | Hide the generated NFO preview. |
--unattended |
-u |
boolean | Run without interactive prompts. |
--force |
-f |
boolean | Force overwrite of existing NFO files. |
--per-file |
-F |
boolean | Generate NFO per media file instead of per directory. |
--dry-run |
-d |
boolean | Print the generated NFO to the console without writing to disk. |
--tv |
-T |
boolean | Identify as TV show. |
--movie |
-M |
boolean | Identify as movie. |
--imdb |
string | IMDb ID. | |
--tmdb |
integer | TMDB ID. | |
--tvdb |
integer | TVDB ID. | |
--tvdb-order |
string | TVDB episode ordering for identification (default, official, dvd, absolute, alternate, regional). |
|
--dump-context |
boolean | Dump the template context data as JSON (hides raw fields) for debugging templates. | |
--dump-context-raw |
boolean | Dump the template context data as JSON, including all raw database API responses. |
Source Mapping¶
Sometimes a media release is composed of multiple sources (e.g., a BluRay video track remuxed with a WEB-DL audio track). The --source and --source-map flags allow you to document these hybrid releases accurately inside the generated NFO.
The source map format is <selectors>:<SourceName>.
Selectors use a track prefix followed by a 1-indexed track number:
- v: Video Track (e.g. v1)
- a: Audio Track (e.g. a1, a2)
- s: Subtitle Track (e.g. s1, s2)
You can define ranges (e.g., a1-3) and comma-separate multiple selectors (e.g., v1,a1-3,s1).
Examples¶
Generate an NFO file using the default template:
Preview NFO output without writing to disk:
Dump template context as JSON for debugging:
Generate an NFO with complex source mapping:
parsec nfogen hybrid.mkv \
--source "My.Movie.2023.1080p.BluRay.x264-GROUP1" \
--source "My.Movie.2023.1080p.WEB-DL.DDP5.1.H.264-GROUP2" \
--source-map "v1:My.Movie.2023.1080p.BluRay.x264-GROUP1" \
--source-map "a1-3,s1-5:My.Movie.2023.1080p.WEB-DL.DDP5.1.H.264-GROUP2"
In the template, this mapping will inject the string My.Movie.2023.1080p.BluRay.x264-GROUP1 into {{ .Video.Source }}, and the WEB-DL source string into the .Source field for Audio tracks 1 through 3, and Subtitle tracks 1 through 5.
See the NFO Context Reference for a complete list of all template fields available across the Video, Audio, Subtitle, and root context objects.
see the NFO Templating Guide for the syntax used to create/modify the nfo templates