Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffme:MediaElement shows a wrong rotated frame at begin. #630

Open
3 tasks done
Yishan001 opened this issue Oct 6, 2022 · 1 comment
Open
3 tasks done

ffme:MediaElement shows a wrong rotated frame at begin. #630

Yishan001 opened this issue Oct 6, 2022 · 1 comment

Comments

@Yishan001
Copy link

Issue Title (ffme:MediaElement shows a wrong rotated frame at begin.)

When just call ffme:MediaElement open (without play) a '.mov' video(captured by iphone), it has a wrong rotated frame shown flickly at begin.
upload .mov video here: https://user-images.githubusercontent.com/11456033/194298421-3051e2a9-3767-456e-ba72-04807eb8b2e4.mov
Other mp4 videos don't have this issue.
Maybe it's the ffme bug or .net framework bug, or others?

Issue Categories

  • Bug

Version Information

  • NuGet Package 4.4.350
  • Visual Studio 2022, .Net Framework 6.0(Long-term support)

Steps to Reproduce

  1. Using below xaml and C# codes (pls change files path).
  2. Build and run.
  3. Click the button. This issue will be shown at first click.

Expected Results

  • Result: Show the right rotated frame directly without the flicking issue.

Sample Code

XAML

<Window x:Class="testFFME.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:ffme="clr-namespace:Unosquare.FFME;assembly=ffme.win"
        xmlns:local="clr-namespace:testFFME"
        mc:Ignorable="d"
        Title="MainWindow" Height="900" Width="900">
    <Grid>
        <StackPanel>
            <ffme:MediaElement x:Name="Media" Background="Gray" LoadedBehavior="Manual" UnloadedBehavior="Manual" Width="720" Height="720"/>
            <Button Height="20" Width="80" Margin="0, 50, 0, 0" Click="Button_Click" />
        </StackPanel>
    </Grid>
</Window>

C#

public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();

            Unosquare.FFME.Library.FFmpegDirectory = @"D:\ffmpeg\bin";
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var currentVideoFile = @"D:\photos\0CE100B3-8835-4E31-A1B2-692FDC64FBD2.mov";
            Media.Open(new Uri(currentVideoFile)).GetAwaiter();
        }
    }
@Yishan001
Copy link
Author

add the wrong rotated frame picture.

Screen Shot 2022-10-08 at 00 47 01

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant