LibVLCSharp issueshttps://code.videolan.org/videolan/LibVLCSharp/-/issues2020-06-29T07:59:57Zhttps://code.videolan.org/videolan/LibVLCSharp/-/issues/357Unreal engine integration2020-06-29T07:59:57ZMartin FinkelUnreal engine integration### Problem to solve
Integrate libvlcsharp with Unreal Engine.
### Intended users
Game devs, indie devs.
### Proposal
Investigate how to integrate best libvlcsharp with Unreal engine.
- https://github.com/nxrighthere/UnrealCLR soun...### Problem to solve
Integrate libvlcsharp with Unreal Engine.
### Intended users
Game devs, indie devs.
### Proposal
Investigate how to integrate best libvlcsharp with Unreal engine.
- https://github.com/nxrighthere/UnrealCLR sounds promising from a C# standpoint.
- https://github.com/ue4plugins/VlcMedia a proper unreal cpp plugin (but with output callbacks, unlike linked repo)
### Documentation
Copy/adapt docs from Unity.https://code.videolan.org/videolan/LibVLCSharp/-/issues/359Start using PtrToStringUTF8 wherever possible2020-06-30T09:35:47ZMartin FinkelStart using PtrToStringUTF8 wherever possible### Problem to solve
Refactor existing code to use https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.marshal.ptrtostringutf8 whenever targets permit
### Intended users
libvlcsharp devs.### Problem to solve
Refactor existing code to use https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.marshal.ptrtostringutf8 whenever targets permit
### Intended users
libvlcsharp devs.https://code.videolan.org/videolan/LibVLCSharp/-/issues/178Icon management2020-07-02T12:29:25ZMartin FinkelIcon management### Problem to solve
We need various icons for iOS and Android.
### Intended users
LibVLCSharp.Forms users.
### Proposal
See https://github.com/videolan/libvlcsharp/pull/52#discussion_r295027676
### Documentation
Document how to c...### Problem to solve
We need various icons for iOS and Android.
### Intended users
LibVLCSharp.Forms users.
### Proposal
See https://github.com/videolan/libvlcsharp/pull/52#discussion_r295027676
### Documentation
Document how to change icons.Xamarin.Forms MediaElement controlhttps://code.videolan.org/videolan/LibVLCSharp/-/issues/366Add FileInfo and StorageFile Media ctor API2020-08-13T11:58:08ZMartin FinkelAdd FileInfo and StorageFile Media ctor API### Problem to solve
Add additional helper method to create a Media.
### Intended users
Vlc.Dotnet migrating.
Any libvlcsharp user### Problem to solve
Add additional helper method to create a Media.
### Intended users
Vlc.Dotnet migrating.
Any libvlcsharp userhttps://code.videolan.org/videolan/LibVLCSharp/-/issues/365LibVLC loading refactoring for macOS2020-09-08T15:40:42ZMartin FinkelLibVLC loading refactoring for macOS### Problem to solve
To be able to use libvlc builds from official releases, we need to be able to load and P/Invoke dynamic libvlc macOS builds.
Currently, it's all statically linked together in a `libvlc.dylib` binary. The libvlc bui...### Problem to solve
To be able to use libvlc builds from official releases, we need to be able to load and P/Invoke dynamic libvlc macOS builds.
Currently, it's all statically linked together in a `libvlc.dylib` binary. The libvlc builds from vlc.dmg are organized similarly to the libvlc windows ones (plugins folder, lib folder, share folder).
### Intended users
macOS users.
### Proposal
There are a few challenges...
- We need to perform this refactoring while not breaking existing platforms (netcore and mono).
- We need to perform this refactoring while keeping the current platform versions number supported (i.e. any netcore version).
mono/cocoa support is fine, issue is with netcore.
Problems are two fold:
- To be able to re-use the current P/Invoke code, we need to keep the dllimport statements as they are currently. In theory, one could load manually the dylib, and all further dllimport calls would look at the currently loaded dynamic librairies before trying a new dlopen to perform the dlsym. That's the theory anyway https://github.com/libgit2/libgit2sharp/blob/7fc4be5193dbdd08538b4b150332b5a73770e0f6/LibGit2Sharp/Core/NativeMethods.cs#L40
However, that's not what I observe. And for the netstandard/netcore build, that means the dlopen call argument is different on mac and windows (`@rpath/libvlc`/`libvlc`) and it should not.
- Even when using the non standard `@rpath/libvlc` dlopen argument and setting the correct `VLC_PLUGIN_PATH`, `libvlc_new` returns null.
https://github.com/mfkl/libvlcsharp/commits/mac-libvlc-loading
https://github.com/mfkl/libvlc-nuget/blob/mac-loading-rework/build/VideoLAN.LibVLC.Mac.targets
### Documentation
Just the cherrypicking enabling whenever this works.https://code.videolan.org/videolan/LibVLCSharp/-/issues/396Samples: netcore on macOS should create a window2020-09-09T08:02:07ZMartin FinkelSamples: netcore on macOS should create a window### Problem to solve
Currently the netcore sample app on macOS is headless. This is fine, but would be better to have some video.
libvlc cannot create a window by itself on mac, like it does on Windows.
And a netcore app requires a bit ...### Problem to solve
Currently the netcore sample app on macOS is headless. This is fine, but would be better to have some video.
libvlc cannot create a window by itself on mac, like it does on Windows.
And a netcore app requires a bit more setup than a mono app to have a cocoa window https://docs.microsoft.com/en-us/xamarin/mac/app-fundamentals/console
### Intended users
Devs for testing
netcore app users on mac.
### Proposal
improve the current sample.
### Documentationhttps://code.videolan.org/videolan/LibVLCSharp/-/issues/215Transcoding with h264 Video Codec Fails2020-09-10T14:12:23ZTony WilkeyTranscoding with h264 Video Codec Fails### Summary
<!-- Summarize the bug encountered concisely -->
Transcoding video from an input to a file using the h264 codec fails with these error messages.
*****************
libVLC:[Error] avcodec:cannot find encoder H264 - MPEG-4 A...### Summary
<!-- Summarize the bug encountered concisely -->
Transcoding video from an input to a file using the h264 codec fails with these error messages.
*****************
libVLC:[Error] avcodec:cannot find encoder H264 - MPEG-4 AVC (part 10)
*** Your Libav/FFmpeg installation is crippled. ***
*** Please check with your Libav/FFmpeg packager. ***
*** This is NOT a VLC media player issue. ***
libVLC:[Debug] main:Buffering 13%
libVLC:[Debug] main:no encoder modules matched
libVLC:[Error] stream_out_transcode:cannot find video encoder (module:any fourcc:h264). Take a look few lines earlier to see possible reason.
*********************
<!-- How one can reproduce the issue - this is very important -->
Example repo of UWP project
https://github.com/groovykool/libVLC-Transcode.git
Press "Play".
View log box output errors
wait a few seconds press "Stop"
<!-- What actually happens -->
no transcoded output
### What is the expected *correct* behavior?
Transcoded video is saved in a file.
The transcoding options work in the VLC client.
### Relevant logs and/or screenshots
****************
libVLC:[Error] avcodec:cannot find encoder H264 - MPEG-4 AVC (part 10)
*** Your Libav/FFmpeg installation is crippled. ***
*** Please check with your Libav/FFmpeg packager. ***
*** This is NOT a VLC media player issue. ***
libVLC:[Debug] main:Buffering 13%
libVLC:[Debug] main:no encoder modules matched
libVLC:[Error] stream_out_transcode:cannot find video encoder (module:any fourcc:h264). Take a look few lines earlier to see possible reason.
*********************
### Environment
<!-- Please complete the following information. -->
- OS: Windows 10
- Version 1903
- Device: PC
- LibVLC version and architecture 3.0.4 Vetinari
- LibVLCSharp version Nuget 3.2.1
### Possible fixes
libVLC compile options?https://code.videolan.org/videolan/LibVLCSharp/-/issues/28Consider enabling SourceLink / add pdbs to the nuget package2020-09-10T14:14:02ZMartin FinkelConsider enabling SourceLink / add pdbs to the nuget packagehttps://github.com/dotnet/sourcelinkhttps://github.com/dotnet/sourcelinkMartin FinkelMartin Finkelhttps://code.videolan.org/videolan/LibVLCSharp/-/issues/129Add .NET Analyzers2020-09-22T16:11:48ZMartin FinkelAdd .NET AnalyzersShould be MIT even if it's a dev only dependency (not shipping to nuget). Feel free to suggest useful ones.
- Microsoft.DotNet.Analyzers.Compatibility (suggested by @jeremyVignelles)Should be MIT even if it's a dev only dependency (not shipping to nuget). Feel free to suggest useful ones.
- Microsoft.DotNet.Analyzers.Compatibility (suggested by @jeremyVignelles)https://code.videolan.org/videolan/LibVLCSharp/-/issues/375Support newer Uno versions2020-10-11T13:45:40ZMartin FinkelSupport newer Uno versions### Problem to solve
Updating LibVLCSharp.Uno to latest Uno releases fails the Android build.
### Intended users
LibVLCSharp.Uno Android users
### Proposal
```
LibVLCSharp\src\LibVLCSharp.Uno\VideoView.Android.cs(17,71,17,84): error...### Problem to solve
Updating LibVLCSharp.Uno to latest Uno releases fails the Android build.
### Intended users
LibVLCSharp.Uno Android users
### Proposal
```
LibVLCSharp\src\LibVLCSharp.Uno\VideoView.Android.cs(17,71,17,84): error CS0103: The name 'ContextHelper' does not exist in the current context
LibVLCSharp\src\LibVLCSharp.Uno\VideoView.Android.cs(18,29,18,48): error CS0029: Cannot implicitly convert type 'LibVLCSharp.Platforms.Android.VideoView' to 'Windows.UI.Xaml.UIElement'
LibVLCSharp\src\LibVLCSharp.Uno\obj\Debug\monoandroid81\g\XamlCodeGenerator\VideoView_Android_iOS_0654003b6e8285e8171ea5eceba6aa4a.g.cs(116,11,116,16): error CS0029: Cannot implicitly convert type 'Windows.UI.Xaml.Controls.Border' to 'Android.Views.View'
LibVLCSharp\src\LibVLCSharp.Uno\obj\Debug\monoandroid81\g\XamlCodeGenerator\MediaPlayerElement_44b984361be691e5a697b2e5e83c7ee0.g.cs(174,11,174,16): error CS0029: Cannot implicitly convert type 'Windows.UI.Xaml.Controls.Grid' to 'Android.Views.View'
LibVLCSharp\src\LibVLCSharp.Uno\obj\Debug\monoandroid81\g\XamlCodeGenerator\VideoView_Android_iOS_0654003b6e8285e8171ea5eceba6aa4a.g.cs(63,76,63,184): error CS0029: Cannot implicitly convert type 'Android.Views.View' to 'Windows.UI.Xaml.UIElement'
LibVLCSharp\src\LibVLCSharp.Uno\obj\Debug\monoandroid81\g\XamlCodeGenerator\VideoView_Android_iOS_0654003b6e8285e8171ea5eceba6aa4a.g.cs(63,76,63,184): error CS1662: Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type
LibVLCSharp\src\LibVLCSharp.Uno\obj\Debug\monoandroid81\g\XamlCodeGenerator\PlaybackControls_a640c024b4ec96fcd73a42d435df6be4.g.cs(68,76,68,174): error CS0029: Cannot implicitly convert type 'Android.Views.View' to 'Windows.UI.Xaml.UIElement'
LibVLCSharp\src\LibVLCSharp.Uno\obj\Debug\monoandroid81\g\XamlCodeGenerator\PlaybackControls_a640c024b4ec96fcd73a42d435df6be4.g.cs(68,76,68,174): error CS1662: Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type
LibVLCSharp\src\LibVLCSharp.Uno\obj\Debug\monoandroid81\g\XamlCodeGenerator\MediaPlayerElement_44b984361be691e5a697b2e5e83c7ee0.g.cs(63,76,63,178): error CS0029: Cannot implicitly convert type 'Android.Views.View' to 'Windows.UI.Xaml.UIElement'
LibVLCSharp\src\LibVLCSharp.Uno\obj\Debug\monoandroid81\g\XamlCodeGenerator\MediaPlayerElement_44b984361be691e5a697b2e5e83c7ee0.g.cs(63,76,63,178): error CS1662: Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type
LibVLCSharp\src\LibVLCSharp.Uno\obj\Debug\monoandroid81\g\XamlCodeGenerator\PlaybackControls_a640c024b4ec96fcd73a42d435df6be4.g.cs(2630,11,2630,16): error CS0029: Cannot implicitly convert type 'Windows.UI.Xaml.Controls.Grid' to 'Android.Views.View'
LibVLCSharp\src\LibVLCSharp.Uno\DisplayRequestAdapter.cs(16,30,16,50): error Uno0001: Windows.System.Display.DisplayRequest is not implemented in Uno
LibVLCSharp\src\LibVLCSharp.Uno\DisplayRequestAdapter.cs(26,13,26,41): error Uno0001: Windows.System.Display.DisplayRequest.RequestActive() is not implemented in Uno
LibVLCSharp\src\LibVLCSharp.Uno\DisplayRequestAdapter.cs(34,13,34,42): error Uno0001: Windows.System.Display.DisplayRequest.RequestRelease() is not implemented in Uno
2>Done building project "LibVLCSharp.Uno.csproj" -- FAILED.
```
repro https://code.videolan.org/mfkl/LibVLCSharp/-/commit/fe77824fadfadcd1cbb31848d9e66fbbe2767c61
### Documentation
<!-- What kind of documentation is needed for this feature? -->https://code.videolan.org/videolan/LibVLCSharp/-/issues/363LibVLCSharp macOS ARM support2020-10-13T15:37:20ZMartin FinkelLibVLCSharp macOS ARM supporthttps://github.com/mono/mono/pull/20014
https://github.com/dotnet/runtime/pull/38302https://github.com/mono/mono/pull/20014
https://github.com/dotnet/runtime/pull/38302https://code.videolan.org/videolan/LibVLCSharp/-/issues/252[UWP] Memory leakage2020-11-02T23:22:25Zrudoc[UWP] Memory leakage### Summary
Disposing of LibVLC components is not complete
### Minimal project and steps to reproduce
[Minimal project](https://github.com/rudoc/LibVLCSharp.UWP.Sample.git)
Example is based on UWP sample provided. I've copied MainPage ...### Summary
Disposing of LibVLC components is not complete
### Minimal project and steps to reproduce
[Minimal project](https://github.com/rudoc/LibVLCSharp.UWP.Sample.git)
Example is based on UWP sample provided. I've copied MainPage and made cross links between two.
Pages to be navigated by clicking hyperlinks to each other in the center of app window.
Every iteration of video appearing will eat some memory.
### What is the current *bug* behavior?
increasing memory consumption by application at each videoview initialization.
### What is the expected *correct* behavior?
about constant memory allocation for an app
### Environment
OS: Windows 10 x64
Version 1809
Device: DELL XPS 15 9560
VideoLAN.LibVLC.UWP 3.2.0
LibVLCSharp version 3.3.1https://code.videolan.org/videolan/LibVLCSharp/-/issues/369When chromecasting from UWP transcoded video has poor quality2020-11-24T07:13:12ZAleksey VlasenkoWhen chromecasting from UWP transcoded video has poor quality<!---
Please read this!
Before opening a new issue, make sure to search for keywords in the issues
filtered by "bug" label and verify the issue you're about to submit isn't a duplicate.
If this is a question please ask on StackOverflow...<!---
Please read this!
Before opening a new issue, make sure to search for keywords in the issues
filtered by "bug" label and verify the issue you're about to submit isn't a duplicate.
If this is a question please ask on StackOverflow: https://stackoverflow.com/questions/tagged/libvlcsharp.
--->
### Summary
<!-- Summarize the bug encountered concisely -->
Whenever I'm trying to cast video that requires transcoding from UWP, video has bad quality on TV.
I tried setting '--sout-chromecast-conversion-quality=', but as far as I can tell it doesn't have any effect on quality.
### Minimal project and steps to reproduce
https://github.com/vlasenkoalexey/LibVLCSharp.UWP.Sample_chromecast
### Does it work on other plaforms? Does it work with the official VLC apps?
<!-- Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise. -->
Observe same issue on VLC from Windows Store.
### Environment
<!-- Please complete the following information. -->
- OS: Windows
- Version 10
- Device: Laptop x86
- LibVLC version and architecture VideoLAN.LibVLC.UWP/3.3.0
- LibVLCSharp version 3.4.6https://code.videolan.org/videolan/LibVLCSharp/-/issues/360VLC plugin framework for dotnet2020-12-24T06:30:37ZMartin FinkelVLC plugin framework for dotnet### Problem to solve
Some dotnet users would like lower access to the VLC core.
### Intended users
dotnet libvlcsharp users who want advanced customization.
### Proposal
With dotnet 5's official support for [native exports](https://...### Problem to solve
Some dotnet users would like lower access to the VLC core.
### Intended users
dotnet libvlcsharp users who want advanced customization.
### Proposal
With dotnet 5's official support for [native exports](https://github.com/AaronRobinsonMSFT/DNNE), it would be possible in theory to build a VLC plugin in dotnet, that can be loaded and called from the VLC Core. Once that's done, we could provide a framework/bootstrapper nuget that'd allow users to write their own VLC plugin _easily_.
- https://wiki.videolan.org/Hacker_Guide/How_To_Write_a_Module/
- https://wiki.videolan.org/OutOfTreeCompile/
### Documentation
Lots I guess.https://code.videolan.org/videolan/LibVLCSharp/-/issues/427MediaPlayerElement for WPF2021-01-11T08:12:38ZMartin FinkelMediaPlayerElement for WPFhttps://code.videolan.org/videolan/LibVLCSharp/-/issues/182MediaPlayerElement for macOS Cocoa2021-01-11T08:50:33ZMartin FinkelMediaPlayerElement for macOS CocoaInspiration can be drawn from the vlc macOS app for the layout, the code likely cannot be re-used though https://code.videolan.org/videolan/vlc/-/tree/master/modules/gui/macosx
The existing mediaplayer element and playback controls shou...Inspiration can be drawn from the vlc macOS app for the layout, the code likely cannot be re-used though https://code.videolan.org/videolan/vlc/-/tree/master/modules/gui/macosx
The existing mediaplayer element and playback controls should give a good idea of what is needed https://code.videolan.org/videolan/LibVLCSharp/-/tree/3.x/src/LibVLCSharp.Forms/SharedXamarin.Forms MediaElement controlhttps://code.videolan.org/videolan/LibVLCSharp/-/issues/183MediaPlayerElement for GTK2021-01-11T08:50:55ZMartin FinkelMediaPlayerElement for GTKThe existing mediaplayer element and playback controls should give a good idea of what is needed https://code.videolan.org/videolan/LibVLCSharp/-/tree/3.x/src/LibVLCSharp.Forms/SharedThe existing mediaplayer element and playback controls should give a good idea of what is needed https://code.videolan.org/videolan/LibVLCSharp/-/tree/3.x/src/LibVLCSharp.Forms/SharedXamarin.Forms MediaElement controlhttps://code.videolan.org/videolan/LibVLCSharp/-/issues/425MediaPlayerElement for Android2021-01-11T08:51:07ZMartin FinkelMediaPlayerElement for AndroidInspiration can be drawn from the vlc-android app for the layout, the code cannot be re-used though as it is done in kotlin and using libvlcjni.
The existing mediaplayer element and playback controls should give a good idea of what is n...Inspiration can be drawn from the vlc-android app for the layout, the code cannot be re-used though as it is done in kotlin and using libvlcjni.
The existing mediaplayer element and playback controls should give a good idea of what is needed https://code.videolan.org/videolan/LibVLCSharp/-/tree/3.x/src/LibVLCSharp.Forms/Sharedhttps://code.videolan.org/videolan/LibVLCSharp/-/issues/426MediaPlayerElement for iOS/tvOS2021-01-11T08:52:24ZMartin FinkelMediaPlayerElement for iOS/tvOSThe existing mediaplayer element and playback controls should be give a good idea of what is needed https://code.videolan.org/videolan/LibVLCSharp/-/tree/3.x/src/LibVLCSharp.Forms/Shared
It runs on iOS through Xamarin.FormsThe existing mediaplayer element and playback controls should be give a good idea of what is needed https://code.videolan.org/videolan/LibVLCSharp/-/tree/3.x/src/LibVLCSharp.Forms/Shared
It runs on iOS through Xamarin.Formshttps://code.videolan.org/videolan/LibVLCSharp/-/issues/443StreamMediaInput optimizations2021-03-25T09:19:49ZMartin FinkelStreamMediaInput optimizations### Problem to solve
Improve StreamMediaInput performance.
### Intended users
People who need more perf when proving their own input stream to libvlcsharp.
### Proposal
- Add benchmarks like https://github.com/SixLabors/ImageSharp/b...### Problem to solve
Improve StreamMediaInput performance.
### Intended users
People who need more perf when proving their own input stream to libvlcsharp.
### Proposal
- Add benchmarks like https://github.com/SixLabors/ImageSharp/blob/master/tests/ImageSharp.Benchmarks/General/IO/BufferedStreams.cs
- Add `[MethodImpl(MethodImplOptions.AggressiveInlining)]` in a few places, like done in https://github.com/SixLabors/ImageSharp/blob/master/src/ImageSharp/IO/BufferedReadStream.cs.
- See perf numbers after that change.
### Documentation