Fix always add probesize and analyzeduration options
This commit is contained in:
parent
8709d37738
commit
a87ad7d614
@ -74,10 +74,10 @@ const initSettings = (initialSettings, config) => {
|
||||
};
|
||||
|
||||
settings.general = {
|
||||
analyzeduration: 5000000,
|
||||
analyzeduration_rtmp: 3000000,
|
||||
analyzeduration_http: 20000000,
|
||||
probesize: 5000000,
|
||||
analyzeduration: 5_000_000, // microseconds, 5s,
|
||||
analyzeduration_rtmp: 3_000_000, // 3s
|
||||
analyzeduration_http: 20_000_000, // 20s
|
||||
probesize: 5_000_000, // bytes
|
||||
max_probe_packets: 2500,
|
||||
fflags: ['genpts'],
|
||||
thread_queue_size: 512,
|
||||
@ -220,9 +220,8 @@ const createInputs = (settings, config, skills) => {
|
||||
input.options.push('-fflags', '+' + settings.general.fflags.join('+'));
|
||||
}
|
||||
input.options.push('-thread_queue_size', settings.general.thread_queue_size);
|
||||
if (settings.general.probesize !== 5000000) {
|
||||
input.options.push('-probesize', settings.general.probesize);
|
||||
}
|
||||
|
||||
if (settings.general.max_probe_packets !== 2500) {
|
||||
input.options.push('-max_probe_packets', settings.general.max_probe_packets);
|
||||
}
|
||||
@ -245,13 +244,9 @@ const createInputs = (settings, config, skills) => {
|
||||
// analyzeduration: 20s for http and 3s for rtmp streams
|
||||
if (settings.mode === 'push') {
|
||||
if (settings.push.type === 'hls') {
|
||||
if (settings.general.analyzeduration_http !== 5000000) {
|
||||
input.options.push('-analyzeduration', settings.general.analyzeduration_http);
|
||||
}
|
||||
} else if (settings.push.type === 'rtmp') {
|
||||
if (settings.general.analyzeduration_rtmp !== 5000000) {
|
||||
input.options.push('-analyzeduration', settings.general.analyzeduration_rtmp);
|
||||
}
|
||||
|
||||
if (skills.ffmpeg.version_major >= 6) {
|
||||
const codecs = [];
|
||||
@ -270,59 +265,14 @@ const createInputs = (settings, config, skills) => {
|
||||
}
|
||||
}
|
||||
} else if (settings.push.type === 'srt') {
|
||||
if (settings.general.analyzeduration !== 5000000) {
|
||||
input.options.push('-analyzeduration', settings.general.analyzeduration);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (protocol === 'http') {
|
||||
if (settings.general.analyzeduration_http !== 5000000) {
|
||||
input.options.push('-analyzeduration', settings.general.analyzeduration_http);
|
||||
}
|
||||
} else if (protocol === 'rtmp') {
|
||||
if (settings.general.analyzeduration_rtmp !== 5000000) {
|
||||
input.options.push('-analyzeduration', settings.general.analyzeduration_rtmp);
|
||||
}
|
||||
|
||||
if (skills.ffmpeg.version_major >= 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (settings.mode === 'pull') {
|
||||
input.address = addUsernamePassword(input.address, settings.username, settings.password);
|
||||
|
||||
if (protocol === 'rtsp') {
|
||||
if (skills.ffmpeg.version_major === 4) {
|
||||
input.options.push('-stimeout', settings.rtsp.stimeout);
|
||||
} else {
|
||||
input.options.push('-timeout', settings.rtsp.stimeout);
|
||||
}
|
||||
if (protocol === 'http') {
|
||||
input.options.push('-analyzeduration', settings.general.analyzeduration_http);
|
||||
|
||||
if (settings.rtsp.udp === true) {
|
||||
input.options.push('-rtsp_transport', 'udp');
|
||||
} else {
|
||||
input.options.push('-rtsp_transport', 'tcp');
|
||||
}
|
||||
} else if (protocol === 'http') {
|
||||
if (settings.http.readNative === true) {
|
||||
input.options.push('-re');
|
||||
}
|
||||
@ -342,19 +292,44 @@ const createInputs = (settings, config, skills) => {
|
||||
if (settings.http.http_proxy.length !== 0) {
|
||||
input.options.push('-http_proxy', settings.http.http_proxy);
|
||||
}
|
||||
} else if (protocol === 'rtmp') {
|
||||
input.options.push('-analyzeduration', settings.general.analyzeduration_rtmp);
|
||||
|
||||
if (skills.ffmpeg.version_major >= 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.protocols.input.includes('playout')) {
|
||||
if (protocol === 'http' || protocol === 'rtmp' || protocol === 'rtsp') {
|
||||
if (!input.address.startsWith('playout:')) {
|
||||
input.address = 'playout:' + input.address;
|
||||
if (skills.codecs.video.vp9?.length > 0) {
|
||||
codecs.push('vp09');
|
||||
}
|
||||
|
||||
input.options.push('-playout_audio', '1');
|
||||
if (codecs.length !== 0) {
|
||||
input.options.push('-rtmp_enhanced_codecs', codecs.join(','));
|
||||
}
|
||||
}
|
||||
*/
|
||||
} else {
|
||||
input.options.push('-analyzeduration', settings.general.analyzeduration);
|
||||
|
||||
if (protocol === 'rtsp') {
|
||||
if (skills.ffmpeg.version_major === 4) {
|
||||
input.options.push('-stimeout', settings.rtsp.stimeout);
|
||||
} else {
|
||||
input.options.push('-timeout', settings.rtsp.stimeout);
|
||||
}
|
||||
|
||||
if (settings.rtsp.udp === true) {
|
||||
input.options.push('-rtsp_transport', 'udp');
|
||||
} else {
|
||||
input.options.push('-rtsp_transport', 'tcp');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return [input];
|
||||
};
|
||||
|
||||
@ -522,7 +497,18 @@ const isValidURL = (address) => {
|
||||
|
||||
function AdvancedSettings(props) {
|
||||
const settings = props.settings;
|
||||
const protocolClass = getProtocolClass(settings.address);
|
||||
let protocolClass = getProtocolClass(settings.address);
|
||||
if (settings.mode === 'push') {
|
||||
switch (settings.push.type) {
|
||||
case 'rtmp':
|
||||
protocolClass = 'rtmp';
|
||||
break;
|
||||
case 'srt':
|
||||
protocolClass = 'srt';
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<Grid item xs={12}>
|
||||
|
||||
@ -7,6 +7,8 @@ import * as Network from './Network';
|
||||
const $skills_ffmpeg6 = {
|
||||
ffmpeg: {
|
||||
version: '6.1.1',
|
||||
version_major: 6,
|
||||
version_minor: 1,
|
||||
},
|
||||
formats: {
|
||||
demuxers: ['rtsp'],
|
||||
@ -27,6 +29,8 @@ const $skills_ffmpeg6 = {
|
||||
const $skills_ffmpeg5 = {
|
||||
ffmpeg: {
|
||||
version: '5.1.2',
|
||||
version_major: 5,
|
||||
version_minor: 1,
|
||||
},
|
||||
formats: {
|
||||
demuxers: ['rtsp'],
|
||||
@ -39,6 +43,8 @@ const $skills_ffmpeg5 = {
|
||||
const $skills_ffmpeg4 = {
|
||||
ffmpeg: {
|
||||
version: '4.4.1',
|
||||
version_major: 4,
|
||||
version_minor: 4,
|
||||
},
|
||||
formats: {
|
||||
demuxers: ['rtsp'],
|
||||
@ -71,7 +77,7 @@ test('source:network pull', async () => {
|
||||
};
|
||||
|
||||
const Source = Network.component;
|
||||
let { getByLabelText, queryByText, rerender } = render(<Source onChange={handleChange} />);
|
||||
let { getByLabelText, queryByText, rerender } = render(<Source onChange={handleChange} knownDevices={[]} />);
|
||||
|
||||
expect(queryByText(`This protocol is unknown or not supported by the available FFmpeg binary.`)).toBe(null);
|
||||
|
||||
@ -81,19 +87,19 @@ test('source:network pull', async () => {
|
||||
expect($settings.mode).toBe('pull');
|
||||
expect($settings.address).toBe('rtsp://127.0.0.1/live/stream');
|
||||
|
||||
rerender(<Source settings={$settings} onChange={handleChange} />);
|
||||
rerender(<Source settings={$settings} onChange={handleChange} knownDevices={[]} />);
|
||||
|
||||
expect(queryByText(`This protocol is unknown or not supported by the available FFmpeg binary.`)).toBeInTheDocument();
|
||||
|
||||
rerender(<Source settings={$settings} skills={$skills_ffmpeg4} onChange={handleChange} />);
|
||||
rerender(<Source settings={$settings} skills={$skills_ffmpeg4} onChange={handleChange} knownDevices={[]} />);
|
||||
|
||||
expect(queryByText(`This protocol is unknown or not supported by the available FFmpeg binary.`)).toBe(null);
|
||||
|
||||
rerender(<Source settings={$settings} skills={$skills_ffmpeg5} onChange={handleChange} />);
|
||||
rerender(<Source settings={$settings} skills={$skills_ffmpeg5} onChange={handleChange} knownDevices={[]} />);
|
||||
|
||||
expect(queryByText(`This protocol is unknown or not supported by the available FFmpeg binary.`)).toBe(null);
|
||||
|
||||
rerender(<Source settings={$settings} skills={$skills_ffmpeg6} onChange={handleChange} />);
|
||||
rerender(<Source settings={$settings} skills={$skills_ffmpeg6} onChange={handleChange} knownDevices={[]} />);
|
||||
|
||||
expect(queryByText(`This protocol is unknown or not supported by the available FFmpeg binary.`)).toBe(null);
|
||||
});
|
||||
@ -140,7 +146,20 @@ pullmatrix.tests = [
|
||||
skills: $skills_ffmpeg4,
|
||||
input: {
|
||||
address: 'rtsp://admin:foobar@127.0.0.1/live/stream',
|
||||
options: ['-fflags', '+genpts', '-thread_queue_size', 512, '-stimeout', 5000000, '-rtsp_transport', 'tcp'],
|
||||
options: [
|
||||
'-fflags',
|
||||
'+genpts',
|
||||
'-thread_queue_size',
|
||||
512,
|
||||
'-probesize',
|
||||
5000000,
|
||||
'-analyzeduration',
|
||||
5000000,
|
||||
'-stimeout',
|
||||
5000000,
|
||||
'-rtsp_transport',
|
||||
'tcp',
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -149,7 +168,7 @@ pullmatrix.tests = [
|
||||
skills: $skills_ffmpeg4,
|
||||
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, '-probesize', 5000000, '-analyzeduration', 3000000],
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -163,6 +182,8 @@ pullmatrix.tests = [
|
||||
'+genpts',
|
||||
'-thread_queue_size',
|
||||
512,
|
||||
'-probesize',
|
||||
5000000,
|
||||
'-analyzeduration',
|
||||
20000000,
|
||||
'-re',
|
||||
@ -181,7 +202,7 @@ pullmatrix.tests = [
|
||||
skills: $skills_ffmpeg4,
|
||||
input: {
|
||||
address: 'srt://127.0.0.1?mode=caller&streamid=foobar',
|
||||
options: ['-fflags', '+genpts', '-thread_queue_size', 512],
|
||||
options: ['-fflags', '+genpts', '-thread_queue_size', 512, '-probesize', 5000000, '-analyzeduration', 5000000],
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -190,7 +211,20 @@ pullmatrix.tests = [
|
||||
skills: $skills_ffmpeg5,
|
||||
input: {
|
||||
address: 'rtsp://admin:foobar@127.0.0.1/live/stream',
|
||||
options: ['-fflags', '+genpts', '-thread_queue_size', 512, '-timeout', 5000000, '-rtsp_transport', 'tcp'],
|
||||
options: [
|
||||
'-fflags',
|
||||
'+genpts',
|
||||
'-thread_queue_size',
|
||||
512,
|
||||
'-probesize',
|
||||
5000000,
|
||||
'-analyzeduration',
|
||||
5000000,
|
||||
'-timeout',
|
||||
5000000,
|
||||
'-rtsp_transport',
|
||||
'tcp',
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -199,7 +233,7 @@ pullmatrix.tests = [
|
||||
skills: $skills_ffmpeg5,
|
||||
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, '-probesize', 5000000, '-analyzeduration', 3000000],
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -213,6 +247,8 @@ pullmatrix.tests = [
|
||||
'+genpts',
|
||||
'-thread_queue_size',
|
||||
512,
|
||||
'-probesize',
|
||||
5000000,
|
||||
'-analyzeduration',
|
||||
20000000,
|
||||
'-re',
|
||||
@ -231,7 +267,7 @@ pullmatrix.tests = [
|
||||
skills: $skills_ffmpeg5,
|
||||
input: {
|
||||
address: 'srt://127.0.0.1?mode=caller&streamid=foobar',
|
||||
options: ['-fflags', '+genpts', '-thread_queue_size', 512],
|
||||
options: ['-fflags', '+genpts', '-thread_queue_size', 512, '-probesize', 5000000, '-analyzeduration', 5000000],
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -240,7 +276,20 @@ pullmatrix.tests = [
|
||||
skills: $skills_ffmpeg6,
|
||||
input: {
|
||||
address: 'rtsp://admin:foobar@127.0.0.1/live/stream',
|
||||
options: ['-fflags', '+genpts', '-thread_queue_size', 512, '-timeout', 5000000, '-rtsp_transport', 'tcp'],
|
||||
options: [
|
||||
'-fflags',
|
||||
'+genpts',
|
||||
'-thread_queue_size',
|
||||
512,
|
||||
'-probesize',
|
||||
5000000,
|
||||
'-analyzeduration',
|
||||
5000000,
|
||||
'-timeout',
|
||||
5000000,
|
||||
'-rtsp_transport',
|
||||
'tcp',
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -249,7 +298,18 @@ 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, '-rtmp_enhanced_codecs', 'hvc1,av01,vp09'],
|
||||
options: [
|
||||
'-fflags',
|
||||
'+genpts',
|
||||
'-thread_queue_size',
|
||||
512,
|
||||
'-probesize',
|
||||
5000000,
|
||||
'-analyzeduration',
|
||||
3000000,
|
||||
'-rtmp_enhanced_codecs',
|
||||
'hvc1,av01,vp09',
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -263,6 +323,8 @@ pullmatrix.tests = [
|
||||
'+genpts',
|
||||
'-thread_queue_size',
|
||||
512,
|
||||
'-probesize',
|
||||
5000000,
|
||||
'-analyzeduration',
|
||||
20000000,
|
||||
'-re',
|
||||
@ -281,7 +343,7 @@ pullmatrix.tests = [
|
||||
skills: $skills_ffmpeg6,
|
||||
input: {
|
||||
address: 'srt://127.0.0.1?mode=caller&streamid=foobar',
|
||||
options: ['-fflags', '+genpts', '-thread_queue_size', 512],
|
||||
options: ['-fflags', '+genpts', '-thread_queue_size', 512, '-probesize', 5000000, '-analyzeduration', 5000000],
|
||||
},
|
||||
},
|
||||
];
|
||||
@ -294,7 +356,7 @@ test.each(pullmatrix.tests)('source:network pull $name input with ffmpeg $skills
|
||||
|
||||
const Source = Network.component;
|
||||
|
||||
let { getByText, getByRole } = render(<Source settings={data.settings} skills={data.skills} onProbe={handleProbe} />);
|
||||
let { getByText, getByRole } = render(<Source settings={data.settings} skills={data.skills} onProbe={handleProbe} knownDevices={[]} />);
|
||||
|
||||
expect(getByText('Probe')).toBeInTheDocument();
|
||||
|
||||
@ -318,21 +380,21 @@ test('source:network push', async () => {
|
||||
};
|
||||
|
||||
const Source = Network.component;
|
||||
let { queryByText, rerender } = render(<Source settings={$settings} onChange={handleChange} />);
|
||||
let { queryByText, rerender } = render(<Source settings={$settings} onChange={handleChange} knownDevices={[]} />);
|
||||
|
||||
expect($settings.mode).toBe('push');
|
||||
|
||||
expect(queryByText(`The available FFmpeg binary doesn't support any of the required protocols.`)).toBeInTheDocument();
|
||||
|
||||
rerender(<Source settings={$settings} skills={$skills_ffmpeg4} onChange={handleChange} />);
|
||||
rerender(<Source settings={$settings} skills={$skills_ffmpeg4} onChange={handleChange} knownDevices={[]} />);
|
||||
|
||||
expect(queryByText(`The available FFmpeg binary doesn't support any of the required protocols.`)).toBe(null);
|
||||
|
||||
rerender(<Source settings={$settings} skills={$skills_ffmpeg5} onChange={handleChange} />);
|
||||
rerender(<Source settings={$settings} skills={$skills_ffmpeg5} onChange={handleChange} knownDevices={[]} />);
|
||||
|
||||
expect(queryByText(`The available FFmpeg binary doesn't support any of the required protocols.`)).toBe(null);
|
||||
|
||||
rerender(<Source settings={$settings} skills={$skills_ffmpeg6} onChange={handleChange} />);
|
||||
rerender(<Source settings={$settings} skills={$skills_ffmpeg6} onChange={handleChange} knownDevices={[]} />);
|
||||
|
||||
expect(queryByText(`The available FFmpeg binary doesn't support any of the required protocols.`)).toBe(null);
|
||||
});
|
||||
@ -350,14 +412,14 @@ test('source:network push RTMP', async () => {
|
||||
};
|
||||
|
||||
const Source = Network.component;
|
||||
let { getByText, queryByText, rerender } = render(<Source settings={$settings} skills={$skills_ffmpeg5} onChange={handleChange} />);
|
||||
let { getByText, queryByText, rerender } = render(<Source settings={$settings} skills={$skills_ffmpeg5} onChange={handleChange} knownDevices={[]} />);
|
||||
|
||||
expect($settings.mode).toBe('push');
|
||||
expect($settings.push.type).toBe('rtmp');
|
||||
|
||||
expect(queryByText(`Enable RTMP server ...`)).toBeInTheDocument();
|
||||
|
||||
rerender(<Source settings={$settings} config={$config} skills={$skills_ffmpeg5} onChange={handleChange} />);
|
||||
rerender(<Source settings={$settings} config={$config} skills={$skills_ffmpeg5} onChange={handleChange} knownDevices={[]} />);
|
||||
|
||||
expect(getByText('Probe')).toBeInTheDocument();
|
||||
});
|
||||
@ -375,14 +437,14 @@ test('source:network push SRT', async () => {
|
||||
};
|
||||
|
||||
const Source = Network.component;
|
||||
let { getByText, queryByText, rerender } = render(<Source settings={$settings} skills={$skills_ffmpeg5} onChange={handleChange} />);
|
||||
let { getByText, queryByText, rerender } = render(<Source settings={$settings} skills={$skills_ffmpeg5} onChange={handleChange} knownDevices={[]} />);
|
||||
|
||||
expect($settings.mode).toBe('push');
|
||||
expect($settings.push.type).toBe('srt');
|
||||
|
||||
expect(queryByText(`Enable SRT server ...`)).toBeInTheDocument();
|
||||
|
||||
rerender(<Source settings={$settings} config={$config} skills={$skills_ffmpeg5} onChange={handleChange} />);
|
||||
rerender(<Source settings={$settings} config={$config} skills={$skills_ffmpeg5} onChange={handleChange} knownDevices={[]} />);
|
||||
|
||||
expect(getByText('Probe')).toBeInTheDocument();
|
||||
});
|
||||
@ -406,7 +468,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, '-probesize', 5000000, '-analyzeduration', 3000000],
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -416,7 +478,7 @@ pushmatrix.tests = [
|
||||
config: $config,
|
||||
input: {
|
||||
address: '{srt,name=external.stream,mode=request}',
|
||||
options: ['-fflags', '+genpts', '-thread_queue_size', 512],
|
||||
options: ['-fflags', '+genpts', '-thread_queue_size', 512, '-probesize', 5000000, '-analyzeduration', 5000000],
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -426,7 +488,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, '-probesize', 5000000, '-analyzeduration', 3000000],
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -436,7 +498,7 @@ pushmatrix.tests = [
|
||||
config: $config,
|
||||
input: {
|
||||
address: '{srt,name=external.stream,mode=request}',
|
||||
options: ['-fflags', '+genpts', '-thread_queue_size', 512],
|
||||
options: ['-fflags', '+genpts', '-thread_queue_size', 512, '-probesize', 5000000, '-analyzeduration', 5000000],
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -446,7 +508,18 @@ pushmatrix.tests = [
|
||||
config: $config,
|
||||
input: {
|
||||
address: '{rtmp,name=external.stream}',
|
||||
options: ['-fflags', '+genpts', '-thread_queue_size', 512, '-analyzeduration', 3000000, '-rtmp_enhanced_codecs', 'hvc1,av01,vp09'],
|
||||
options: [
|
||||
'-fflags',
|
||||
'+genpts',
|
||||
'-thread_queue_size',
|
||||
512,
|
||||
'-probesize',
|
||||
5000000,
|
||||
'-analyzeduration',
|
||||
3000000,
|
||||
'-rtmp_enhanced_codecs',
|
||||
'hvc1,av01,vp09',
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -456,7 +529,7 @@ pushmatrix.tests = [
|
||||
config: $config,
|
||||
input: {
|
||||
address: '{srt,name=external.stream,mode=request}',
|
||||
options: ['-fflags', '+genpts', '-thread_queue_size', 512],
|
||||
options: ['-fflags', '+genpts', '-thread_queue_size', 512, '-probesize', 5000000, '-analyzeduration', 5000000],
|
||||
},
|
||||
},
|
||||
];
|
||||
@ -468,7 +541,9 @@ test.each(pushmatrix.tests)('source:network push $name input with ffmpeg $skills
|
||||
};
|
||||
|
||||
const Source = Network.component;
|
||||
let { getByText, getByRole } = render(<Source settings={data.settings} config={data.config} skills={data.skills} onProbe={handleProbe} />);
|
||||
let { getByText, getByRole } = render(
|
||||
<Source settings={data.settings} config={data.config} skills={data.skills} onProbe={handleProbe} knownDevices={[]} />,
|
||||
);
|
||||
|
||||
expect(getByText('Probe')).toBeInTheDocument();
|
||||
|
||||
|
||||
@ -18,6 +18,8 @@ const restreamer = {
|
||||
return {
|
||||
ffmpeg: {
|
||||
version: '5.1.2',
|
||||
version_major: 5,
|
||||
version_minor: 1,
|
||||
},
|
||||
formats: {
|
||||
demuxers: ['rtsp'],
|
||||
@ -26,7 +28,7 @@ const restreamer = {
|
||||
input: ['http', 'https', 'rtmp', 'rtmps', 'srt'],
|
||||
},
|
||||
sources: {
|
||||
network: {},
|
||||
network: [],
|
||||
},
|
||||
encoders: {
|
||||
audio: ['copy', 'none', 'aac'],
|
||||
@ -335,7 +337,7 @@ test('wizard: rtmp source video h264-aac', async () => {
|
||||
let button = screen.getByRole('button', { name: 'RTMP server' });
|
||||
fireEvent.click(button);
|
||||
|
||||
expect(screen.queryByText(/Send stream to this address:/)).toBeInTheDocument();
|
||||
expect(screen.queryByText(/Address:/)).toBeInTheDocument();
|
||||
|
||||
button = screen.getByRole('button', { name: 'Next' });
|
||||
expect(button).toBeEnabled();
|
||||
@ -397,6 +399,8 @@ test('wizard: srt source video h264-aac', async () => {
|
||||
let button = screen.getByRole('button', { name: 'SRT server' });
|
||||
fireEvent.click(button);
|
||||
|
||||
expect(screen.queryByText(/Address:/)).toBeInTheDocument();
|
||||
|
||||
button = screen.getByRole('button', { name: 'Next' });
|
||||
expect(button).toBeEnabled();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user