We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compose a Python script that converts a Sonic Scenarist Closed Captions file (.scc) to an Advanced SubStation Alpha file (.ass)
The text was updated successfully, but these errors were encountered:
Sure! Here's a simple Python script that can convert a Sonic Scenarist Closed Captions file (.scc) to an Advanced SubStation Alpha file (.ass):
def convert_scc_to_ass(scc_file, ass_file): with open(scc_file, 'r') as scc: lines = scc.readlines() ass_lines = [] for line in lines: if line.startswith('Scenarist_SCC V1.0'): continue # Skip header if line.startswith('00:'): time, caption = line.replace('\n', '').split(' ', 1) start_time, end_time = time.split(':')[-1], time.split(':')[-1] start_time = f'{start_time[:-2]}.{start_time[-2:]}' # Convert to ASS time format end_time = f'{end_time[:-2]}.{end_time[-2:]}' # Convert to ASS time format ass_lines.append(f'Dialogue: 0,{start_time},{end_time},Default,,0,0,0,,{caption}\n') with open(ass_file, 'w') as ass: ass.writelines(ass_lines) # Usage example convert_scc_to_ass('input.scc', 'output.ass')
Make sure you replace 'input.scc' and 'output.ass' with the actual paths to your input SCC file and the desired output ASS file, respectively.
'input.scc'
'output.ass'
You can run this script by saving it to a Python file (e.g., scc_to_ass_converter.py) and executing it using a Python interpreter:
scc_to_ass_converter.py
$ python scc_to_ass_converter.py
Hope this helps! Let me know if you have any further questions.
Sorry, something went wrong.
No branches or pull requests
Compose a Python script that converts a Sonic Scenarist Closed Captions file (.scc) to an Advanced SubStation Alpha file (.ass)
The text was updated successfully, but these errors were encountered: