https://github.com/markie-dev/nightcore.me
speed up any song!!
https://github.com/markie-dev/nightcore.me
music nextjs nightcore typescript
Last synced: about 2 months ago
JSON representation
speed up any song!!
- Host: GitHub
- URL: https://github.com/markie-dev/nightcore.me
- Owner: markie-dev
- Created: 2025-01-26T07:27:02.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-01-26T11:22:36.000Z (4 months ago)
- Last Synced: 2025-01-26T11:27:26.817Z (4 months ago)
- Topics: music, nextjs, nightcore, typescript
- Language: TypeScript
- Homepage: https://nightcore.me
- Size: 3.04 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nightcore.me
Web application that lets you nightcore/speed up any audio file or YouTube video. Audio processing happens directly in your browser - only YouTube metadata is fetched server-side.
[](https://nightcore.me)
## Features
- Real-time audio playback with adjustable speed
- Responsive UI with dark/light mode support
- Client-side audio processing for maximum privacy
- Export as WAV (lossless) or MP3
- Multiple playback speeds (0.75x to 2x)## How it works
1. **File Upload**
- User uploads an audio file or enters a YouTube link
- For YouTube links, metadata is fetched server-side to get title and thumbnail2. **Audio Processing**
- For direct uploads: File is read as ArrayBuffer
- For YouTube: Audio stream is fetched and converted to ArrayBuffer
- ArrayBuffer is decoded into AudioBuffer using Web Audio API3. **Playback**
- Tone.js Player creates an audio source from the AudioBuffer
- Real-time playback rate adjustment using Tone.js4. **Export Options**
- WAV: Direct conversion of AudioBuffer to WAV format
- MP3: Uses ffmpeg.audio.wasm for client-side MP3 encoding## Run your own instance
1. **Prerequisites**
- Node.js 18+
- Bun2. **Clone the repository**
```bash
git clone https://github.com/markie-dev/nightcore.me.git
cd nightcore.me
```3. **Install dependencies**
```bash
bun i
```4. **Set environment variables** - Create a `.env.local` file in the root of the project with the following variables:
```properties
YOUTUBE_COOKIE=
YOUTUBE_POT=
```
> [!WARNING]
> You can get your YoutTube cookies by following the guide [here](https://github.com/distubejs/ytdl-core/).> [!WARNING]
> You can get your PO Token by following the guide [here](https://github.com/yt-dlp/yt-dlp/wiki/PO-Token-Guide/).5. **Run the development server**
```bash
bun run dev
```## Credits
- [ffmpeg.audio.wasm](https://github.com/JorenSix/ffmpeg.audio.wasm) by JorenSix at IPEM, Ghent University
- [Tone.js](https://github.com/Tonejs/Tone.js) by Yotam Mann
- [@distube/ytdl-core](https://github.com/distubejs/ytdl-core) by distubejs