Add video preview, source crop, find-videos, and render toasts
Bring the Video tab closer to Shorts with 4K preview stills and crop modes (none, auto, center, plus the visual editor). Settings store a default source folder so Find videos can collect output.avi sequences. Cap the FFmpeg log with auto-scroll, hide repeat spam, and show a Windows notification when a video or short finishes or fails.
This commit is contained in:
+124
-10
@@ -34,14 +34,22 @@
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Border Grid.Column="0" Padding="18" Style="{StaticResource CardBorderStyle}">
|
||||
<StackPanel Spacing="12">
|
||||
<TextBlock Text="Source recordings" Style="{StaticResource SectionTitleStyle}" />
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<Button Content="Add video files..." Click="AddInputs_Click" />
|
||||
<Button Content="Clear" Click="ClearInputs_Click" />
|
||||
<Button Content="Add video files..." Click="AddInputs_Click"
|
||||
AutomationProperties.Name="Add video files" />
|
||||
<Button x:Name="FindVideosButton"
|
||||
Content="Find videos"
|
||||
Click="FindVideos_Click"
|
||||
AutomationProperties.Name="Find videos in the default source folder"
|
||||
AutomationProperties.AutomationId="FindVideosButton" />
|
||||
<Button Content="Clear" Click="ClearInputs_Click"
|
||||
AutomationProperties.Name="Clear source recordings" />
|
||||
</StackPanel>
|
||||
<ListView x:Name="InputList"
|
||||
Height="130"
|
||||
@@ -50,12 +58,47 @@
|
||||
AllowDrop="True"
|
||||
DragOver="InputList_DragOver"
|
||||
Drop="InputList_Drop"
|
||||
AutomationProperties.Name="Source recordings"
|
||||
ToolTipService.ToolTip="Drag and drop video files here to add them" />
|
||||
<Button x:Name="PreviewSourceButton"
|
||||
Content="Preview selected"
|
||||
Click="PreviewSource_Click"
|
||||
HorizontalAlignment="Left"
|
||||
IsEnabled="False" />
|
||||
IsEnabled="False"
|
||||
AutomationProperties.Name="Preview selected source" />
|
||||
|
||||
<TextBlock Text="Source crop" Style="{StaticResource SectionTitleStyle}" />
|
||||
<ComboBox x:Name="VideoCropModeBox" Header="Source crop" HorizontalAlignment="Stretch"
|
||||
AutomationProperties.Name="Source crop mode"
|
||||
AutomationProperties.AutomationId="VideoCropModeBox">
|
||||
<ComboBoxItem Content="None (keep full frame)" Tag="None" />
|
||||
<ComboBoxItem Content="Auto (remove left/right black borders)" Tag="Auto" />
|
||||
<ComboBoxItem Content="Center 4:3" Tag="Center" />
|
||||
</ComboBox>
|
||||
<TextBlock Text="Manual crop overrides the mode above. Leave at 0 to use the mode, or drag the kept region on a source frame."
|
||||
Style="{StaticResource MutedTextStyle}" TextWrapping="WrapWholeWords" />
|
||||
<Grid ColumnSpacing="10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox x:Name="VideoCropLeftBox" Grid.Column="0" Header="Crop left" Text="0"
|
||||
AutomationProperties.Name="Crop left pixels" />
|
||||
<TextBox x:Name="VideoCropRightBox" Grid.Column="1" Header="Crop right" Text="0"
|
||||
AutomationProperties.Name="Crop right pixels" />
|
||||
<TextBox x:Name="VideoCropTopBox" Grid.Column="2" Header="Crop top" Text="0"
|
||||
AutomationProperties.Name="Crop top pixels" />
|
||||
<TextBox x:Name="VideoCropBottomBox" Grid.Column="3" Header="Crop bottom" Text="0"
|
||||
AutomationProperties.Name="Crop bottom pixels" />
|
||||
</Grid>
|
||||
<Button x:Name="OpenVideoCropEditorButton"
|
||||
Content="Crop visually..."
|
||||
Click="OpenVideoCropEditor_Click"
|
||||
HorizontalAlignment="Left"
|
||||
AutomationProperties.Name="Open visual crop editor"
|
||||
AutomationProperties.AutomationId="OpenVideoCropEditorButton" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
@@ -75,16 +118,64 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBox x:Name="EndCardBox" Grid.Row="0" MinHeight="40" />
|
||||
<Button Grid.Row="0" Grid.Column="1" Content="Browse..." Click="BrowseEndCard_Click" VerticalAlignment="Stretch" MinWidth="120" />
|
||||
<TextBox x:Name="EndCardBox" Grid.Row="0" MinHeight="40" Header="End card"
|
||||
AutomationProperties.Name="End card image" />
|
||||
<Button Grid.Row="0" Grid.Column="1" Content="Browse..." Click="BrowseEndCard_Click" VerticalAlignment="Bottom" MinWidth="120"
|
||||
AutomationProperties.Name="Browse end card" />
|
||||
|
||||
<TextBox x:Name="OutputFolderBox" Grid.Row="1" MinHeight="40" />
|
||||
<Button Grid.Row="1" Grid.Column="1" Content="Browse..." Click="BrowseOutput_Click" VerticalAlignment="Stretch" MinWidth="120" />
|
||||
<TextBox x:Name="OutputFolderBox" Grid.Row="1" MinHeight="40" Header="Output folder"
|
||||
AutomationProperties.Name="Output folder" />
|
||||
<Button Grid.Row="1" Grid.Column="1" Content="Browse..." Click="BrowseOutput_Click" VerticalAlignment="Bottom" MinWidth="120"
|
||||
AutomationProperties.Name="Browse output folder" />
|
||||
|
||||
<TextBox x:Name="OutputNameBox" Grid.Row="2" Grid.ColumnSpan="2" MinHeight="40" />
|
||||
<TextBox x:Name="OutputNameBox" Grid.Row="2" Grid.ColumnSpan="2" MinHeight="40" Header="Output name"
|
||||
AutomationProperties.Name="Output name" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<StackPanel Grid.Column="2" Width="320" Spacing="10">
|
||||
<TextBlock Text="Preview" Style="{StaticResource SectionTitleStyle}" />
|
||||
<TextBlock x:Name="VideoPreviewStatusText"
|
||||
Text="Add source recordings, then update the preview to see the 4K look."
|
||||
Style="{StaticResource MutedTextStyle}"
|
||||
TextWrapping="WrapWholeWords" />
|
||||
<Button x:Name="UpdateVideoPreviewButton"
|
||||
Content="Update preview"
|
||||
Click="UpdateVideoPreview_Click"
|
||||
HorizontalAlignment="Stretch"
|
||||
AutomationProperties.Name="Update video preview"
|
||||
AutomationProperties.AutomationId="UpdateVideoPreviewButton" />
|
||||
<ProgressBar x:Name="VideoPreviewProgress"
|
||||
IsIndeterminate="True"
|
||||
Height="6"
|
||||
Visibility="Collapsed"
|
||||
AutomationProperties.Name="Video preview progress" />
|
||||
<StackPanel Spacing="6">
|
||||
<TextBlock Text="Opening" Style="{StaticResource MutedTextStyle}" />
|
||||
<Border Width="292" Height="164"
|
||||
Background="{ThemeResource PageBrush}"
|
||||
BorderBrush="{ThemeResource BorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="8">
|
||||
<Image x:Name="VideoPreviewOpeningImage"
|
||||
Stretch="Uniform"
|
||||
AutomationProperties.Name="Opening frame preview" />
|
||||
</Border>
|
||||
</StackPanel>
|
||||
<StackPanel Spacing="6">
|
||||
<TextBlock Text="Closing" Style="{StaticResource MutedTextStyle}" />
|
||||
<Border Width="292" Height="164"
|
||||
Background="{ThemeResource PageBrush}"
|
||||
BorderBrush="{ThemeResource BorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="8">
|
||||
<Image x:Name="VideoPreviewClosingImage"
|
||||
Stretch="Uniform"
|
||||
AutomationProperties.Name="End-card preview" />
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<Border Grid.Row="1" Padding="18" Style="{StaticResource CardBorderStyle}" x:Name="ShortsContentPanel" Visibility="Collapsed">
|
||||
@@ -210,10 +301,11 @@
|
||||
</Grid>
|
||||
<ComboBox x:Name="ShortCropModeBox" Header="Source crop" HorizontalAlignment="Stretch"
|
||||
AutomationProperties.Name="Source crop mode">
|
||||
<ComboBoxItem Content="None (keep full frame)" Tag="None" />
|
||||
<ComboBoxItem Content="Auto (remove left/right black borders)" Tag="Auto" />
|
||||
<ComboBoxItem Content="Center 4:3" Tag="Center" />
|
||||
</ComboBox>
|
||||
<TextBlock Text="Manual crop overrides auto/center. Leave at 0 to use the mode above, or drag the kept region on a source frame."
|
||||
<TextBlock Text="Manual crop overrides the mode above. Leave at 0 to use the mode, or drag the kept region on a source frame."
|
||||
Style="{StaticResource MutedTextStyle}" TextWrapping="WrapWholeWords" />
|
||||
<Grid ColumnSpacing="10">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -382,7 +474,10 @@
|
||||
FontFamily="Consolas"
|
||||
FontSize="12"
|
||||
VerticalAlignment="Stretch"
|
||||
MinHeight="320" />
|
||||
MinHeight="160"
|
||||
MaxHeight="280"
|
||||
AutomationProperties.Name="FFmpeg log text"
|
||||
AutomationProperties.AutomationId="FfmpegLogBox" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
@@ -497,6 +592,25 @@
|
||||
<TextBlock Text="After a successful render, original recordings are moved into an originals subfolder of the output folder. Uncheck to leave them where they are."
|
||||
TextWrapping="WrapWholeWords"
|
||||
Style="{StaticResource MutedTextStyle}" />
|
||||
<Grid ColumnSpacing="10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox x:Name="SourceSearchFolderBox"
|
||||
Grid.Column="0"
|
||||
Header="Default source folder"
|
||||
AutomationProperties.Name="Default folder for source recordings"
|
||||
AutomationProperties.AutomationId="SourceSearchFolderBox" />
|
||||
<Button Grid.Column="1"
|
||||
Content="Browse..."
|
||||
Click="BrowseSourceSearchFolder_Click"
|
||||
VerticalAlignment="Bottom"
|
||||
AutomationProperties.Name="Browse default source folder" />
|
||||
</Grid>
|
||||
<TextBlock Text="Find videos on the Video tab looks here for output.avi, then output_1.avi, output_2.avi, and so on until a name is missing."
|
||||
TextWrapping="WrapWholeWords"
|
||||
Style="{StaticResource MutedTextStyle}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user