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

Excessive flickering when cutting #2083

Closed
5 tasks done
Tomahawk27x opened this issue Jul 22, 2024 · 36 comments
Closed
5 tasks done

Excessive flickering when cutting #2083

Tomahawk27x opened this issue Jul 22, 2024 · 36 comments

Comments

@Tomahawk27x
Copy link

The fewer issues I have to read, the more new features I will have time to implement, so I ask that you please try these things first

Operating System

Windows 10

Steps to reproduce

Open file, then just seek around.

Expected behavior

Smooth seeking without any blank screens, flickering and stutters

Actual behavior

Desktop.2024.07.22.-.12.19.19.05.DVR.mp4

This has happened everytime I tried to use the app.

Share log from developer tools

No response

@mifi
Copy link
Owner

mifi commented Jul 22, 2024

does it happen when you playback also? or just when you seek? does it happen with all files? do you have any other computer to try on?

@Tomahawk27x
Copy link
Author

Playback is smooth, just seeking, it does happen with all files, I don't have any other computer, I have an NVIDIA graphics card and I record through shadowplay if that helps with anything.

@Tomahawk27x
Copy link
Author

Tomahawk27x commented Jul 23, 2024

Okay so I actually had some old videos recorded on a craptop with OBS, some flickered some didn't. Different resolutions too, had some clips recorded with Shadowplay on a 4:3 monitor and no signs of flickering, very strange.

Changing the window size of the cutter app fixes it for a moment only until I start seeking again.

@mifi
Copy link
Owner

mifi commented Jul 23, 2024

some people had trouble with nvidia and losslesscut they changed some settings in the nvidia control panel (for losslesscut), see https://github.com/search?q=repo%3Amifi%2Flossless-cut+nvidia&type=issues

@mattack1
Copy link

I noticed a similar thing, on MacOS.. But I'm usually editing MPEG2 files (SD files downloaded from my Tivo), which LLC doesn't support natively (so I can't actually just play with audio).. but a recent change seems to make it get video frames more quickly (GOOD), but IIRC it always flashes black then shows the video frame.

But it's still faster at showing the frame than it used to be.

@Tomahawk27x
Copy link
Author

some people had trouble with nvidia and losslesscut they changed some settings in the nvidia control panel (for losslesscut), see https://github.com/search?q=repo%3Amifi%2Flossless-cut+nvidia&type=issues

I've already tried that and it doesn't make any difference, the only fix I know is turning on compatibility mode for LLC which was mentioned in a previous issue, but seeking isn't as smooth. No flickering, just lower framerates, so I was wondering if there was a nother fix without changing the compatibility.

@Tomahawk27x
Copy link
Author

Note that playback isn't an issue at all it goes perfectly normal it's just the seeking.

@mifi
Copy link
Owner

mifi commented Jul 28, 2024

@Tomahawk27x out of curiosity if you load the same if in google chrome and scrub through, does the same happen?

@Tomahawk27x
Copy link
Author

Nope, not at all. Sorry for late reply

@mifi
Copy link
Owner

mifi commented Aug 1, 2024

it could be a problem with the current version of electron and might get solved when we upgrade

@mifi
Copy link
Owner

mifi commented Aug 7, 2024

electron has now been upgraded so you could try again with the latest version.

@Tomahawk27x
Copy link
Author

Unfortunately, no luck.

@Frizzle99
Copy link

Hello. Not sure what github etiquette is, but I just made an account to say I have this problem as well. It started happening in version 3.61 for me. and is also present in 3.62

@mifi
Copy link
Owner

mifi commented Aug 13, 2024

@Frizzle99 which OS?

@Frizzle99
Copy link

Windows 11 Pro 23H2. AMD 3700X CPU and 4070 Super graphics card.

@mifi
Copy link
Owner

mifi commented Aug 15, 2024

does it happen with all kinds of files? what if you try a simple mp4 h264 file like https://github.com/mifi/lossless-cut-fixtures/blob/master/hardangerbrua-dji-phantom.mp4

@Frizzle99
Copy link

Sorry for the late reply. I went back to 3.59.1, Just reinstalled 3.62 and with your file it works fine. Then I tried other files and now they all seem fine too. Not sure what happened there but it seems the problem just solved itself. For me at least, not sure about OP obviously. I'm sorry for wasting your time, Mikael.

@Frizzle99
Copy link

Back again. I failed to see the pattern before but now I noticed the problem is still there. It just -only- happens when the program converts to a supported format. So mostly WMV files and the like, not MKV/MP4

@mifi
Copy link
Owner

mifi commented Aug 27, 2024

@Frizzle99 I think your problem is different from OP. Maybe you can record a screencast

@Frizzle99
Copy link

Sure. First file is an MP4 source file, working as intended. Second is a wmv file that the app had to convert, showing the black flickering on seeking.

MP4.no.problem.mp4
WMV.problem.mp4

@Tomahawk27x
Copy link
Author

my files are mp4 yet they still flicker in the cutter

@mifi
Copy link
Owner

mifi commented Sep 2, 2024

@Frizzle99

WMV.problem.mp4

This is because of ffmpeg assisted playback (see upper left corner): wmv is actually not supported but with the ffmpeg assisted playback it is supported. unfortunately the ffmpeg assisted playback has always been a bit crude and it's not super trivial to make it smoother but I will see if i can get it improved some day.

@Tomahawk27x your issue is a different problem (not ffmpeg-assisted playback) and unfortunately I have no idea what's causing it.

@Frizzle99
Copy link

@Frizzle99

WMV.problem.mp4

This is because of ffmpeg assisted playback (see upper left corner): wmv is actually not supported but with the ffmpeg assisted playback it is supported. unfortunately the ffmpeg assisted playback has always been a bit crude and it's not super trivial to make it smoother but I will see if i can get it improved some day.

I know. It's always been like this with the app but it just started doing the black flicker in the latest version, which is why I added to the conversation here. As it does seem to be a different problem than OP is having I'll say sorry for trying to hijack his thread. ;)

