OTV is the preferred format for a media library (movies, series, TV shows) in JSON. Give its address in the
vod_library attribute of an M3U or OTC
playlist. A marker like (since 1.7.1.3) is the first app version that reads a field.
The app treats a file as OTV when its address ends in .otv or otv.json, or when it starts with [.
General rules:
info is optional everywhere.:xx at the end ("name:es") is used only when the app language
is xx (two-letter code). Put it after the plain field: the later one wins.The file is an array of items. An item with video is a movie; an item with seasons is a series (or a TV show with
tv_show). Movies, series and TV shows go into separate root folders of the library.
Item fields:
name : title (required).category : folder inside its root folder; a name "Action" or an object
{"name":"Action","icon":"http://...jpg","bg":"http://...jpg"} (bg: background image). Without it the item goes
to a default folder.info : description, see below.video : the movie’s stream address. ${token}, ${login} and ${password} in it are replaced by the values set
in the provider’s settings in the app.seasons : array of seasons (a series).tv_show : true puts a series into the TV shows folder instead of TV series (since 1.7.2.1).Season fields:
season : season number. Optional when seasons are listed in order 1, 2, 3…info : description of the season.episodes : array of episode objects.Episode fields:
episode : episode number. Optional when episodes are listed in order 1, 2, 3…part : part number, when one episode is split into several files (part 1, 2, 3): entries with the same
episode and different part are kept as parts of that episode (since 1.7.2.1).name : episode title.info : description of the episode.video : stream address.Playback fields, for a movie item and for an episode (since 1.6.6.7):
drm : DRM system: widevine, clearkey or playready (values as for
license_type).drmkey : a license server address (contains ://; may carry |headers and the other
license_key forms) or static ClearKey keys (kid:key).drmdata : base64 of the stream’s default key id (since 1.7.0.1).headers : HTTP headers for the stream and the license request: a JSON object
{"User-Agent":"MyPlayer/1.0","Referer":"http://example.com/"} (since 1.6.6.9) or a string
name1=value1&name2=value2. Prefer the object: in the string form a value cannot contain = or &.runtime_attr_url : an address requested before playback, answering in M3U or OTC (without base64) with the
stream URL and attributes to apply (since 1.6.9.4). Works like
#EXTATTRFROMURL.source_format : the stream format when the URL does not tell it (since 1.7.1.6): ts, hls, dash, ss,
rtsp, rtp, udp.[
{
"name": "Test video",
"category": "Action",
"info": { "poster": "http://example.com/poster.jpg", "year": 2019 },
"video": "http://example.com/video/file.mp4"
},
{
"name": "Test series",
"category": { "name": "Drama", "icon": "http://example.com/drama.png" },
"info": { "poster": "http://example.com/series.jpg" },
"seasons": [
{
"season": 1,
"episodes": [
{ "episode": 1, "name": "Intro", "video": "http://example.com/s01e01.mp4" },
"http://example.com/s01e02.mp4"
]
}
]
}
]
An episode without a field takes it from its season’s info, then from the series’ info.
poster : poster image address.bg : background image address.backdrop : a larger image, usually a frame of the video (since 1.6.6.9.5).plot : description.cast : array of actors.director : array of directors.country : array of countries.genre : array of genres. Use one-word genres.rating : 0 to 10, decimals allowed ("5.6" or 5.6).year : release year (number).duration : length in seconds (number).added : when it was added to the library, unix time (number).ttl : when it will be removed from the library, unix time (number).adult : true marks adult content (hidden behind the restrict code).trailer : YouTube trailer, a link or the video id (since 1.6.6.9.5).tmdb, imdb : TMDB or IMDb id of the title (since 1.7.4.1)."info": {
"poster": "http://example.com/poster.jpg",
"bg": "http://example.com/background.jpg",
"backdrop": "http://example.com/frame.jpg",
"plot": "Something happens...",
"cast": ["John Doe", "Jane Doe"],
"director": ["Mr. Smith"],
"country": ["Zimbabwe"],
"genre": ["drama", "history"],
"rating": "5.5",
"year": 2019,
"duration": 3600,
"added": 1700000000,
"ttl": 1800000000,
"adult": false,
"trailer": "HGH34ghgAU",
"imdb": "tt0000001",
"tmdb": "12345"
}
An item without name is not added to the library; such an item can carry settings for the items after it
(since 1.6.9.3):
{"base64": "name,video"} : the fields whose values are base64-encoded, comma-separated; "*" means all text
fields. Put it first in the array.See sample_file_otv.json.