Skip to content

My personal YT Timestamps to cue file converter used to manage my personal local music collection

License

Notifications You must be signed in to change notification settings

FOSS-Syndicate/YT2CUE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

YT2CUE

My personal YT Timestamps to cue file converter used to manage my personal local music collection

Features

  • Flexible Timestamp Parsing: Supports multiple timestamp formats including MM:SS, HH:MM:SS, with or without brackets/parentheses
  • Interactive Metadata Collection: Prompts for album name, artist, genre, year, and audio file details
  • Track Preview and Confirmation: Review parsed tracks before generating the final CUE file
  • Standards Compliant: Generates CUE sheets conforming to the CDRWIN CUE sheet specification
  • UTF-8 Support: Handles international characters in track titles and metadata
  • Robust Error Handling: Graceful handling of malformed input with helpful error messages

Requirements

  • Python 3.6 or higher
  • No external dependencies (uses only Python standard library)

Installation

  1. Clone or download this repository
  2. Ensure Python 3.6+ is installed on your system
  3. Make the script executable (Unix/Linux/macOS):
    chmod +x youtube_to_cue.py

Usage

Basic Usage

python3 youtube_to_cue.py

Workflow

  1. Prepare Timestamps File: Create a text file containing timestamps and track titles
  2. Run the Script: Execute the script and provide the path to your timestamps file
  3. Review Tracks: Confirm that the parsed tracks are correct
  4. Enter Metadata: Provide album information (artist, album name, genre, etc.)
  5. Generate CUE File: The script creates a .cue file ready for use

Supported Timestamp Formats

The converter recognizes various timestamp formats commonly used in YouTube descriptions:

0:00 Track Title
00:00 Track Title
0:00:00 Track Title
[0:00] Track Title
(0:00) Track Title
1. 0:00 Track Title
Track Title [0:00]
Track Title (0:00)

Example Input File

Create a text file (e.g., timestamps.txt) with your track listing:

0:00 Intro
3:45 First Track - Artist Name
7:23 Second Track (Extended Mix)
12:00 Third Track
[15:30] Fourth Track
18:45 Final Track

Example Session

==============================================================
YOUTUBE TIMESTAMPS TO CUE FILE CONVERTER
==============================================================

Enter path to timestamps file: timestamps.txt

✓ Successfully parsed 6 tracks from file

PARSED TRACKS:
==============================================================
 1. [00:00:00] Intro
 2. [03:45:00] First Track - Artist Name
 3. [07:23:00] Second Track (Extended Mix)
 4. [12:00:00] Third Track
 5. [15:30:00] Fourth Track
 6. [18:45:00] Final Track
==============================================================

Do these tracks look correct? (y/n): y

==============================================================
CUE FILE METADATA
==============================================================
Enter Artist/Performer name: Various Artists
Enter Album/Mix name: Summer Mix 2024
Enter audio filename (e.g., audio.mp3): summer_mix.mp3
Enter year (optional, press Enter to skip): 2024
Enter genre (optional, press Enter to skip): Electronic

==============================================================

Enter output filename (default: output.cue): summer_mix.cue

Generating CUE file: summer_mix.cue
✓ CUE file successfully created: summer_mix.cue

Example Output

The generated CUE file will look like:

REM GENRE "Electronic"
REM DATE 2024
REM COMMENT "Generated by YouTube to CUE Converter"
PERFORMER "Various Artists"
TITLE "Summer Mix 2024"
FILE "summer_mix.mp3" WAVE
  TRACK 01 AUDIO
    TITLE "Intro"
    PERFORMER "Various Artists"
    INDEX 01 00:00:00
  TRACK 02 AUDIO
    TITLE "First Track - Artist Name"
    PERFORMER "Various Artists"
    INDEX 01 03:45:00
  TRACK 03 AUDIO
    TITLE "Second Track (Extended Mix)"
    PERFORMER "Various Artists"
    INDEX 01 07:23:00

CUE File Format

The generated CUE sheets follow the standard CDRWIN CUE sheet format:

  • REM GENRE: Music genre (optional)
  • REM DATE: Release year (optional)
  • REM COMMENT: Generation note
  • PERFORMER: Album artist
  • TITLE: Album title
  • FILE: Referenced audio file
  • TRACK: Individual track entries with title, performer, and index point

Use Cases

  • Creating CUE sheets for DJ mixes and podcasts
  • Splitting long audio files into individual tracks
  • Organizing music collections with proper metadata
  • Preparing audio for CD burning with track markers
  • Converting YouTube timestamp descriptions into playable formats

Error Handling

The script handles common errors gracefully:

  • File Not Found: Prompts to retry with a valid file path
  • Invalid Timestamps: Warns about malformed lines and skips them
  • No Valid Tracks: Alerts if no timestamps were successfully parsed
  • Keyboard Interrupt: Clean exit on Ctrl+C

Limitations

  • Frames are always set to 00 as YouTube timestamps don't include sub-second precision
  • All tracks are assigned the same performer (album artist) by default
  • The FILE directive always uses WAVE format regardless of actual audio file type

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.

License

This project is released under the MIT License. See LICENSE file for details.

Author

Created for seamless conversion of YouTube timestamps to standard CUE sheet format.

Changelog

Version 1.0.0

  • Initial release
  • Support for multiple timestamp formats
  • Interactive metadata collection
  • Standards-compliant CUE sheet generation
  • UTF-8 encoding support

Support

For issues, questions, or suggestions, please open an issue on the project repository.

About

My personal YT Timestamps to cue file converter used to manage my personal local music collection

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages