https://github.com/lenochxd/playsoundcs
play an MP3 file using LibVLCSharp in a C# console application
https://github.com/lenochxd/playsoundcs
playsound vlc vlcsharp
Last synced: 3 months ago
JSON representation
play an MP3 file using LibVLCSharp in a C# console application
- Host: GitHub
- URL: https://github.com/lenochxd/playsoundcs
- Owner: Lenochxd
- Created: 2024-11-16T16:24:53.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-11-16T16:32:04.000Z (7 months ago)
- Last Synced: 2025-03-10T00:27:02.217Z (3 months ago)
- Topics: playsound, vlc, vlcsharp
- Language: C#
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PlaySoundCS
This silly project demonstrates how to play an MP3 file using LibVLCSharp in a C# console application.
## Prerequisites
- [.NET Core SDK](https://dotnet.microsoft.com/en-us/download)
- [LibVLCSharp library](https://github.com/videolan/libvlcsharp?tab=readme-ov-file#installation)## Installation
1. Install the .NET Core SDK from the [official website](https://dotnet.microsoft.com/download).
2. Add the LibVLCSharp library to your project by running the following command:
```sh
dotnet add package LibVLCSharp
dotnet add package VideoLAN.LibVLC.Windows
```## Usage
1. Clone the repository or download the source code.
2. Navigate to the project directory.
3. Build the project:
```sh
dotnet build
```
4. Run the project with the path to an MP3 file and optionally an integer to specify the volume (0-100) as arguments. If the volume is not specified, it defaults to 50:
```sh
dotnet run -- "path/to/your/file.mp3" 50
```## License
Do whatever you want