|
1 | | -/** |
2 | | - * This module helps interpret ffprobe -print_format json output. |
3 | | - * Its coverage is pretty sparse right now, so send me pull requests! |
4 | | - */ |
5 | | -/** |
6 | | - * @typedef ProbeStream ffprobe -show_streams -print_format json. Only the fields we care about. |
7 | | - * @property {number} index |
8 | | - * @property {string} codec_name |
9 | | - * @property {string} codec_long_name |
10 | | - * @property {string} profile |
11 | | - * @property {string} codec_type Either 'audio' or 'video'. |
12 | | - * @property {string} codec_tag_string |
13 | | - * @property {string} id |
14 | | - * @property {number?} level |
15 | | - * @property {number?} width |
16 | | - * @property {number?} height |
17 | | - * @property {string} r_frame_rate Like "60000/1001" |
18 | | - */ |
19 | | -/** |
20 | | - * @typedef ProbeFormat Only the fields we care about from the following command: |
21 | | - * ffprobe -show_format -show_streams -v quiet -print_format json -i file.mp4 |
22 | | - * @property {string} filename |
23 | | - * @property {string} format_name |
24 | | - * @property {string} duration Number of seconds, as a string like "473.506367". |
25 | | - * @property {string} size Number of bytes, as a string. |
26 | | - * @property {string} bit_rate Bit rate, as a string. |
27 | | - */ |
28 | | -/** |
29 | | - * @typedef ProbeInfo ffprobe -show_format -show_streams -print_format json |
30 | | - * @property {ProbeStream[]} streams |
31 | | - * @property {ProbeFormat} format |
32 | | - */ |
33 | 1 | /** |
34 | 2 | * TODO: Reconcile this with file/sniffer.js findMimeType() which does signature matching. |
35 | 3 | * @param {ProbeInfo} info |
|
0 commit comments