GithubHelp home page GithubHelp logo

stl-to-srt-conversion's Introduction

STL-to-SRT-conversion

Converts an .stl closed captioning file to .srt format

This hasn't been robustly tested, let me know if there are any errors!

How to use:

If you already have Python installed:

  • Open a terminal window, navigate to where STLconvert.py is located, and type python STLconvert.py
  • Enter the filepath of your .stl file. For example, if it's named 'myClosedCaptioningFile.stl', and if it is located in the same folder as STLconvert.py, you can just type myClosedCaptioningFile.stl
  • STLconvert will output your file in the same folder that contains it.

If you are on Windows and do not want to install Python:

  • Go into windows_exe>dist and open STLconvert.exe
  • Enter the filepath to your .stl file. For example, if it is located in the same folder that STLconvert.exe is located, you can just type myClosedCaptioningFile.stl. If you like to keep everything somewhere specific, you can type: C:\<THE_PATH_TO_YOUR_FILE>\myClosedCaptioningFile.stl
  • STLconvert.exe will output your new .srt file in the same folder that your old .stl file is living in, and will name it <NAME_OF_YOUR_OLD_STL_FILE>_converted.srt

Troubleshooting:

  • Make sure to include the file extension when inputting the file path.
  • If you run into any problems be sure to add them onto the issues tab so we can list them here, and solve it! Of particular concern is the validity of the translation between .stl and .srt files since I have not accounted for formatting or anything beyond basic timecode and dialogue markup. This script also assumes that your .stl file is not compressed in any way (i.e. whitespace and line breaks matter).

stl-to-srt-conversion's People

Contributors

dvdmrn avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

dvergotti gerkx

stl-to-srt-conversion's Issues

Error when attempting to convert .stl at 24fps

Hi,

Hoping this is still maintained, I found this on reddit but the post was pretty old.

I'm getting this error when trying to convert an .stl to .srt. The sequence is 24fps. I've tried 23.98, 23,976, 24, 24.00, 25, 25.00, 24fps (including fps gives an error which makes sense)

enter file path: /Users/justin.fisher/Desktop/SRT_Testing/TLD_SRT_TEST2.stl
enter framerate: 24

========================================
opening: /Users/justin.fisher/Desktop/SRT_Testing/TLD_SRT_TEST2.stl

Traceback (most recent call last):
  File "/Users/justin.fisher/Applications/STL-to-SRT-conversion-master copy/STLconvert.py", line 82, in <module>
    main()
  File "/Users/justin.fisher/Applications/STL-to-SRT-conversion-master copy/STLconvert.py", line 79, in main
    parsefile(filename,fps)
  File "/Users/justin.fisher/Applications/STL-to-SRT-conversion-master copy/STLconvert.py", line 46, in parsefile
    TCin = formatTC(TCin,fps)
  File "/Users/justin.fisher/Applications/STL-to-SRT-conversion-master copy/STLconvert.py", line 26, in formatTC
    if(float(frames)>=float(fps)):
ValueError: could not convert string to float: e

I can successfully convert the test file in the repo, as well as a different test file an assistant editor made, but I'm getting an error on this one.

EDIT

I don't think this has anything to do with the specific frame rate, I think it's either a python2/3 issue or it's related to the .stl file from Avid

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.