An open API service indexing awesome lists of open source software.

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

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