flabbet преди 1 година
родител
ревизия
3f02506dbe
променени са 2 файла, в които са добавени 7 реда и са изтрити 2 реда
  1. 3 1
      src/PixiEditor.AnimationRenderer.FFmpeg/FFMpegRenderer.cs
  2. 4 1
      src/PixiEditor/Views/Dialogs/ExportFilePopup.axaml.cs

+ 3 - 1
src/PixiEditor.AnimationRenderer.FFmpeg/FFMpegRenderer.cs

@@ -120,7 +120,9 @@ public class FFMpegRenderer : IAnimationRenderer
             .OutputToFile(outputPath, true, options =>
             {
                 options.WithFramerate(FrameRate)
-                    .WithConstantRateFactor(21)
+                    .WithConstantRateFactor(18)
+                    .WithVideoBitrate(1800)
+                    .WithVideoCodec("mpeg4")
                     .ForcePixelFormat("yuv420p");
             });
     }

+ 4 - 1
src/PixiEditor/Views/Dialogs/ExportFilePopup.axaml.cs

@@ -429,7 +429,10 @@ internal partial class ExportFilePopup : PixiEditorPopup
     {
         if (e.Sender is ExportFilePopup popup)
         {
-            popup.RenderPreview();
+            if (popup.videoPreviewTimer != null)
+            {
+                popup.RenderPreview();
+            }
         }
     }
 }