Git Product home page Git Product logo

subsimport's People

Contributors

doakey3 avatar epicalert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

subsimport's Issues

Multi-line import

Adding +Chr(10) to the text entry string will force a line break(will produce a empty box, like an unknown character), so that can inserted when importing multiline srt files.

overlapping clips

When I import the .srt file that I'm creating with pytranscriber, it get overlapping text clips. When I select the whole channel and move down the timeline, all overlapping clips snap to other available channels. I'm not getting an error, but I remember reading your instructions. My source SRT files don't show overlapping times in the source file I exported the SRT from Blender and it shows overlapping in miliseconds.

"It is recommended that if you're making lyrics for songs that you increase the scene FPS to 100 or even 1000 frames per second before importing. The reason is that .srt files support time data down to the millisecond, but strips must conform to the scene's FPS value. If a low FPS is used, then the minimum timing difference will be limited by the scene FPS."
"Subimport does not allow any subtitles to overlap times and will automatically remove overlaps on import."

I changed the frame rate to 120 and it still does it plus it's not deleting the overlapping clips (good thing) as the instructions note.

Also, I noticed your version didn't change, but your source files did. Could you be so kind and post instructions on how to integrate these updates. I just downloaded the master code and the zip from downloads and imported them both as separate add-on's Not sure if that was correct.

Error

Hi, first thanks for the awesome addon, on Mojave and Blender 2.79 when trying to install it throws this error:

image

Python error when running

I don't see if this version is compatible with version 3.2.0, but below is the error that I get when I try to import a SRT or TXT file.
Hoping you can help.
When I try to import SRT or TXT:

Python: Traceback (most recent call last):
File "C:\Users\Tom\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\Subsimport\operators\import_subtitles.py", line 78, in execute
strips = subtitles_to_sequencer(context, subs)
File "C:\Users\Tom\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\Subsimport\operators\tools\subtitles_to_sequencer.py", line 36, in subtitles_to_sequencer
text_strip = scene.sequence_editor.sequences.new_effect(
TypeError: SequencesTopLevel.new_effect(): error with keyword argument "frame_start" - Function.frame_start expected an int type, not float

type error with frame_start

Quite possibly a Blender version problem, but hoping a int to float would be a trivial fix.

Python: Traceback (most recent call last):
  File "C:\Users\firee\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\Subsimport-master\operators\import_subtitles.py", line 78, in execute
    strips = subtitles_to_sequencer(context, subs)
  File "C:\Users\firee\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\Subsimport-master\operators\tools\subtitles_to_sequencer.py", line 36, in subtitles_to_sequencer
    text_strip = scene.sequence_editor.sequences.new_effect(
TypeError: SequencesTopLevel.new_effect(): error with keyword argument "frame_start" -  Function.frame_start expected an int type, not float

location: <unknown location>:-1

Erro in subtitles_to_seguencer

I saw that the problem with the flame_start function that asks for an integer value instead of a float has already been fix, but for some reason even with the variable strip_start = int(round(start_time * fps, 0)) that is, having a value int, the console keeps showing the same type of error when I try to import some subtitles.
the error that appears is that:

Python: Traceback (most recent call last):
File "C:\Users\regiv\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\Subsimport\operators\import_subtitles.py", line 78, in execute
strips = subtitles_to_sequencer(context, subs)
File "C:\Users\regiv\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\Subsimport\operators\tools\subtitles_to_sequencer.py", line 36, in subtitles_to_sequencer
text_strip = scene.sequence_editor.sequences.new_effect(
TypeError: SequencesTopLevel.new_effect(): error with keyword argument "frame_start" - Function.frame_start expected an int type, not float

Syllabify error - out of index on remove punctuation

When i try to sillabify my subtitles, i'm getting an error of out of index, being trowed by the remove_punctuation script. I am not an expert, but it looks to me, according to the part word[0] that it is happening when some recognized word is "empty". But i tried remove the empty lines of my .txt file (just in case the script was using it instead of the Blender's text strips), and it still getting this error

I using Portuguese (there is a lot of accentuation). Tried use the script in Us english, even the text being in Portuguese. The same.

And i just tied another project from zero to test. Text in english, US english set in the idiom dropdown. Works great.

Here's the console error:

Traceback (most recent call last):
  File "C:\Users\jonatas\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\Subsimport-master\operators\syllabify.py", line 72, in execute
    words = collect_words(scene)
  File "C:\Users\jonatas\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\Subsimport-master\operators\syllabify.py", line 33, in collect_words
    words[i] = remove_punctuation(words[i])
  File "C:\Users\jonatas\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\Subsimport-master\operators\tools\remove_punctuation.py", line 8, in remove_punctuation
    while word[0] in puncs:
IndexError: string index out of range

location: <unknown location>:-1

location: <unknown location>:-1

Font change does not work

I am not able to use the add on tool to change subtitle fonts. After choosing a font file like RobotoCondensed-Bold.ttf and then click button Refresh Font Data, the choosing font is not taken by blender.

Import *.txt doesn't import some lines

Importing txt files, even without any empty lines, skips some. I haven't looked into the code yet but I haven't noticed a particular pattern in the editor. You can see some text strips have double the regular size right after import:
image

Here's the source file:
fibre-subtitles.txt

And thank you very much for your add-on! It's a real time saver. I also code a blender video editing add-on called power sequencer so if you want me to I can look into the import code and do a PR.

How to import a srt file in bpy API code?

I want to use a background style bpy code to handle blender VSE. As Subsimport is a good subtitles process addon in blender. I hope to use import_subtitles() function in my code.

I do it like:

addon_utils.enable("Subsimport")
bpy.ops.sequencerextra.import_subtitles("/Users/sam/Projects/Blender/Study/test.srt")

but I got:

TypeError: Calling operator "bpy.ops.sequencerextra.import_subtitles" error, expected a string enum in ('INVOKE_DEFAULT', 'INVOKE_REGION_WIN', 'INVOKE_REGION_CHANNELS', 'INVOKE_REGION_PREVIEW', 'INVOKE_AREA', 'INVOKE_SCREEN', 'EXEC_DEFAULT', 'EXEC_REGION_WIN', 'EXEC_REGION_CHANNELS', 'EXEC_REGION_PREVIEW', 'EXEC_AREA', 'EXEC_SCREEN')

Can anybody help me to solve this problem ? I don't know how to analog a import file action in the bpy code.
Thanks a lot !

Import polish special charcters

I try this addon. It is looks great . However I have issue . After import subtitles in words missing polish secial characters. The texts are displayed however if the word contain special character it miss it.
How can I made it visible?

Still overlapping

Thanks for trying to fix the issue. It's still overlapping text strips after I split. I have my frame rate set to 100. I've even separated out my text. maybe I'll post a video of what's going on, but basically, it's still overlapping strips and the orange fonts aren't aligned with the original imported strips. They are centered. This is an awesome tool to begin and I'm grateful for what it offers my videos so far. Send me any tips that I might be missing.
I import text
import audio
I use keyboard shortcuts to align the audio with text.
click syllabify
click Split (this is when the text strips on the edit channel become severely overlapped.)

  • a side note. I notice that the "split" text strips have extra spaces and unknown characters with a little box at the end of the line.
    I even clicked combine to see if it would fix, but it doesn't.

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.