smacke / ffsubsync

Automagically synchronize subtitles with video.
MIT License
6.74k stars 278 forks source link

ERROR: Unable to read input subtitles unsynchronized.srt (try checking permissions) #105

Open Droyk opened 3 years ago

Droyk commented 3 years ago

Environment (please complete the following information):

Describe the bug image Umm, what does this error mean & how to solve it? as you can already guess I'm pretty new to this stuff so I'd really appreciate if you can guide me a lil bit! please!

smacke commented 3 years ago

@Droyk just to clarify, are all the files in the Desktop folder? (Feynman.mkv and unsynchronized.srt)

Droyk commented 3 years ago

@smacke Hey there the srt file is already merged with the said mkv do I need to demerge it?

Droyk commented 3 years ago

@smacke Forgive me for my utter stupidity I guess I didn't see the command properly. okay so now it showing me this! image when I try single command or any other command for that matter it shows me this! image What I'm doing wrong?

Here is the said srt file Feynman.txt (rename the extension to srt) here is the said video file Feynman.docx (rename the extension to mp4)

Droyk commented 3 years ago

Am I even doing this correctly?

Edit: let me be clear on one thing I just want to synch my subtitle file to the video file is that even possible? is my understanding of this application is wrong that it's Syncro tool that somehow captures the speech patterns of the video and synchs the subtitle based on it?

@smacke also, any tutorials for beginners? (forgive this noob for asking so many questions?)

smacke commented 3 years ago

@Droyk no worries, it looks like you are almost there. You need to specify the "-o" flag to specify an output file. Sorry for the bad error message -- that's a bug I need to fix. If you try something like the following in the same folder you were in, it should hopefully work:

ffs Feynman.mp4 -i Feynman.srt -o Feynman-synced.srt
smacke commented 3 years ago

@Droyk in this case, it looks like the unsynced version actually ends up being better. This is because these subtitles are a bit peculiar in that they have multiple lines per subtitle, with the same line being shared across different subtitles, which ends up confusing ffsubsync. I'll need to add this as a caveat in the readme.

Example:

00:00:09,179 --> 00:00:10,730
know anything about the Nobel Prize I
don't understand what it's all about or

4
00:00:10,730 --> 00:00:10,740
don't understand what it's all about or

5
00:00:10,740 --> 00:00:13,370
don't understand what it's all about or
what's worth what and if the people in

Notice how the line "don't understand what it's all about or" is shared across multiple subtitles. This makes it very hard to align speech from audio with speech from subtitles, since the same audio segment needs to be aligned to potentially multiple subtitles, and ffsubsync has a built-in assumption that a given audio segment aligns to exactly one subtitle.

Droyk commented 3 years ago

If you try something like the following in the same folder you were in, it should hopefully work: ffs Feynman.mp4 -i Feynman.srt -o Feynman-synced.srt

Giving me the system cannot find the file specified image

& This is what my folder looks like image Do I need any other files? to make this work?

in this case, it looks like the unsynced version actually ends up being better. This is because these subtitles are a bit peculiar in that they have multiple lines per subtitle, with the same line being shared across different subtitles, which ends up confusing ffsubsync. I'll need to add this as a caveat in the readme.

incase if you want to understand how it happened? I downloaded the subtitles from youtube as vtt & converted it to srt from an online conversion tool! if you want to see the original vtt file here is the link Feynman youtube Webvtt subtitles.txt (just change the ext to "vtt")

Notice how the line "don't understand what it's all about or" is shared across multiple subtitles. This makes it very hard to align speech from audio with a speech from subtitles, since the same audio segment needs to be aligned to potentially multiple subtitles, and ffsubsync has a built-in assumption that a given audio segment aligns to exactly one subtitle.

So does that mean I won't be able to fix this with this application? do I have to manually do it? if so It would be too tiresome because I have at least 56 subtitles with the same problem is there's any solution to this?

by the way, I am a complete noob who doesn't understand the commanding language or the coding? so can I call this "ffsubsync" an application? is application is the correct word to use on "ffsubsync" or it is like a script?

forgive me for asking you too many unrelated questions.

smacke commented 3 years ago

@Droyk I'll try to respond to your other questions once I'm off work. Regarding the file not found errors -- I'm wondering, do you have extensions visible in Windows explorer? It could be that the actual names of those files are something like Feynman.mp4.mp4 and Feynman.srt.srt, and maybe windows explorer is hiding the extension, which would explain why the files can't be found from the command line.

If you go to the folder in the command line and run dir, it should print the "true" filenames. Maybe this is not actually a problem and the problem actually lies with ffsubsync but I figure we should rule out this possibility first.

Droyk commented 3 years ago

It could be that the actual names of those files are something like Feynman.mp4.mp4 and Feynman.srt.srt, and maybe windows explorer is hiding the extension, which would explain why the files can't be found from the command line.

image

Droyk commented 3 years ago

Even after renaming the files it still showing FileNotFoundError: [WinError 2] The system cannot find the file specified image

Seems like it is detecting the video, not the subtitles why don't you check it on your system? does it detect it?


Links Converted srt file (Vtt to srt) Feynman.txt (rename the extension to srt) Video file (without merged subtitles) Feynman.docx (rename the extension to mp4) & The original subtitle vtt file which I got it from Youtube Feynman youtube Webvtt subtitles.txt (just change the ext to "vtt")

Droyk commented 3 years ago

@smacke Anything?

Droyk commented 3 years ago

@smacke Man, you went mute! what happened? at least tell me if the problem persists on my side or your application! if you can't help me atm please say it!

smacke commented 3 years ago

@Droyk I'm afraid I haven't been able to monitor GH as closely as I would like recently; I am preparing for my PhD defense coming up this Tues. I will have more cycles to help address issues after that.