logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
gray  
#1 Posted : Monday, May 30, 2016 6:40:08 AM(UTC)
gray

Rank: Newbie

Groups: Registered
Joined: 5/30/2016(UTC)
Posts: 1

I made simple XAML title with periodically changing text, but it eats too much CPU. VMIX cpu usage goes from 3% to 20% on 4 core processor when it's on, in comparision, ffmpeg streaming takes the same amount. Is there any way to optimize it?

Code:

<UserControl x:Class="TextHD_changing2"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" Width="720" Height="576" xmlns:my="clr-namespace:vMixTitleLibrary;assembly=vMixTitleLibrary">
    <UserControl.Resources>
        <Storyboard x:Key="Storyboard1" RepeatBehavior="Forever" Duration="00:30:0">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Text1">
		<SplineDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
		<SplineDoubleKeyFrame KeyTime="0:0:2" Value="1"/>
		<SplineDoubleKeyFrame KeyTime="0:15:0" Value="1"/>
		<SplineDoubleKeyFrame KeyTime="0:15:2" Value="0"/>
	    </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Text2">
		<SplineDoubleKeyFrame KeyTime="0:15:2" Value="0"/>
		<SplineDoubleKeyFrame KeyTime="0:15:4" Value="1"/>
		<SplineDoubleKeyFrame KeyTime="0:29:58" Value="1"/>
		<SplineDoubleKeyFrame KeyTime="0:30:0" Value="0"/>
	    </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <UserControl.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard Storyboard="{StaticResource Storyboard1}"/>
        </EventTrigger>
    </UserControl.Triggers>
    <Grid>
        <my:TextBlockDesign FontWeight="Bold" Stroke="Black" StrokeThickness="1" HorizontalAlignment="Left" Margin="15,10,15,10" Name="Text1" Text="First text" VerticalAlignment="Bottom" Width="690" Height="556" TextAlignment="Right" FontSize="24" Fill="White" Opacity="0">
        </my:TextBlockDesign> 
        <my:TextBlockDesign FontWeight="Bold" Stroke="Black" StrokeThickness="1" HorizontalAlignment="Left" Margin="15,10,15,10" Name="Text2" Text="Second text" VerticalAlignment="Bottom" Width="690" Height="556" TextAlignment="Right" FontSize="24" Fill="White" Opacity="0">
        </my:TextBlockDesign> 
    </Grid>
</UserControl>
Maximus  
#2 Posted : Monday, May 30, 2016 2:02:13 PM(UTC)
Maximus

Rank: Advanced Member

Groups: Registered
Joined: 10/25/2012(UTC)
Posts: 178
Location: Barbados

Thanks: 2 times
Was thanked: 24 time(s) in 24 post(s)
I too am experiencing high render times when using animated titles. Render times go from 5-6ms to 22-40ms. I am not sure if a more powerful video card would resolve this. I am currently using a NVidea 760, but I will wait on a 1070 before upgrading.
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.