Skip to content

Commit 07d276f

Browse files
Fixing capability parsing for ffmpeg 6+
1 parent 02a5609 commit 07d276f

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

Diff for: doc/capabilities.js.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ <h1 class="page-title">Source: capabilities.js</h1>
4242
var ffEncodersRegexp = /\(encoders:([^\)]+)\)/;
4343
var ffDecodersRegexp = /\(decoders:([^\)]+)\)/;
4444
var encodersRegexp = /^\s*([VAS\.])([F\.])([S\.])([X\.])([B\.])([D\.]) ([^ ]+) +(.*)$/;
45-
var formatRegexp = /^\s*([D ])([E ]) ([^ ]+) +(.*)$/;
45+
var formatRegexp = /^\s*([D ])([E ])[d ]?\s+([^ ]+) +(.*)$/;
4646
var lineBreakRegexp = /\r\n|\r|\n/;
4747
var filterRegexp = /^(?: [T\.][S\.][C\.] )?([^ ]+) +(AA?|VV?|\|)->(AA?|VV?|\|) +(.*)$/;
4848

Diff for: lib/capabilities.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var ffCodecRegexp = /^\s*([D\.])([E\.])([VAS])([I\.])([L\.])([S\.]) ([^ ]+) +(.*
1515
var ffEncodersRegexp = /\(encoders:([^\)]+)\)/;
1616
var ffDecodersRegexp = /\(decoders:([^\)]+)\)/;
1717
var encodersRegexp = /^\s*([VAS\.])([F\.])([S\.])([X\.])([B\.])([D\.]) ([^ ]+) +(.*)$/;
18-
var formatRegexp = /^\s*([D ])([E ]) ([^ ]+) +(.*)$/;
18+
var formatRegexp = /^\s*([D ])([E ])[d ]?\s+([^ ]+) +(.*)$/;
1919
var lineBreakRegexp = /\r\n|\r|\n/;
2020
var filterRegexp = /^(?: [T\.][S\.][C\.] )?([^ ]+) +(AA?|VV?|\|)->(AA?|VV?|\|) +(.*)$/;
2121

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@descript/fluent-ffmpeg",
3-
"version": "2.1.2-descript.5",
3+
"version": "2.1.3-descript.1",
44
"description": "A fluent API to FFMPEG (http://www.ffmpeg.org)",
55
"keywords": [
66
"ffmpeg"

Diff for: test/capabilities.test.js

+8
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@ describe('Capabilities', function() {
7272
('canDemux' in formats.wav).should.equal(true);
7373
(typeof formats.wav.canDemux).should.equal('boolean');
7474

75+
('lavfi' in formats).should.equal(true);
76+
('description' in formats.lavfi).should.equal(true);
77+
(typeof formats.lavfi.description).should.equal('string');
78+
('canMux' in formats.lavfi).should.equal(true);
79+
(typeof formats.lavfi.canMux).should.equal('boolean');
80+
('canDemux' in formats.lavfi).should.equal(true);
81+
(typeof formats.lavfi.canDemux).should.equal('boolean');
82+
7583
done();
7684
});
7785
});

0 commit comments

Comments
 (0)