UNPKG

@remotion/media-parser

Version:

A pure JavaScript library for parsing video files

13 lines (12 loc) 470 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getSpsAndPps = void 0; const getSpsAndPps = (infos) => { const avcProfile = infos.find((i) => i.type === 'avc-profile'); const ppsProfile = infos.find((i) => i.type === 'avc-pps'); if (!avcProfile || !ppsProfile) { throw new Error('Expected avcProfile and ppsProfile'); } return { pps: ppsProfile, sps: avcProfile }; }; exports.getSpsAndPps = getSpsAndPps;