pums974 / srtsync Goto Github PK
View Code? Open in Web Editor NEWAutomatic synchronizer of subtitles based on voice activity in the video
License: GNU General Public License v3.0
Automatic synchronizer of subtitles based on voice activity in the video
License: GNU General Public License v3.0
Hi,
I'm facing an install issue on my debian sid:
sudo pip install srtsync
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting srtsync
Downloading https://files.pythonhosted.org/packages/1d/08/1d74a9915b585bbaa772fcdcca94693d071e80ce5104dd802cb6c28d1574/srtsync-1.0.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-z6LQ3c/srtsync/setup.py", line 6, in <module>
import srtsync
File "srtsync/__init__.py", line 9, in <module>
from srtsync.tools import sync
File "srtsync/tools.py", line 90
print(f"stretching {s:.2f} {1/s:.2f} {stretch:.2f}")
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-z6LQ3c/srtsync/
And if I try pip3 install srtsync:
Traceback (most recent call last): File "/usr/local/bin/pip3", line 7, in <module> from pip import main ImportError: cannot import name 'main' from 'pip' (/usr/lib/python3/dist-packages/pip/__init__.py)
And if I try sudo python3 -m pip install --user srtsync:
Collecting srtsync
Cache entry deserialization failed, entry ignored
Downloading https://files.pythonhosted.org/packages/a1/e8/24910e0ec2a74044c55052363d3c8a50e2bfafbb9434bc261f8e90e42923/srtsync-1.1.0-py3-none-any.whl
Collecting pysrt (from srtsync)
Downloading https://files.pythonhosted.org/packages/f6/33/16ad65a8973cb8bcb494af09ee1b9ab5ffdd6ff300bce5d3ac7d3cb1f2cc/pysrt-1.1.1.tar.gz (104kB)
100% |████████████████████████████████| 112kB 166kB/s
Collecting scipy (from srtsync)
Downloading https://files.pythonhosted.org/packages/3e/7e/5cee36eee5b3194687232f6150a89a38f784883c612db7f4da2ab190980d/scipy-1.2.1-cp37-cp37m-manylinux1_x86_64.whl (24.8MB)
100% |████████████████████████████████| 24.8MB 49kB/s
Collecting numpy (from srtsync)
Downloading https://files.pythonhosted.org/packages/91/e7/6c780e612d245cca62bc3ba8e263038f7c144a96a54f877f3714a0e8427e/numpy-1.16.2-cp37-cp37m-manylinux1_x86_64.whl (17.3MB)
100% |████████████████████████████████| 17.3MB 59kB/s
Requirement already satisfied: chardet in /usr/lib/python3/dist-packages (from pysrt->srtsync) (3.0.4)
Building wheels for collected packages: pysrt
Running setup.py bdist_wheel for pysrt ... done
Stored in directory: /root/.cache/pip/wheels/a6/95/51/25db5b533f7c8c3bccf661a7f2bf67caaf893f6f92bb37da33
Successfully built pysrt
Installing collected packages: pysrt, numpy, scipy, srtsync
The script srt is installed in '/root/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
The scripts f2py, f2py3 and f2py3.7 are installed in '/root/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
The script srtsync is installed in '/root/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed numpy-1.16.2 pysrt-1.1.1 scipy-1.2.1 srtsync-1.1.0
srtsync -h
bash: srtsync: command not found
Damn!
And the correct command is…? :-)
Thanks for this very attractive program. I'll try it as soon as I can install it !
$ sudo pip install srtsync
The directory '/home/fabien/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/fabien/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting srtsync
Downloading https://files.pythonhosted.org/packages/1d/08/1d74a9915b585bbaa772fcdcca94693d071e80ce5104dd802cb6c28d1574/srtsync-1.0.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-d6Ptko/srtsync/setup.py", line 6, in <module>
import srtsync
File "srtsync/__init__.py", line 9, in <module>
from srtsync.tools import sync
File "srtsync/tools.py", line 90
print(f"stretching {s:.2f} {1/s:.2f} {stretch:.2f}")
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-d6Ptko/srtsync/
Hi,
I'm facing this issue:
~/.local/bin$ python3 srtsync ~/Downloads/Videos/Films/vo_vost/Sexmission.1984/Seksmisja.1984.720p.HDTV.DD5.1.x264-HALYNA.mkv ~/Downloads/Videos/Films/vo_vost/Sexmission.1984/Seksmisja.1984.720p.HDTV.DD5.1.x264-HALYNA.srt ~/Downloads/Videos/Films/vo_vost/Sexmission.1984/Seksmisja.1984.720p.HDTV.DD5.1.x264-HALYNA_fra.srt /home/hista/.local/lib/python3.7/site-packages/srtsync/main.py:52: UserWarning: The output subtitle will be overwritten ! warn("The output subtitle will be overwritten !") /home/hista/.local/lib/python3.7/site-packages/srtsync/tools.py:119: UserWarning: Assuming source file is a video file warn("Assuming source file is a video file") Extracting audio... Traceback (most recent call last): File "srtsync", line 10, in <module> sys.exit(main()) File "/home/hista/.local/lib/python3.7/site-packages/srtsync/main.py", line 64, in main subs = read_srt(input_srt) File "/home/hista/.local/lib/python3.7/site-packages/srtsync/srt.py", line 13, in read return pysrt.open(srtfile) File "/usr/lib/python3/dist-packages/pysrt/srtfile.py", line 153, in open new_file.read(source_file, error_handling=error_handling) File "/usr/lib/python3/dist-packages/pysrt/srtfile.py", line 181, in read self.extend(self.stream(source_file, error_handling=error_handling)) File "/usr/lib/python3.7/collections/__init__.py", line 1127, in extend self.data.extend(other) File "/usr/lib/python3/dist-packages/pysrt/srtfile.py", line 204, in stream for index, line in enumerate(chain(source_file, '\n')): File "/usr/lib/python3.7/codecs.py", line 714, in __next__ return next(self.reader) File "/usr/lib/python3.7/codecs.py", line 645, in __next__ line = self.readline() File "/usr/lib/python3.7/codecs.py", line 558, in readline data = self.read(readsize, firstline=True) File "/usr/lib/python3.7/codecs.py", line 504, in read newchars, decodedbytes = self.decode(data, self.errors) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte
Could you please help me to fix it?
Best regards
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.