diff --git a/resources/js/modules/editor/partials/canvas/video-export.jsx b/resources/js/modules/editor/partials/canvas/video-export.jsx index dca8b59..603b380 100644 --- a/resources/js/modules/editor/partials/canvas/video-export.jsx +++ b/resources/js/modules/editor/partials/canvas/video-export.jsx @@ -127,9 +127,22 @@ const useVideoExport = ({ timelineElements, dimensions, totalDuration }) => { if (videos.length === 0 && images.length === 0) { if (is_string) { - return 'ffmpeg -f lavfi -i color=black:size=450x800:duration=1 -c:v libvpx-vp9 -t 1 output.mp4'; + return 'ffmpeg -y -c:v libvpx-vp9 -f lavfi -i color=black:size=450x800:duration=1 -t 1 -vcodec libx264 output.mp4'; } else { - return ['-f', 'lavfi', '-i', 'color=black:size=450x800:duration=1', '-c:v', 'libvpx-vp9', '-t', '1', 'output.mp4']; + return [ + '-y', + '-c:v', + 'libvpx-vp9', + '-f', + 'lavfi', + '-i', + 'color=black:size=450x800:duration=1', + '-t', + '1', + '-vcodec', + 'libx264', + 'output.mp4', + ]; } } @@ -314,20 +327,23 @@ const useVideoExport = ({ timelineElements, dimensions, totalDuration }) => { ); const finalArgs = [ + '-y', + '-c:v', + 'libvpx-vp9', ...inputArgs, '-filter_complex', filterComplex, '-map', `[${videoLayer}]`, ...audioArgs, - '-c:v', - 'libvpx-vp9', - '-pix_fmt', - 'yuv420p', + '-c:a', + 'aac', '-r', '30', '-t', totalDuration.toString(), + '-vcodec', + 'libx264', 'output.mp4', ]; @@ -344,7 +360,7 @@ const useVideoExport = ({ timelineElements, dimensions, totalDuration }) => { const inputs = inputStrings.join(' '); const audioMap = audioArgs.length > 0 ? ` ${audioArgs.map((arg) => escapeShellArg(arg)).join(' ')}` : ''; - const command = `ffmpeg ${inputs} -filter_complex ${escapeShellArg(filterComplex)} -map ${escapeShellArg(`[${videoLayer}]`)}${audioMap} -c:v libvpx-vp9 -pix_fmt yuv420p -r 30 -t ${totalDuration} output.mp4`; + const command = `ffmpeg -y -c:v libvpx-vp9 ${inputs} -filter_complex ${escapeShellArg(filterComplex)} -map ${escapeShellArg(`[${videoLayer}]`)}${audioMap} -c:a aac -r 30 -t ${totalDuration} -vcodec libx264 output.mp4`; showConsoleLogs && console.log('🎵 FINAL COMMAND HAS AUDIO:', command.includes('atrim') && command.includes('audio_final')); diff --git a/resources/js/modules/editor/templates/single_caption_meme_background.json b/resources/js/modules/editor/templates/single_caption_meme_background.json index 806e970..d89f2ad 100644 --- a/resources/js/modules/editor/templates/single_caption_meme_background.json +++ b/resources/js/modules/editor/templates/single_caption_meme_background.json @@ -55,7 +55,7 @@ "y": 200, "fontSize": 40, "fontWeight": "bold", - "fontFamily": "Montserrat", + "fontFamily": "Arial", "fontStyle": "normal", "fill": "#ffffff", "stroke": "#000000",