Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Anyway to drop/reduce FPS of a media that's 50-60+fps #632

Open
winstonpang opened this issue Apr 4, 2020 · 5 comments
Open

Anyway to drop/reduce FPS of a media that's 50-60+fps #632

winstonpang opened this issue Apr 4, 2020 · 5 comments

Comments

@winstonpang
Copy link

I have a question (pick one) about Vlc.DotNet.

Generic information

  • Vlc.DotNet version : 3.0.0
  • Vlc.DotNet project used : WPF
  • libvlc version : 3.0.8.1 (x86/x64) + NuGet
  • .net version : 4.7.2
  • Project language : C#
  • Project build architecture : AnyCPU (prefer 32bits)
  • Operating system : Windows 10 x64

Summary

So I've been authoring a simple media player so that the UI is very simple and labelled for a family friend to use, as they're extremely non-tech savy.

All is working well, except recently one of the shows they regularly watched has now been uploaded as 50fps 1080p files. Before it was 25fps 1080p files and they worked very well.

As a result, as it's on a mini computer, I think the performance is just not there to decode it fast enough. Now there's momentary skips/breaks, as well as occassional blotches where all the visual imagery is patchy or goes gray completely then it recovers slowly.

I am attributing this all to the higher FPS of the media.

So long story short, is there anyway to downscale/reduce the frame rate?

@jeremyVignelles
Copy link
Collaborator

https://github.com/ZeBobo5/Vlc.DotNet#writing-a-wpf-app--migrating-wpf-control-from-2x

You might notice a performance impact when reading, for example, a 4k @ 60 fps video on a low-end computer.

I'd recommend that you use the WinForms control instead

For your question:
You can use "--fps-fps", "20" in the player options.

@winstonpang
Copy link
Author

@jeremyVignelles Thanks for your extremely speedy reply.

I have actually ported to use the WinForms control and hosting it inside the WindowsFormsHost.

There's still issues with it, it's maybe 5-10% better than the WPF, but I still get momentary jerks where it stutters and then the blotchy artefacts.

Execuse my ignorance are those two separate entries in the string array?

i.e.

VlcControl.VlcMediaplayerOptions = new[] { "--fps-fps", "20" };

@jeremyVignelles
Copy link
Collaborator

jeremyVignelles commented Apr 4, 2020

where it stutters and then the blotchy artefacts.

Maybe the hardware acceleration didn't work on those computers, or maybe even hardware acceleration isn't enough. Are the performance the same with VLC itself?

Execuse my ignorance are those two separate entries in the string array?
VlcControl.VlcMediaplayerOptions = new[] { "--fps-fps", "20" };

Yes, you could probably set them with = into a single argument, but I don't remember which syntax to use and which is better than the other. Try both if that doesn't help.

@winstonpang
Copy link
Author

Maybe the hardware acceleration didn't work on those computers, or maybe even hardware acceleration isn't enough. Are the performance the same with VLC itself?

VLC Itself handles it pretty well, not sure how they're able to do it.

Yes, you could probably set them with = into a single argument, but I don't remember which syntax to use and which is better than the other. Try both if that doesn't help.

Is there anyway I can verify what the actual FPS is, to know if this option is actually applied?

@jeremyVignelles
Copy link
Collaborator

you can probably check the logs in -vv mode. the filter will probably be shown there.

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

No branches or pull requests

2 participants