mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
Display video passthrough values properly + some tweaks
This commit is contained in:
parent
ff955c7ac8
commit
dc41b21b92
@ -69,11 +69,15 @@ export default function Home() {
|
|||||||
|
|
||||||
// map out settings
|
// map out settings
|
||||||
const videoQualitySettings = configData?.videoSettings?.videoQualityVariants?.map((setting, index) => {
|
const videoQualitySettings = configData?.videoSettings?.videoQualityVariants?.map((setting, index) => {
|
||||||
const { audioPassthrough, audioBitrate, videoBitrate, framerate } = setting;
|
const { audioPassthrough, videoPassthrough, audioBitrate, videoBitrate, framerate } = setting;
|
||||||
const audioSetting =
|
const audioSetting =
|
||||||
audioPassthrough || audioBitrate === 0
|
audioPassthrough || audioBitrate === 0
|
||||||
? `${streamDetails.audioCodec} ${streamDetails.audioBitrate} kpbs`
|
? `${streamDetails.audioCodec} ${streamDetails.audioBitrate} kpbs`
|
||||||
: `${audioBitrate} kbps`;
|
: `${audioBitrate} kbps`;
|
||||||
|
const videoSetting =
|
||||||
|
videoPassthrough || videoBitrate === 0
|
||||||
|
? `${streamDetails.videoBitrate} kbps ${streamDetails.framerate}fps ${streamDetails.width}x${streamDetails.height}`
|
||||||
|
: `${videoBitrate} kbps ${framerate}fps`;
|
||||||
|
|
||||||
let settingTitle = 'Outbound Stream Details';
|
let settingTitle = 'Outbound Stream Details';
|
||||||
settingTitle = (videoQualitySettings?.length > 1) ?
|
settingTitle = (videoQualitySettings?.length > 1) ?
|
||||||
@ -82,7 +86,7 @@ export default function Home() {
|
|||||||
<Card title={settingTitle} type="inner" key={settingTitle}>
|
<Card title={settingTitle} type="inner" key={settingTitle}>
|
||||||
<StatisticItem
|
<StatisticItem
|
||||||
title="Outbound Video Stream"
|
title="Outbound Video Stream"
|
||||||
value={`${videoBitrate} kbps, ${framerate} fps`}
|
value={videoSetting}
|
||||||
prefix={null}
|
prefix={null}
|
||||||
/>
|
/>
|
||||||
<StatisticItem
|
<StatisticItem
|
||||||
|
@ -98,8 +98,12 @@ function InstanceDetails({ config }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<p>
|
||||||
<KeyValueTable title="Server details" data={data} />
|
<KeyValueTable title="Server details" data={data} />
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
<KeyValueTable title="Server configuration" data={configData} />
|
<KeyValueTable title="Server configuration" data={configData} />
|
||||||
|
</p>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -125,9 +129,15 @@ export default function ServerConfig() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
<p>
|
||||||
<InstanceDetails config={config} />
|
<InstanceDetails config={config} />
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
<SocialHandles config={config} />
|
<SocialHandles config={config} />
|
||||||
|
</p>
|
||||||
<PageContent config={config} />
|
<PageContent config={config} />
|
||||||
|
<br/>
|
||||||
|
<Title level={5}>Learn more about configuring Owncast <a href="https://owncast.online/docs/configuration">by visiting the documentation.</a></Title>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -12,29 +12,38 @@ function VideoVariants({ config }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const videoQualityColumns = [
|
const videoQualityColumns = [
|
||||||
|
{
|
||||||
|
title: "#",
|
||||||
|
dataIndex: "key",
|
||||||
|
key: "key"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "Video bitrate",
|
title: "Video bitrate",
|
||||||
dataIndex: "videoBitrate",
|
dataIndex: "videoBitrate",
|
||||||
key: "videoBitrate",
|
key: "videoBitrate",
|
||||||
render: (bitrate) =>
|
render: (bitrate) =>
|
||||||
bitrate === 0 || !bitrate ? "Passthrough" : `${bitrate} kbps`,
|
!bitrate ? "Same as source" : `${bitrate} kbps`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Framerate",
|
title: "Framerate",
|
||||||
dataIndex: "framerate",
|
dataIndex: "framerate",
|
||||||
key: "framerate",
|
key: "framerate",
|
||||||
|
render: (framerate) =>
|
||||||
|
!framerate ? "Same as source" : `${framerate} fps`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Encoder preset",
|
title: "Encoder preset",
|
||||||
dataIndex: "encoderPreset",
|
dataIndex: "encoderPreset",
|
||||||
key: "framerate",
|
key: "framerate",
|
||||||
|
render: (preset) =>
|
||||||
|
!preset ? "n/a" : preset,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Audio bitrate",
|
title: "Audio bitrate",
|
||||||
dataIndex: "audioBitrate",
|
dataIndex: "audioBitrate",
|
||||||
key: "audioBitrate",
|
key: "audioBitrate",
|
||||||
render: (bitrate) =>
|
render: (bitrate) =>
|
||||||
bitrate === 0 || !bitrate ? "Passthrough" : `${bitrate} kbps`,
|
!bitrate ? "Same as source" : `${bitrate} kbps`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -55,27 +64,39 @@ function VideoVariants({ config }) {
|
|||||||
{
|
{
|
||||||
name: "Segment length",
|
name: "Segment length",
|
||||||
value: config.videoSettings.segmentLengthSeconds,
|
value: config.videoSettings.segmentLengthSeconds,
|
||||||
|
key: "segmentLength"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Number of segments",
|
name: "Number of segments",
|
||||||
value: config.videoSettings.numberOfPlaylistItems,
|
value: config.videoSettings.numberOfPlaylistItems,
|
||||||
|
key: "numberOfSegments"
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const videoQualityVariantData = config.videoSettings.videoQualityVariants.map(function(variant, index) {
|
||||||
|
return {
|
||||||
|
key: index,
|
||||||
|
...variant
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Title>Video configuration</Title>
|
<Title>Video configuration</Title>
|
||||||
<Table
|
<Table
|
||||||
pagination={false}
|
pagination={false}
|
||||||
columns={videoQualityColumns}
|
columns={videoQualityColumns}
|
||||||
dataSource={config.videoSettings.videoQualityVariants}
|
dataSource={videoQualityVariantData}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Table
|
<Table
|
||||||
pagination={false}
|
pagination={false}
|
||||||
columns={miscVideoSettingsColumns}
|
columns={miscVideoSettingsColumns}
|
||||||
dataSource={miscVideoSettings}
|
dataSource={miscVideoSettings}
|
||||||
|
rowKey={row => row.name}
|
||||||
/>
|
/>
|
||||||
|
<br/>
|
||||||
|
<Title level={5}>Learn more about configuring Owncast <a href="https://owncast.online/docs/configuration">by visiting the documentation.</a></Title>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ export const initialServerConfigState = {
|
|||||||
videoQualityVariants: [
|
videoQualityVariants: [
|
||||||
{
|
{
|
||||||
audioPassthrough: false,
|
audioPassthrough: false,
|
||||||
|
videoPassthrough: false,
|
||||||
videoBitrate: 0,
|
videoBitrate: 0,
|
||||||
audioBitrate: 0,
|
audioBitrate: 0,
|
||||||
framerate: 0,
|
framerate: 0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user