mix2cue

Imagine this scenario: you hear a great 1 hour mix on jejtube and decide to download it because you are not a pleb who streams everything. But when you open it in your music player it appers as a single file - you can't neither tell when a song starts or ends nor who's the artist etc.

This script aims to solve this problem by generating an accompanying cue sheet from jejtube timecodes, that is if someone posts one. A cue sheet is basically a "table of contents" for audio files: it describes which songs start when. If you're lucky you can find timecodes posted either by the uploader or as a comment. If it is missing, but artist and title information are provided for every song, for an hour long mix it takes about 10 minutes to create the minimal required format:

Format: [Start time (mm:ss)] artist-name [dash] song-title
Example: 35:38 Darude - Sandstorm

Be aware that the dash is used to separate the artist name from the song name - if the track artist has dashes in their name the resulting entry will be wrong, you need to correct this manually. The script tries its best to match every retarded format users post around jejtube, but it can't handle all of them and will eventually choke on an input. Also note this is not a complete solution and it probably never will be, use mix2cue as a last resort for content that can't be found elsewhere.

Usage

  1. Paste the timecodes into the left textarea and submit it
  2. In the result pane replace the line starting with FILE with the filename of your mix
  3. Optionally fill out other metadata at the beginning of the cue sheet
  4. Copy the result to clipboard, paste it into a new file and save it with .cue extension
  5. Get the audio file from jejtube using youtube-dl
  6. Not every audio format supports CUE sheets; opus, the codec used by jejtube is one of the examples. Because of this we need to transcode the downloaded format that supports sheets [1]. You can go for MP3 or OGG, depending on your music player's capabilities [2]. Transcoding with ffmpeg is piss easy:
    • MP3: ffmpeg -i "input.webm" -vn -c:a libmp3lame -b:a 320K "output.mp3"
    • OGG: ffmpeg -i "input.webm" -vn -c:a libvorbis -qscale:a 8 "output.ogg"
  7. Open the cue sheet in your music player as if opening a regular music file. If everything went well multiple songs should appear in your playlist.

[1] Under normal circumstances lossy-to-lossy transcoders should be ritually burned alive. In our case this is an act of necessity, so it can be forgiven. Fortunately, youtube's opus bitrates are near-transparent so hopefully nobody but a few audiofools will notice the loss in quality.
[2] Prior to versions 1.8.0 Deadbeef used to stutter on OGG cue sheets


Paste your timecodes here



Result