[GH-ISSUE #1399] [Bug] Unable to load a Video (Cannot mix synchronous...) #1031

Closed
opened 2026-02-26 09:33:20 +03:00 by kerem · 5 comments
Owner

Originally created by @diogotex on GitHub (Jul 7, 2025).
Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/1399

Originally assigned to: @NickeManarin on GitHub.

Describe the bug
When Im at editor mode and try to import a .mp4 video, the preview apears perfectly but I can only import using Media Player as importer, and not FFmpeg as before. Via Media Player the color get a bit darker.
And via FFmpeg I get the error message:

Unable to load video
Cannot mix synchronous and asynchronous operation on process stream.

To Reproduce

  1. CHoose editor mode
  2. Drag and Drop a video .mp4
  3. Click OK to import using FFMpeg

Expected behavior
Import the video on the editor mode

Screenshots
Image

Desktop (please complete the following information):
Windows 10
V 2.41.3

Originally created by @diogotex on GitHub (Jul 7, 2025). Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/1399 Originally assigned to: @NickeManarin on GitHub. **Describe the bug** When Im at editor mode and try to import a .mp4 video, the preview apears perfectly but I can only import using Media Player as importer, and not FFmpeg as before. Via Media Player the color get a bit darker. And via FFmpeg I get the error message: Unable to load video Cannot mix synchronous and asynchronous operation on process stream. **To Reproduce** 1. CHoose editor mode 2. Drag and Drop a video .mp4 3. Click OK to import using FFMpeg **Expected behavior** Import the video on the editor mode **Screenshots** <img width="846" height="552" alt="Image" src="https://github.com/user-attachments/assets/e87d4c05-68e0-431a-acfa-ddd77224a32f" /> **Desktop (please complete the following information):** Windows 10 V 2.41.3
kerem 2026-02-26 09:33:20 +03:00
Author
Owner

@fz0000 commented on GitHub (Jul 11, 2025):

I can reproduce this issue on Windows 11 with v2.41.3, with some short videos.
I attached a sample .mp4 file. Error occurs when I import it in 10 fps:

https://github.com/user-attachments/assets/bca18886-4988-4ba0-8991-cc57521c2dc5

Sometimes this issue does not occur if:

  • Change the frame rate in this import dialog. (e.g. use 15 or 30 instead of 20)
  • Import a long/large video (e.g. > 2 min.)

In addition, I encountered several other errors when importing the .mp4 files, such as:

Image Image

All exceptions are thrown in this function:
github.com/NickeManarin/ScreenToGif@3657cd5326/ScreenToGif/Windows/Other/VideoSource.xaml.cs (L899)

<!-- gh-comment-id:3062484704 --> @fz0000 commented on GitHub (Jul 11, 2025): I can reproduce this issue on Windows 11 with v2.41.3, with some short videos. I attached a sample .mp4 file. Error occurs when I import it in 10 fps: https://github.com/user-attachments/assets/bca18886-4988-4ba0-8991-cc57521c2dc5 Sometimes this issue does not occur if: - Change the frame rate in this import dialog. (e.g. use 15 or 30 instead of 20) - Import a long/large video (e.g. > 2 min.) In addition, I encountered several other errors when importing the .mp4 files, such as: <img width="840" height="375" alt="Image" src="https://github.com/user-attachments/assets/c1c776f2-8e30-4ce0-905c-2ef1fb69bfe6" /> <img width="840" height="375" alt="Image" src="https://github.com/user-attachments/assets/658f1a53-4231-48f9-bb66-0f5e0f183e30" /> All exceptions are thrown in this function: https://github.com/NickeManarin/ScreenToGif/blob/3657cd5326b8bd569be8d03f1d752f3eefb4a04b/ScreenToGif/Windows/Other/VideoSource.xaml.cs#L899
Author
Owner

@diogotex commented on GitHub (Jul 11, 2025):

Thanks for the tests. The idea of different frame rate didn't work for me. I tried the same framerate of the original video, 24fps, but had the same issue.

The others errors I never get.

<!-- gh-comment-id:3062670394 --> @diogotex commented on GitHub (Jul 11, 2025): Thanks for the tests. The idea of different frame rate didn't work for me. I tried the same framerate of the original video, 24fps, but had the same issue. The others errors I never get.
Author
Owner

@NickeManarin commented on GitHub (Jul 13, 2025):

Thanks for the help, I could not reproduce any of the issues.
But anyway, I'm currently rewriting the code of the importer.

<!-- gh-comment-id:3067317770 --> @NickeManarin commented on GitHub (Jul 13, 2025): Thanks for the help, I could not reproduce any of the issues. But anyway, I'm currently rewriting the code of the importer.
Author
Owner

@NickeManarin commented on GitHub (Jul 15, 2025):

Done, I fixed several issues with the frame loading, both for using FFmpeg and the system media foundation (MediaPlayer).
Also fixed some issues with the video scrubbing as well.

<!-- gh-comment-id:3071612422 --> @NickeManarin commented on GitHub (Jul 15, 2025): Done, I fixed several issues with the frame loading, both for using FFmpeg and the system media foundation (MediaPlayer). Also fixed some issues with the video scrubbing as well.
Author
Owner

@NickeManarin commented on GitHub (Jul 15, 2025):

I should release the fixes this week, in 2-3 days.

<!-- gh-comment-id:3071612996 --> @NickeManarin commented on GitHub (Jul 15, 2025): I should release the fixes this week, in 2-3 days.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ScreenToGif#1031
No description provided.