subsync icon indicating copy to clipboard operation
subsync copied to clipboard

most working but some give errors

Open huuub opened this issue 5 years ago • 7 comments

any help?

Traceback (most recent call last): File "/home/jeroen/.local/bin/subsync", line 4, in subsync.run() File "/home/jeroen/.local/lib/python3.6/site-packages/subsync/main.py", line 42, in run m.mfcc(duration=args.duration, seek=not args.start) File "/home/jeroen/.local/lib/python3.6/site-packages/subsync/media.py", line 83, in mfcc transcode = Transcode(self.filepath, duration=duration, seek=seek) File "/home/jeroen/.local/lib/python3.6/site-packages/subsync/ffmpeg.py", line 28, in init self.length = self.__length() File "/home/jeroen/.local/lib/python3.6/site-packages/subsync/ffmpeg.py", line 57, in __length match = re.search(r'(\d\d):(\d\d):(\d\d).(\d\d)', duration[0]) IndexError: list index out of range

huuub avatar Apr 19 '19 18:04 huuub

We are invoking ffprobe to find the length of the video file here: https://github.com/tympanix/subsync/blob/661bc6856c6e428ec115bac85e053050d17a7fc1/subsync/ffmpeg.py#L55-L60

Apparently the output of the ffprobe command is something unexpected and therefore it does not match the regex. If you may, try to run the command on the same file in a terminal and paste it here. Then we might know why it does not match the expected output.

tympanix avatar Apr 20 '19 15:04 tympanix

Maybe we can make the ffprobe invokation more robust with some tricks mentioned in the documentation

tympanix avatar Apr 20 '19 15:04 tympanix

The output is empty for that one. For a normal one it is something like [' Duration: 01:42:33.38, start: 0.000000, bitrate: 11643 kb/s\n']

huuub avatar Apr 23 '19 07:04 huuub

Ok, that is a problem. Do you get a non-zero exit code? Maybe the video file is unsupported by ffmpeg or it is corrupt in some way 🤔

tympanix avatar Apr 23 '19 08:04 tympanix

I don't think so, the code goes further. However I have 2 types of error which I get a lot more. I will make 2 other issues for them.

huuub avatar Apr 23 '19 08:04 huuub

Contact me at huuubAThuuubDOTcom and I give you an FTP user where you can download the problem videos? That is maybe easier...

huuub avatar Apr 23 '19 08:04 huuub

I think you can close/remove this one. I really want to thank you for this one. Great tool!!! The out of sync subtitles were a real pain.

huuub avatar May 10 '19 09:05 huuub