Giter Site home page Giter Site logo

Comments (22)

jeremyVignelles avatar jeremyVignelles commented on June 18, 2024

Are you using a Sdk-style vbproj format or a legacy format?
I think that we only support SDK-style project files, or at least only the new PackageReference system (and not the packages.config file).
Can you send us a project reproducing the issue on a github repository?

from libvlc-nuget.

ShemJM avatar ShemJM commented on June 18, 2024

I haven't been able to replicate the exact same problem. I have made this very quickly but this does not exclude the files I have set in the project file.

I am very sure that I am doing this wrong. I created the app, used Nuget package manager to get libvlc and dotnet.vlc.forms then I added the lines into the project file and built the solution. It just ignores my lines and adds everything to the debug folder.

I guess I am using legacy style if I have a packages config file.

I really only need the files for streaming a rtsp feed, so no sound, gui or anything else.

https://github.com/ShemJM/WindowsApp1/tree/master/WindowsApp1

from libvlc-nuget.

jeremyVignelles avatar jeremyVignelles commented on June 18, 2024

Your PropertyGroup and ItemGroup sections must be directly under the <Project> tag, not under the <Target>.

Yes, you are using the legacy project format, but maybe that will work anyway. Just keep in mind that VisualStudio does what it wants in that files.
I guess that it's what happened, it replaced the target content with what it read from the packages.

from libvlc-nuget.

ShemJM avatar ShemJM commented on June 18, 2024

I have migrated to a package reference style. It seems to be working better because the exclude/include lines are not being removed. The problem is that when I load my project the files mentioned in those lines whether they are excluded or included are being placed in to my solution explorer.

<ItemGroup>
    <VlcWindowsX86IncludeFiles Include="libvlc.dll;libvlccore.dll" />
  </ItemGroup>

image

UPDATE:

Just after writing this message, I reloaded the project and the lines were gone. It seems if I delete the files from the solution explorer, the lines are removed from the project file.

from libvlc-nuget.

jeremyVignelles avatar jeremyVignelles commented on June 18, 2024

If you remove them from Visual studio, of course it does remove the lines in your project file.

However, those file should not appear in your solution explorer and I'm still wondering why they do...

EDIT: Please update your github repo so that we can try locally.

from libvlc-nuget.

ShemJM avatar ShemJM commented on June 18, 2024

I have made this repo where the same issue is occurring.

https://github.com/ShemJM/WindowsApp1

It is just an example project because the project I am working on where I had the original issue is not public. I am not sure how helpful the repo will be. Perhaps it would be easier to follow my steps and see if you experience the same issue.

  1. Create new visual basic winforms application
  2. Use nuget package manager to download vlc.dotnet.forms and VideoLAN.LibVLC.Windows.
  3. Unload the project.
  4. Add the exclude lines to the vbproj file. Save.
  5. Reload project. Files are now in the solution explorer.

I should add that my app is working I can use the vlc control to play videos. I just want to cherry pick the files so I can get the install size down.

from libvlc-nuget.

jeremyVignelles avatar jeremyVignelles commented on June 18, 2024

It seems that because you are not using the SDK-style projects, VS displays the items this way.

Can you try wrapping your ItemGroup in a

<Target Name="LibVlcWindowsCherryPick" BeforeTargets="CollectVlcFilesToCopyWindows">
</Target>

That should work.
(note: you can pick whatever Name you want, but don't touch the BeforeTargets, it's defined here

<Target Name="CollectVlcFilesToCopyWindows" BeforeTargets="BeforeBuild">
)

from libvlc-nuget.

ShemJM avatar ShemJM commented on June 18, 2024

Yes, that works, thank you.

  <Target Name="LibVlcWindowsCherryPick" BeforeTargets="CollectVlcFilesToCopyWindows">
    <ItemGroup>
      <VlcWindowsX86ExcludeFiles Include="hrtfs\%2A%2A;
                                 lua\%2A%2A;
                                 locale\%2A%2A;
                                 plugins\audio_filter\%2A;
                                 plugins\audio_mixer\%2A;
                                 plugins\audio_output\%2A;
                                 plugins\access_output\%2A;
                                 plugins\control\%2A;
                                 plugins\d3d9\%2A;
                                 plugins\d3d11\%2A;
                                 plugins\demux\%2A;
                                 plugins\gui\%2A;
                                 plugins\keystore\%2A;
                                 plugins\logger\%2A;
                                 plugins\lua\%2A;
                                 plugins\meta_engine\%2A;
                                 plugins\mux\%2A;
                                 plugins\text_renderer\%2A;
                                 plugins\visualization\%2A;
                                 plugins\video_chroma\%2A;
                                 " />
    </ItemGroup>
  </Target>

from libvlc-nuget.

mfkl avatar mfkl commented on June 18, 2024

Feel free to close this if you got your question answered ;-)

from libvlc-nuget.

jeremyVignelles avatar jeremyVignelles commented on June 18, 2024

plugins\d3d11%2A;

I wouldn't recommend you to disable those, you won't get any hw acceleration if you do

plugins\demux%2A;

Did you test that one? I'm not sure that would work without any demuxer.

plugins\access_output%2A;

I had crashes if I didn't include at least mmdevice on windows... don't know if this has been fixed since then.

from libvlc-nuget.

ShemJM avatar ShemJM commented on June 18, 2024

I am only using this for a rtsp stream from our IP cameras. It seems to work fine without those files. I don't know much about the different options. I was just trying to use the bare minimum because by adding LibVLC my project size has gone from 12MB to 63MB. That is after cherry picking because at first it was 320MB.

from libvlc-nuget.

jeremyVignelles avatar jeremyVignelles commented on June 18, 2024

I think you can shrink it further by including only what you need. in codec, you could try with only libavcodec... you will also probably need only rtsp and rtp access.

from libvlc-nuget.

jeremyVignelles avatar jeremyVignelles commented on June 18, 2024

but I would keep d3d libs for hardware acceleration

from libvlc-nuget.

ShemJM avatar ShemJM commented on June 18, 2024

I was going to ask for advice on how to shrink it further, so thank you again. I will try without those.

from libvlc-nuget.

ShemJM avatar ShemJM commented on June 18, 2024

Sorry, one more question. I have managed to find the small amount of files I actually need. Is there a way for me to just write lines to include those rather than lines that exclude everything else?

from libvlc-nuget.

jeremyVignelles avatar jeremyVignelles commented on June 18, 2024

Yes, that was what I suggested : https://github.com/mfkl/libvlc-nuget/blob/master/cherry-picking.md#cherry-pick-the-files-you-need

from libvlc-nuget.

ShemJM avatar ShemJM commented on June 18, 2024

I did try an inclusive strategy but it just included every file. That is why I moved to exclusive.

from libvlc-nuget.

jeremyVignelles avatar jeremyVignelles commented on June 18, 2024

That shouldn't be, please share a sample

from libvlc-nuget.

ShemJM avatar ShemJM commented on June 18, 2024

Well I just copied from your example

  <Target Name="LibVlcWindowsCherryPick" BeforeTargets="CollectVlcFilesToCopyWindows">
    <ItemGroup>
      <VlcWindowsX86IncludeFiles Include="libvlc.dll" />
    </ItemGroup>
  </Target>

Something like that, but that would include every file still

from libvlc-nuget.

jeremyVignelles avatar jeremyVignelles commented on June 18, 2024

Use

  <Target Name="LibVlcWindowsCherryPick" BeforeTargets="CollectVlcFilesToCopyWindows">
    <ItemGroup>
      <VlcWindowsX86IncludeFiles Remove="@(VlcWindowsX86IncludeFiles)" />
      <VlcWindowsX86IncludeFiles Include="libvlc.dll" />
    </ItemGroup>
  </Target>

Since you are using a target, your "Include" adds an item to the list that has already populated here :

<VlcWindowsX86IncludeFiles Condition="'@(VlcWindowsX86IncludeFiles)'==''" Include="libvlc.dll;libvlccore.dll;hrtfs\%2A%2A;locale\%2A%2A;lua\%2A%2A;plugins\%2A%2A" />

You thus need to remove the default items.

from libvlc-nuget.

ShemJM avatar ShemJM commented on June 18, 2024

I see, that makes sense. I will try it out tomorrow when I am at work. Thanks again :D

from libvlc-nuget.

ShemJM avatar ShemJM commented on June 18, 2024

Works perfectly.

from libvlc-nuget.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.