/cap2srt

A simple, lightweight command-line utility to convert SubViewer (SBV) caption files to SubRip (SRT) format

Primary LanguageC#

Cap2Srt - SBV to SRT Caption Converter

Publish Docker image

A simple, lightweight command-line utility to convert SubViewer (SBV) caption files to SubRip (SRT) format. The SubViewer format is used by YouTube, SubRip it what most social medias will use when captioning a video.

Features

  • Converts SBV captions to SRT format
  • Simple command-line interface
  • Lightweight and fast
  • Cross-platform (.NET 9)
  • Dockerized for easy deployment

Usage

Direct .NET Usage

# Basic usage (output will be named the same as input but with .srt extension)
dotnet Cap2Srt.dll --input video_captions.sbv

# Specify output file
dotnet Cap2Srt.dll --input video_captions.sbv --output my_captions.srt

# Using aliases
dotnet Cap2Srt.dll -i video_captions.sbv -o my_captions.srt

Docker Usage

docker run --rm -v $(pwd):/data fboucher/cap2srt --input /data/video_captions.sbv --output /data/my_captions.srt

SBV vs SRT Format

SBV Format (Input)

0:00:00.000,0:00:05.000
This is the first subtitle

0:00:05.500,0:00:10.000
This is the second subtitle
that spans multiple lines

SRT Format (Output)

1
00:00:00,000 --> 00:00:05,000
This is the first subtitle

2
00:00:05,500 --> 00:00:10,000
This is the second subtitle
that spans multiple lines

License

MIT