fix: move LayoutStudio before per-audio section and add ultrafast preset + 1fps output
- LayoutStudio was buried after the per-audio list, making settings invisible before submit; moved it right after the Files section so layout/watermark settings are always visible in the workflow - Add -preset ultrafast and -r 1 to both libx264 encode paths; without a preset FFmpeg defaults to medium and wastes time on motion estimation for still images; -r 1 avoids 25x frame synthesis overhead on 1080p
This commit is contained in:
+25
-25
@@ -478,6 +478,31 @@ export function UploadForm() {
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<LayoutStudio
|
||||||
|
locked={false}
|
||||||
|
previewImageUrl={
|
||||||
|
audioItems.find((a) => a.itemImagePreview)?.itemImagePreview || imagePreviewUrl
|
||||||
|
}
|
||||||
|
previewBackgroundUrl={backgroundPreviewUrl}
|
||||||
|
songTitle={
|
||||||
|
audioItems[0]?.metadata.songTitle ||
|
||||||
|
audioItems[0]?.metadata.title ||
|
||||||
|
"Track title"
|
||||||
|
}
|
||||||
|
artist={audioItems[0]?.metadata.artist || ""}
|
||||||
|
encodeWidth={parseInt(readyAudios[0]?.metadata.resolution?.split("x")[0] || "1280", 10)}
|
||||||
|
layout={jobLayout}
|
||||||
|
onLayoutChange={applyLayoutToAll}
|
||||||
|
watermark={jobWatermark}
|
||||||
|
onWatermarkChange={applyWatermarkToAll}
|
||||||
|
onUploadLogo={handleLogoUpload}
|
||||||
|
onUploadFont={handleFontUpload}
|
||||||
|
onUploadBackground={handleBackgroundUpload}
|
||||||
|
onClearBackground={clearBackgroundImage}
|
||||||
|
hasCustomBackground={Boolean(backgroundImagePath)}
|
||||||
|
logoPreviewUrl={logoPreviewUrl}
|
||||||
|
/>
|
||||||
|
|
||||||
{audioItems.length > 0 && (
|
{audioItems.length > 0 && (
|
||||||
<section className="space-y-4">
|
<section className="space-y-4">
|
||||||
<h2 className="text-lg font-medium text-white">Video details (per audio)</h2>
|
<h2 className="text-lg font-medium text-white">Video details (per audio)</h2>
|
||||||
@@ -640,31 +665,6 @@ export function UploadForm() {
|
|||||||
</section>
|
</section>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<LayoutStudio
|
|
||||||
locked={false}
|
|
||||||
previewImageUrl={
|
|
||||||
audioItems.find((a) => a.itemImagePreview)?.itemImagePreview || imagePreviewUrl
|
|
||||||
}
|
|
||||||
previewBackgroundUrl={backgroundPreviewUrl}
|
|
||||||
songTitle={
|
|
||||||
audioItems[0]?.metadata.songTitle ||
|
|
||||||
audioItems[0]?.metadata.title ||
|
|
||||||
"Track title"
|
|
||||||
}
|
|
||||||
artist={audioItems[0]?.metadata.artist || ""}
|
|
||||||
encodeWidth={parseInt(readyAudios[0]?.metadata.resolution?.split("x")[0] || "1280", 10)}
|
|
||||||
layout={jobLayout}
|
|
||||||
onLayoutChange={applyLayoutToAll}
|
|
||||||
watermark={jobWatermark}
|
|
||||||
onWatermarkChange={applyWatermarkToAll}
|
|
||||||
onUploadLogo={handleLogoUpload}
|
|
||||||
onUploadFont={handleFontUpload}
|
|
||||||
onUploadBackground={handleBackgroundUpload}
|
|
||||||
onClearBackground={clearBackgroundImage}
|
|
||||||
hasCustomBackground={Boolean(backgroundImagePath)}
|
|
||||||
logoPreviewUrl={logoPreviewUrl}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={!canSubmit}
|
disabled={!canSubmit}
|
||||||
|
|||||||
@@ -283,8 +283,12 @@ export async function encodeVideo(options: {
|
|||||||
args.push(
|
args.push(
|
||||||
"-c:v",
|
"-c:v",
|
||||||
"libx264",
|
"libx264",
|
||||||
|
"-preset",
|
||||||
|
"ultrafast",
|
||||||
"-tune",
|
"-tune",
|
||||||
"stillimage",
|
"stillimage",
|
||||||
|
"-r",
|
||||||
|
"1",
|
||||||
);
|
);
|
||||||
pushAudioEncodeArgs(args, audioEncode);
|
pushAudioEncodeArgs(args, audioEncode);
|
||||||
args.push(
|
args.push(
|
||||||
@@ -382,8 +386,12 @@ export async function encodeVideo(options: {
|
|||||||
args.push(
|
args.push(
|
||||||
"-c:v",
|
"-c:v",
|
||||||
"libx264",
|
"libx264",
|
||||||
|
"-preset",
|
||||||
|
"ultrafast",
|
||||||
"-tune",
|
"-tune",
|
||||||
"stillimage",
|
"stillimage",
|
||||||
|
"-r",
|
||||||
|
"1",
|
||||||
);
|
);
|
||||||
pushAudioEncodeArgs(args, audioEncode);
|
pushAudioEncodeArgs(args, audioEncode);
|
||||||
args.push(
|
args.push(
|
||||||
|
|||||||
Reference in New Issue
Block a user