hazy
0a01583f56
Make CLI arguments use flags, support webm output encoding, allow running from any working directory, add optional profiles, add audio to spliced-in clips, various small fixes
13 lines
454 B
JavaScript
13 lines
454 B
JavaScript
import fs from 'fs'
|
|
import exec from './exec.js'
|
|
|
|
export default async function checkResolution(filename) {
|
|
const {stdout, stderr} = await exec(`ffprobe -v error -select_streams v -show_entries stream=width,height -of csv=p=0:s=x "${filename}"`)
|
|
let currentDimensions = ((arr) => {
|
|
return {
|
|
width: parseInt(arr[0]),
|
|
height: parseInt(arr[1])
|
|
}
|
|
})(stdout.trim().split('x'))
|
|
return currentDimensions
|
|
} |