Skip to content

markie-dev/nightcore.me

Repository files navigation

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.

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 thumbnail
  2. 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 API
  3. Playback

    • Tone.js Player creates an audio source from the AudioBuffer
    • Real-time playback rate adjustment using Tone.js
  4. 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+
    • Bun
  2. Clone the repository

git clone https://github.com/markie-dev/nightcore.me.git
cd nightcore.me
  1. Install dependencies
bun i
  1. Set environment variables - Create a .env.local file in the root of the project with the following variables:
YOUTUBE_COOKIE=<your-youtube-cookie>
YOUTUBE_POT=<your-potoken>

Warning

You can get your YoutTube cookies by following the guide here.

Warning

You can get your PO Token by following the guide here.

  1. Run the development server
bun run dev

Credits