tp7 / Sushi

Automatic subtitle shifter based on audio
MIT License
634 stars 45 forks source link

Sushi failed to execute #33

Closed MatiasMovie closed 6 years ago

MatiasMovie commented 6 years ago

Traceback (most recent call last): File "sushi.py", line 840, in File "sushi.py", line 834, in parse_args_and_run File "sushi.py", line 675, in run File "sushi.py", line 467, in calculate_shifts TypeError: unsupported operand type(s) for -: 'NoneType' and 'float' Failed to execute script sushi

Files http://www.mediafire.com/file/9i1g5l4611j1yg5/sushi_problem.zip

Asinin3 commented 6 years ago

I had same issue. https://github.com/tp7/Sushi/issues/32 I checked your sample, and in the FFF encode it has an episode preview at the end with subtitles for the preview. delete these lines as they are not in the Blu-Ray and try to run it again. Sushi is confused where to shift these lines to because they are not present in the audio you're trying to shift to.

MatiasMovie commented 6 years ago

I forgot close it, I add to script --window 600 --sample-rate 48000 and now worked

Asinin3 commented 6 years ago

Window 600 is seriously not a good idea and will make a lot of the shifts inaccurate. You shouldn't increase the window size much, i never raise it over 30. But you can increase the max-window size instead. Even then, 600 is ridiculous. All you need to do is delete the lines in the subtitle file that are for parts of the video not present in the Blu-Ray such as the episode preview...

MatiasMovie commented 6 years ago

I used --max-window 600 but did not manage it, but --window 600 without stumbling.