Add ffmpeg6 support
This commit is contained in:
parent
92ce3b5ba7
commit
2c88c4dbde
@ -1,7 +1,7 @@
|
||||
import pkg from '../package.json';
|
||||
|
||||
const Core = '^16.11.0';
|
||||
const FFmpeg = '^5.1.0';
|
||||
const FFmpeg = '^5.1.0 || ^6.1.0';
|
||||
const UI = pkg.bundle ? pkg.bundle : pkg.name + ' v' + pkg.version;
|
||||
const Version = pkg.version;
|
||||
|
||||
|
||||
@ -258,6 +258,23 @@ const createInputs = (settings, config, skills) => {
|
||||
if (settings.general.analyzeduration_rtmp !== 5000000) {
|
||||
input.options.push('-analyzeduration', settings.general.analyzeduration_rtmp);
|
||||
}
|
||||
|
||||
if (ffmpeg_version === 6) {
|
||||
const codecs = [];
|
||||
if (skills.codecs.video.hevc?.length > 0) {
|
||||
codecs.push('hvc1');
|
||||
}
|
||||
if (skills.codecs.video.av1?.length > 0) {
|
||||
codecs.push('av01');
|
||||
}
|
||||
if (skills.codecs.video.vp9?.length > 0) {
|
||||
codecs.push('vp09');
|
||||
}
|
||||
|
||||
if (codecs.length !== 0) {
|
||||
input.options.push('-rtmp_enhanced_codecs', codecs.join(','));
|
||||
}
|
||||
}
|
||||
} else if (settings.push.type === 'srt') {
|
||||
if (settings.general.analyzeduration !== 5000000) {
|
||||
input.options.push('-analyzeduration', settings.general.analyzeduration);
|
||||
@ -272,6 +289,23 @@ const createInputs = (settings, config, skills) => {
|
||||
if (settings.general.analyzeduration_rtmp !== 5000000) {
|
||||
input.options.push('-analyzeduration', settings.general.analyzeduration_rtmp);
|
||||
}
|
||||
|
||||
if (ffmpeg_version === 6) {
|
||||
const codecs = [];
|
||||
if (skills.codecs.video.hevc?.length > 0) {
|
||||
codecs.push('hvc1');
|
||||
}
|
||||
if (skills.codecs.video.av1?.length > 0) {
|
||||
codecs.push('av01');
|
||||
}
|
||||
if (skills.codecs.video.vp9?.length > 0) {
|
||||
codecs.push('vp09');
|
||||
}
|
||||
|
||||
if (codecs.length !== 0) {
|
||||
input.options.push('-rtmp_enhanced_codecs', codecs.join(','));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (settings.general.analyzeduration !== 5000000) {
|
||||
input.options.push('-analyzeduration', settings.general.analyzeduration);
|
||||
|
||||
@ -14,6 +14,14 @@ const $skills_ffmpeg6 = {
|
||||
protocols: {
|
||||
input: ['http', 'https', 'rtmp', 'rtmps', 'srt'],
|
||||
},
|
||||
codecs: {
|
||||
audio: {},
|
||||
video: {
|
||||
av1: ['librav1e'],
|
||||
hevc: ['hevc'],
|
||||
vp9: ['libvpx-vp9'],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const $skills_ffmpeg5 = {
|
||||
@ -241,7 +249,7 @@ pullmatrix.tests = [
|
||||
skills: $skills_ffmpeg6,
|
||||
input: {
|
||||
address: 'rtmp://admin:foobar@127.0.0.1/live/stream',
|
||||
options: ['-fflags', '+genpts', '-thread_queue_size', 512, '-analyzeduration', 3000000],
|
||||
options: ['-fflags', '+genpts', '-thread_queue_size', 512, '-analyzeduration', 3000000, '-rtmp_enhanced_codecs', 'hvc1,av01,vp09'],
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -438,7 +446,7 @@ pushmatrix.tests = [
|
||||
config: $config,
|
||||
input: {
|
||||
address: '{rtmp,name=external.stream}',
|
||||
options: ['-fflags', '+genpts', '-thread_queue_size', 512, '-analyzeduration', 3000000],
|
||||
options: ['-fflags', '+genpts', '-thread_queue_size', 512, '-analyzeduration', 3000000, '-rtmp_enhanced_codecs', 'hvc1,av01,vp09'],
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user