Skip to content
/ Txt2Srt Public

Converting *.txt subtitle files into SRT format. Especially suited for Dune HD players ;)

Notifications You must be signed in to change notification settings

Nopik/Txt2Srt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Quick and dirty script to convert txt subtitle files into srt.

At the moment code is far from being beautifull. I guess it will clean up over time, once the code will evolve.

This converter was created for my personal use. This is what I care about most here. If it doesnt work for you, too bad.
If you want to add some features, feel free to do so. On the other hand, I will be adding features which will help me ;)

Syntax:

Conv.py example.txt >example.srt       #will use default 23.976 fps
Conv.py example.txt 25 >example.srt    #will output subtitles at 25 fps
Conv.py example.txt 25 24 >example.srt #will output subtitles at 25 fps, but read them from txt at 24 fps

Recognized formats examples:

1) {start frame}{end frame}:
{100}{200}Subtitle line

2) [tenth of second]:
[100][200]Subtitle line

This format will set output fps to 10 automatically.

3) time:
01:02:03:Subtitle line


TODO:

1) Make code better ;)
2) Write into srt instead of stdout
3) Create some gui
4) Autodetect fps from movie (ffprobe?)

About

Converting *.txt subtitle files into SRT format. Especially suited for Dune HD players ;)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages