A modern web-based tool for converting Advanced SubStation Alpha (ASS) subtitle files to SubRip (SRT) format with multiple conversion modes and advanced options.
-
Multiple Conversion Modes:
- Normal: Standard strip with basic HTML tag removal
- Keep TS: Preserve all override tags for advanced formatting control
- Resample: Scale coordinate metrics for different video resolutions
-
Advanced Options:
- Customizable timing offset and scaling
- Frame gap detection and handling
- Support for
\\an(alignment) tag injection - Various timing adjustment modes
-
User-Friendly Interface:
- Drag-and-drop file upload
- Real-time preview of converted output
- Download converted files directly
- Responsive design with modern UI components
-
High-Quality Standards:
- Comprehensive test coverage for all converters
- Parse and validate ASS format files following libass conventions
- Support for complex ASS features (styles, effects, positioning)
- Bun 1.0+ (recommended) or Node.js 18+
- Package manager: Bun (built-in), npm, yarn, or pnpm
- Clone the repository:
git clone https://github.com/yuramedia/convert
cd convert- Install dependencies:
bun install
# or alternatively:
npm install
yarn install
pnpm installRun the development server:
bun run dev
# or alternatively:
npm run dev
yarn dev
pnpm devOpen http://localhost:4321 in your browser to use the converter.
Build the project for production (generates static files):
bun run build
# or: npm run buildPreview the production build locally:
bun start
# or: npm start- Upload a File: Drag and drop an ASS subtitle file onto the upload area or click to select
- Choose Conversion Mode: Select from Normal, Keep TS, or Resample modes
- Configure Options: Adjust timing, scaling, or other conversion parameters as needed
- Preview & Download: Review the output preview and download the converted SRT file
Removes inline styling tags and converts to standard SRT format. Best for simple subtitle files that don't require complex formatting preservation.
Preserves all ASS override tags (like \c, \b, \i, etc.) in the output. Useful when you need to maintain styling information in the converted file.
Scales subtitle positioning and coordinates based on video resolution changes. Use this when converting subtitles from one video resolution to another.
src/
├── pages/ # Astro routing directory
│ ├── index.astro # Main converter page
│ ├── about.astro # About page
│ └── 404.astro # 404 page
├── layouts/ # Astro layouts
│ └── BaseLayout.astro # Shared base layout
├── styles/ # CSS styles
│ └── globals.css # Global stylesheet with Tailwind v4
├── components/ # React components (rendered as Astro Islands)
│ ├── home-page.tsx # Interactive home page component
│ ├── about-page.tsx # Interactive about page component
│ ├── file-dropzone.tsx # File upload component
│ ├── mode-selector.tsx # Conversion mode selector
│ ├── options-panel.tsx # Options configuration
│ ├── output-preview.tsx # Output display
│ └── ui/ # UI component library (shadcn/ui based)
├── lib/ # Core conversion logic
│ ├── ass-parser.ts # ASS file parser
│ ├── ass-writer.ts # ASS file writer
│ ├── srt-writer.ts # SRT file writer
│ ├── converters/ # Conversion implementations
│ │ ├── normal-srt.ts
│ │ ├── keep-ts.ts
│ │ └── resample-ts.ts
│ └── *.test.ts # Test files
bun run dev- Start development serverbun run build- Build for productionbun start- Start production serverbun run lint- Run linting checksbun run format- Format codebun test- Run test suite
- Astro 7 - Modern web framework with static generation and partial hydration
- React 19 - UI library for interactive components (Islands)
- TypeScript - Type-safe JavaScript
- Tailwind CSS v4 - Utility-first CSS framework
- shadcn/ui - High-quality UI component library
- Vitest - Unit testing framework
- Bun - Fast JavaScript runtime and package manager
Run the test suite:
bun test
# or: npm testThe project includes comprehensive tests for:
- ASS parser and writer
- SRT writer
- All conversion modes
- Tag handling and transformations
Contributions are welcome! Please feel free to submit issues and pull requests to help improve the converter.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Astro
- UI components from shadcn/ui
- Icons from Lucide React
- Follows libass ASS format conventions