Skip to content

Parse names of video files to identify quality (e.g. 1080p), season/episode, year, etc.

License

Notifications You must be signed in to change notification settings

joelacus/video-name-parser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

video-name-parser

Parse names of video files to identify quality (e.g. 1080p), season/episode, year, etc.

Usage

var parseVideo = require("video-name-parser");
parseVideo("south park s01e01.avi"); // { name: "south park", season: 1, episode: [1], type: "series", tag: [] }
parseVideo("south park s01e01e02.avi"); // { name: "south park", season: 1, episode: [1,2], type: "series", tag: [] }
parseVideo("The.Wizard.of.Oz.1939.1080p.BrRip.x264.mp4"); // { name: "the wizard of oz", year: 1939, type: "movie", tag: [ "hd", "1080p" ] }
parseVideo("The.Wizard.of.Oz.1939.1080p.BrRip.x264.mp4", { extra: true }); // { ... extra: { resolution: ["1080p"], audio: [], codec: ["x264"], lowQualitySrc: [], highQualitySrc: ["brrip"] } }
parseVideo("something else.mp4"); // { type: "other" } // no year or season/ep found, assuming 'other'

Returned properties

name - parsed name, in lower case, allowed numbers/letters, no special symbols

type - can be movie, series or other - inferred from keywords / key phrases

tag - additional tags inferred from the name, e.g. 1080p

season - number of the season

episode - array of episode numbers, returned for episodes

extra - optional { extra: true }

{ 
    resolution: ['1080p'],
    audioCodec: ['dts-hd'],
    videoCodec: ['x264'],
    hdr: ['10bit'],
    lowQualitySrc: [],
    highQualitySrc: ['brrip'],
    container: ['mkv']
}

About

Parse names of video files to identify quality (e.g. 1080p), season/episode, year, etc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%