@mifi
Copy link
Owner

mifi commented Sep 3, 2024

I know. It's always been like this with the app but it just started doing the black flicker in the latest version, which is why I added to the conversation here. As it does seem to be a different problem than OP is having I'll say sorry for trying to hijack his thread. ;)

i did now manage to find a way to reduce this flickering (note again for new readers, it's not the same as OP's flicker)

mifi added a commit that referenced this issue Sep 3, 2024
@Kaggypants
Copy link

Kaggypants commented Sep 10, 2024

Having the same issue when trying to cut mp4 and mkv files. Using Windows 11. Most of Lossless' menus look terribly distorted too, as if it's incorrectly trying to scale to a particular resolution.

https://www.youtube.com/watch?v=BJdn-uixKLg

I have tried using different versions of Lossless but, as far back as 3.52.0, they have this issue.

As noted, this is only an issue when using Lossless' video playback. When you make the cut, the export turns out just fine and plays everything without any flickering.

@whoiskevinrich
Copy link

[Possible Fix]
I have been able to control the flickering behavior by setting the "Multi-Frame Sampled AA (MFAA)" Setting to "Off" for the LosslessCut Application in the NVIDIA Control Panel as shown below.

I'd been having the issue for about a year and figured it was some Nvidia Setting.

image

@Tomahawk27x
Copy link
Author

thx it fixed it

@mifi
Copy link
Owner

mifi commented Sep 22, 2024

Ok closing this as it seems to be an nvidia bug

@mifi mifi closed this as not planned Won't fix, can't repro, duplicate, stale Sep 22, 2024
@Kaggypants
Copy link

Just FYI this did not fix it on my end as that setting is globally off in my control panel.

@mifi
Copy link
Owner

mifi commented Sep 22, 2024

Are you having the problem that Frizzle99 is having or OP’s problem?

@Kaggypants
Copy link

Kaggypants commented Sep 22, 2024

Are you having the problem that Frizzle99 is having or OP’s problem?

I'm having the issue mentioned by the OP. You can see it in the video I posted here. I'd like to reemphasize that Lossless' menus look extremely distorted, as if they are displaying at the incorrect resolution. When I click on Lossless after having alt tabbed, the program 'refocuses' and gets rid of the distortion. I believe this is probably causing the flickering issues. As you can see in the attached image, both the menus in the upper left and the buttons in the lower right look distorted/blurry.

blurry

In comparison, here is the refocused version of Lossless:

nonblurry

@mifi
Copy link
Owner

mifi commented Sep 22, 2024

Do you also have an nvidia gfx card? If so did you try all the nvidia specific workarounds like fps setting etc, from here #2083 (comment) ?
Also does it happen on other computers or just one one specific computer?

If not nvidia, what kind of graphics card do you have?

this is definitely a bug in the graphics driver, windows, or electron (or a combination of these). Unfortunately there’s no way for me to fix this, and we can only hope it gets fixed in the future by one of these parties, or some people find a workaround.

@Kaggypants
Copy link

Kaggypants commented Sep 22, 2024

I've attached my hardware/software specs. Additionally, I am using a GSYNC monitor @ 120FPS.

DxDiag.txt

Here is another video demonstrating the issue:

Example 2

As you can see, when I try to use seeking it will only play for a short amount of time before returning to the beginning of the video and pausing. In the second half of the video, you can see when I try to maximize Lossless and then play the video, the flickering issue is introduced.

I have tried both .mkv and old .mp4 videos that I had no problem cutting in the past using Lossless.

This is really unfortunate since I love your program.

@Frizzle99
Copy link

Okay this is getting out of control a little bit now :D
I don't have the same problem as OP, nor Kaggypants from the looks of it. I do also have an nvidia card and a gsync monitor. Turning off gsync or MFAA doesn't help. My issue is just a bit annoying, but it isn't a big deal really. As I said it only happens on videos where the program has to convert the file in order to view or edit it, so it seems to be a problem with the latest version of ffmpeg. Hopefully it will go away with future versions. Thanks for your program Mikael.

@Frizzle99
Copy link

Problem solved on this end with 3.63.0
Best version ever for me. :)

@Kaggypants
Copy link

I still have playback flickering in 3.63.0.0. When I try to maximize Lossless, the screen goes black. The UI text is also still distorted.

However, the videos are no longer resetting after 5 seconds when I hit play. Not ideal but serviceable at least.

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

6 participants