Skip to content

Commit

Permalink
Fixing capability parsing for ffmpeg 6+
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanth-descript committed Jul 23, 2024
1 parent 02a5609 commit 07d276f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/capabilities.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ <h1 class="page-title">Source: capabilities.js</h1>
var ffEncodersRegexp = /\(encoders:([^\)]+)\)/;
var ffDecodersRegexp = /\(decoders:([^\)]+)\)/;
var encodersRegexp = /^\s*([VAS\.])([F\.])([S\.])([X\.])([B\.])([D\.]) ([^ ]+) +(.*)$/;
var formatRegexp = /^\s*([D ])([E ]) ([^ ]+) +(.*)$/;
var formatRegexp = /^\s*([D ])([E ])[d ]?\s+([^ ]+) +(.*)$/;
var lineBreakRegexp = /\r\n|\r|\n/;
var filterRegexp = /^(?: [T\.][S\.][C\.] )?([^ ]+) +(AA?|VV?|\|)->(AA?|VV?|\|) +(.*)$/;

Expand Down
2 changes: 1 addition & 1 deletion lib/capabilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var ffCodecRegexp = /^\s*([D\.])([E\.])([VAS])([I\.])([L\.])([S\.]) ([^ ]+) +(.*
var ffEncodersRegexp = /\(encoders:([^\)]+)\)/;
var ffDecodersRegexp = /\(decoders:([^\)]+)\)/;
var encodersRegexp = /^\s*([VAS\.])([F\.])([S\.])([X\.])([B\.])([D\.]) ([^ ]+) +(.*)$/;
var formatRegexp = /^\s*([D ])([E ]) ([^ ]+) +(.*)$/;
var formatRegexp = /^\s*([D ])([E ])[d ]?\s+([^ ]+) +(.*)$/;
var lineBreakRegexp = /\r\n|\r|\n/;
var filterRegexp = /^(?: [T\.][S\.][C\.] )?([^ ]+) +(AA?|VV?|\|)->(AA?|VV?|\|) +(.*)$/;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@descript/fluent-ffmpeg",
"version": "2.1.2-descript.5",
"version": "2.1.3-descript.1",
"description": "A fluent API to FFMPEG (http://www.ffmpeg.org)",
"keywords": [
"ffmpeg"
Expand Down
8 changes: 8 additions & 0 deletions test/capabilities.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ describe('Capabilities', function() {
('canDemux' in formats.wav).should.equal(true);
(typeof formats.wav.canDemux).should.equal('boolean');

('lavfi' in formats).should.equal(true);
('description' in formats.lavfi).should.equal(true);
(typeof formats.lavfi.description).should.equal('string');
('canMux' in formats.lavfi).should.equal(true);
(typeof formats.lavfi.canMux).should.equal('boolean');
('canDemux' in formats.lavfi).should.equal(true);
(typeof formats.lavfi.canDemux).should.equal('boolean');

done();
});
});
Expand Down

0 comments on commit 07d276f

Please sign in to comment.