Aerial
Aerial copied to clipboard
Proposal: Replace Windows Media Player with 3rd party lib
Looking at 4k support:
- nearly half the open issues here are about playback issues
- WMP is not included in recent Windows 10 builds (#150)
- You already must install a 3rd party codec pack to get 4k videos working
So my proposal is we look at using a VLC library or FFMpeg interop for playback.
This would also mean either bundling the extra libraries (eg, via ILBundle) to maintain a single .exe/.scr distributable, or building a simple installer -- not really a big deal other way.
Added in https://github.com/gregmac/Aerial/tree/feature/181-vlc-player
- Uses https://github.com/ZeBobo5/Vlc.DotNet (3.0.0-pre) and https://github.com/mfkl/libvlc-nuget
- Plays 4k natively
Still TODO:
- Overhaul caching.
- VLC has the option to playback+save video at the same time. Current solution downloads uncached videos twice (once for playback, once to cache) doubling the bandwidth used.
- Figure out bundling / installer / whatever because of extra .dll's
- Figure out why
player_PlayStateChange
callsNativeMethods.EnableMonitorSleep();
(https://github.com/cDima/Aerial/blame/master/ScreenSaver/ScreenSaverForm.cs#L374) -- seems like this should just be Form.Load event?
Another benefit is this enables YouTube playback (currently testing with https://github.com/ZeBobo5/Vlc.DotNet/issues/345#issuecomment-394444281 -- though this uses an LGPL library so I'll probably look for a better way).
Whoa @gregmac this rules! Any plans to keep working on this? What would stop it from being stable enough to use/how can any of us help?
Great stuff. The bundling of the DLLs into one .src/exe is already being done by the /installer powershell script if memory serves.
I'm free to change the LGPL licenses if the other dependencies allow this.
And youtube playback is a huge win, we can maybe demo this via git-hub-linked playlists or user-entered ones from some text file.
:clap:
@cDima Looking at this again I'm not sure why I was concerned on that (at least if you're not). It's fine to use LGPL library from within an MIT-licensed project (https://opensource.stackexchange.com/questions/5175/including-untouched-lgpl-library-in-a-mit-licenced-project).
I think the bigger part with finishing this is that I was headed down the path of completely rewriting AerialEntities.cs and Caching.cs, and then overhauling the video list picking part of the UI. I didn't want to do something like that without other input that that's an acceptable change.
From what I recall, I was looking at:
- Building a class responsible for returning video results, plus caching. It would choose from existing on-disk cached video, or pass a URL+cache location to VLC, and possible do a pre-caching background thing (eg: stream something on-disk while downloading the next one to cache).
- Build an interface and a couple classes for parsing video playlist sources
- a class for new apple format
- a class for old apple format
- a class for youtube playlists
- In the config UI, combine the video playlist source UI chooser and video chooser to a single tree interface or something
- Actually, TBH, it would be much easier to remove the individual video picking feature (for now) as it really complicates things
- At the least, some way to "Add/Remove" multiple playlists, or have checkboxes beside some predefined ones (eg, the apple ones, if that is ok)
I think the overall diff with all this would be massive though. I don't want to do the work if the PR would just be rejected as too much change. :)
@cDima if you want I can push the VLC branch here, and then maybe make another one to do the caching changes?
Hello from Vlc.DotNet/LibVLCSharp, I just came across this issue due to the link in an issue inVlc.DotNet. Since this is a new feature in your app, I'd recommend you have a look at LibVLCSharp, the VideoLAN-supported library that will likely replace Vlc.DotNet in the future. Feel free to contact us on gitter if you need help 🙂