agermanidis / autosub Goto Github PK
View Code? Open in Web Editor NEW[NO LONGER MAINTAINED] Command-line utility for auto-generating subtitles for any video file
License: MIT License
[NO LONGER MAINTAINED] Command-line utility for auto-generating subtitles for any video file
License: MIT License
Thanks for this amazing tool .. I try it on with fr as a source and destination language without any issue.
but with the very same video
autosub -F srt -S fr-FR -D en 'fun-sd(0).mp4'
Converting speech regions to FLAC files: 100% |###########################################| Time: 0:00:07
Performing speech recognition: 100% |#####################################################| Time: 0:02:35
Traceback (most recent call last): | | ETA: --:--:--
File "/usr/local/bin/autosub", line 257, in
sys.exit(main())
File "/usr/local/bin/autosub", line 224, in main
for i, transcript in enumerate(pool.imap(translator, transcripts)):
File "/usr/lib/python2.7/multiprocessing/pool.py", line 659, in next
raise value
multiprocessing.pool.MaybeEncodingError: Error sending result: 'HTTPError()'. Reason: 'PicklingError("Can't pickle <type 'cStringIO.StringO'>: attribute lookup cStringIO.StringO failed",)'
I've installed autosub using pip and running it this way:
autosub [ABSOLUTE_PATH_TO_VIDEO]
I get an OSError on giving the path to any file on my filesystem.
I have install ffmpeg and autosub on my computer, it's windows 10, but I can't figure out how to use it.
Can anyone tell me that, please? Much thanks.
Hello,
I was just wondering what, if any, restrictions are there with respect to running the script with the included Google Speech to Text API Key? For example, would it be appropriate for business use? Or would that be breaking Google's TOS somehow?
Thanks.
Traceback (most recent call last):
File "/usr/local/bin/autosub", line 257, in
sys.exit(main())
File "/usr/local/bin/autosub", line 240, in main
formatted_subtitles = formatter(timed_subtitles)
File "/usr/local/lib/python2.7/dist-packages/autosub/formatters.py", line 13, in srt_formatter
return '\n'.join(map(str, f))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 34: ordinal not in range(128)
Would be nice to catch these exceptions to get the rest running.
Great script.
One suggestion, add the option of two steps.
Thank you.
Hello , i have successfully installed this on windows. But there is not tutorial for installing on Mac i want to use it on mac.. please help.
I have install autosub,when I run a demo using google api key you provided in code ,I got a error like this, how did it happen?
hustclf@ubuntu:~/.local/bin$ ./autosub -o /home/hustclf/ -F srt -S zu -D en -K AIzaSyBOti4mM-6x9WDnZIjIeyEU21OpBXqWBgw /home/hustclf/Desktop/zulu.vdat Converting speech regions to FLAC files: 100% |###################################| Time: 0:00:08 Performing speech recognition: 100% |#############################################| Time: 0:00:38 Exception in thread Thread-3:8% |#### | ETA: 0:00:00 Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 754, in run self.__target(*self.__args, **self.__kwargs) File "/usr/lib/python2.7/multiprocessing/pool.py", line 389, in _handle_results task = get() File "/home/hustclf/.local/lib/python2.7/site-packages/oauth2client/util.py", line 137, in positional_wrapper return wrapped(*args, **kwargs) TypeError: ('__init__() takes at least 3 arguments (1 given)', <class 'googleapiclient.errors.HttpError'>, ())
I get this error:
autosub -F srt -S en-US -D en file.mp4
Traceback (most recent call last):
File "/usr/local/bin/autosub", line 257, in <module>
sys.exit(main())
File "/usr/local/bin/autosub", line 193, in main
audio_filename, audio_rate = extract_audio(args.source_path)
File "/usr/local/bin/autosub", line 103, in extract_audio
subprocess.check_output(command)
File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I've installed iy by 'pip'
Hi ;)
I am trying to run your script via php shell_exec comand but i keep getting this error.
1OSError: [Errno 2] No such file or directory
My php script is running as follows.
$output = shell_exec("cd {$targetDir}/ && /usr/local/bin/autosub movie.mp4 2>&1");
Any suggest would be great?
Thanks in advance.
Update on error
1Traceback (most recent call last): File "/usr/local/bin/autosub", line 283, in sys.exit(main()) File "/usr/local/bin/autosub", line 209, in main audio_filename, audio_rate = extract_audio(args.source_path) File "/usr/local/bin/autosub", line 119, in extract_audio subprocess.check_output(command) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 566, in check_output process = Popen(stdout=PIPE, *popenargs, **kwargs) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__ errread, errwrite) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory
I want to convert Streaming videos..It will Support or any other solution is there
I triggered a unicode error when trying a non-ascii language:
$ autosub test.avi -S en-US -D zh-TW
Converting speech regions to FLAC files: 100% |###########################################################################################################| Time: 0:01:49
Performing speech recognition: 100% |#####################################################################################################################| Time: 0:08:55
Translating from en-US to zh-TW: 100% |###################################################################################################################| Time: 0:00:06
Traceback (most recent call last):
File "git/autosub/bin/autosub", line 260, in <module>
sys.exit(main())
File "git/autosub/bin/autosub", line 243, in main
formatted_subtitles = formatter(timed_subtitles)
File "build/bdist.linux-x86_64/egg/autosub/formatters.py", line 13, in srt_formatter
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 32: ordinal not in range(128)
I followed the guide everything is installed correctly, opened my cmd in the directory of the video but when i tried to generate subtitles this occurred:
C:\Users\wasee>C:\Python27\python.exe C:\Python27\scripts\autosub_app.py -S en -D en YouVideo.mp4
Traceback (most recent call last):
File "C:\Python27\scripts\autosub_app.py", line 283, in
sys.exit(main())
File "C:\Python27\scripts\autosub_app.py", line 209, in main
audio_filename, audio_rate = extract_audio(args.source_path)
File "C:\Python27\scripts\autosub_app.py", line 119, in extract_audio
subprocess.check_output(command)
File "C:\Python27\lib\subprocess.py", line 567, in check_output
process = Popen(stdout=PIPE, _popenargs, *_kwargs)
File "C:\Python27\lib\subprocess.py", line 711, in init
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 959, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
When I run 'pip install autosub' ,there is a error.
I use python3.5.1-amd64 & pip 8.0.2
Using cached progressbar-2.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\xxx\AppData\Local\Temp\pip-build-tl1gmkiv\progressbar\setu
.py", line 5, in
import progressbar
File "C:\Users\xxx\AppData\Local\Temp\pip-build-tl1gmkiv\progressbar\prog
essbar__init__.py", line 59, in
from progressbar.widgets import *
File "C:\Users\xxx\AppData\Local\Temp\pip-build-tl1gmkiv\progressbar\prog
essbar\widgets.py", line 121, in
class FileTransferSpeed(Widget):
File "c:\program files\python35\lib\abc.py", line 133, in new
cls = super().new(mcls, name, bases, namespace)
ValueError: 'format' in slots conflicts with class variable
....
does it matter that it's in the constants? Can it be used maliciously?
Just thought I'd check =)
I was been able to generate srt several times, but always get empty srt recently.
Is there anyone who experiencing the same issue?
The details show as follow.
allen@allen-vm:~$ autosub -S en-GB -D zh-CN SimplySolar.mp4
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x932caa0] moov atom not found
SimplySolar.mp4: Invalid data found when processing input
Traceback (most recent call last):
File "/usr/local/bin/autosub", line 260, in
sys.exit(main())
File "/usr/local/bin/autosub", line 194, in main
audio_filename, audio_rate = extract_audio(args.source_path)
File "/usr/local/bin/autosub", line 104, in extract_audio
subprocess.check_output(command)
File "/usr/lib/python2.7/subprocess.py", line 544, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['ffmpeg', '-y', '-i', 'SimplySolar.mp4', '-ac', '1', '-ar', '16000', '-loglevel', 'error', '/tmp/tmpdlIVEL.wav']' returned non-zero exit status 1
I installed autosub on windows, with python27 to c:\Python27\Scripts
I run it with the following command.
But while doing so I get many errors while the program tries to fork new instances of itself.
How to fix this?
Batch Script
@echo off
SET PATH=%PATH%;P:\utilities\MeGUI_2418_x86\tools\ffmpeg\
SET PATH=%PATH%;c:\Python27\Scripts\
c:
cd\Python27\Scripts\
c:\Python27\python.exe autosub "theaudioinput.mp3"
Output
Traceback (most recent call last):
C File "<string>", line 1, in <module>
File "c:\Python27\lib\multiprocessing\forking.py", line 380, in main--:--:--
prepare(preparation_data)
File "c:\Python27\lib\multiprocessing\forking.py", line 489, in prepare
file, path_name, etc = imp.find_module(main_name, dirs)
ImportError: No module named autosub
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\Python27\lib\multiprocessing\forking.py", line 380, in main
prepare(preparation_data)
File "c:\Python27\lib\multiprocessing\forking.py", line 489, in prepare
file, path_name, etc = imp.find_module(main_name, dirs)
ImportError: No module named autosub
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\Python27\lib\multiprocessing\forking.py", line 380, in main
prepare(preparation_data)
File "c:\Python27\lib\multiprocessing\forking.py", line 489, in prepare
file, path_name, etc = imp.find_module(main_name, dirs)
ImportError: No module named autosub
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\Python27\lib\multiprocessing\forking.py", line 380, in main
prepare(preparation_data)
File "c:\Python27\lib\multiprocessing\forking.py", line 489, in prepare
file, path_name, etc = imp.find_module(main_name, dirs)
ImportError: No module named autosub
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\Python27\lib\multiprocessing\forking.py", line 380, in main
prepare(preparation_data)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\Python27\lib\multiprocessing\forking.py", line 380, in main
prepare(preparation_data)
File "c:\Python27\lib\multiprocessing\forking.py", line 489, in prepare
file, path_name, etc = imp.find_module(main_name, dirs)
ImportError: No module named autosub
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\Python27\lib\multiprocessing\forking.py", line 380, in main
prepare(preparation_data)
File "c:\Python27\lib\multiprocessing\forking.py", line 489, in prepare
file, path_name, etc = imp.find_module(main_name, dirs)
ImportError: No module named autosub
Traceback (most recent call last):
File "c:\Python27\lib\multiprocessing\forking.py", line 489, in prepare
File "<string>", line 1, in <module>
File "c:\Python27\lib\multiprocessing\forking.py", line 380, in main
file, path_name, etc = imp.find_module(main_name, dirs)
ImportErrorprepare(preparation_data)
: File "c:\Python27\lib\multiprocessing\forking.py", line 489, in prepar
I tried to install Autosub but it shown error, and I cannot find a solution that work for me.
I already installed ffmpeg that required by Autosub and added path for it.
I also upgraded my setuptools.
C:\WINDOWS\system32>pip install autosub
Collecting autosub
Using cached autosub-0.3.11.tar.gz
Collecting google-api-python-client>=1.4.2 (from autosub)
Using cached google_api_python_client-1.6.2-py2.py3-none-any.whl
Requirement already satisfied: requests>=2.3.0 in c:\program files\python36\lib\site-packages (from autosub)
Collecting pysrt>=1.0.1 (from autosub)
Using cached pysrt-1.1.1.tar.gz
Collecting progressbar>=2.3 (from autosub)
Using cached progressbar-2.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\CHEKWE~1\AppData\Local\Temp\pip-build-4wnmhm6k\progressbar\setup.py", line 5, in <module>
import progressbar
File "C:\Users\CHEKWE~1\AppData\Local\Temp\pip-build-4wnmhm6k\progressbar\progressbar\__init__.py", line 59, in <module>
from progressbar.widgets import *
File "C:\Users\CHEKWE~1\AppData\Local\Temp\pip-build-4wnmhm6k\progressbar\progressbar\widgets.py", line 121, in <module>
class FileTransferSpeed(Widget):
File "c:\program files\python36\lib\abc.py", line 133, in __new__
cls = super().__new__(mcls, name, bases, namespace)
ValueError: 'format' in __slots__ conflicts with class variable
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\CHEKWE~1\AppData\Local\Temp\pip-build-4wnmhm6k\progressbar\
I found another answer that said enter easy_install -U setuptools
but shown error too. (cmd is run as admin)
C:\WINDOWS\system32>easy_install -U setuptools
Searching for setuptools
Reading https://pypi.python.org/simple/setuptools/
Best match: setuptools 35.0.1
Processing setuptools-35.0.1-py3.6.egg
setuptools 35.0.1 is already the active version in easy-install.pth
Installing easy_install-script.py script to c:\program files\python36\Scripts
Installing easy_install.exe script to c:\program files\python36\Scripts
error: [WinError 5] Access is denied: 'c:\\program files\\python36\\Scripts\\easy_install.exe'
Any help would be appreciated.
I am getting some errors with progressbar
when installing:
$ python3 -m pip install autosub
Collecting autosub
Using cached autosub-0.3.11.tar.gz
Collecting google-api-python-client>=1.4.2 (from autosub)
Using cached google_api_python_client-1.6.1-py2.py3-none-any.whl
Collecting requests>=2.3.0 (from autosub)
Using cached requests-2.12.4-py2.py3-none-any.whl
Collecting pysrt>=1.0.1 (from autosub)
Using cached pysrt-1.1.1.tar.gz
Collecting progressbar>=2.3 (from autosub)
Using cached progressbar-2.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/yf/q0zr3n9s33q_y9rtsnfdnrzh0000gn/T/pip-build-l9c_ljng/progressbar/setup.py", line 5, in <module>
import progressbar
File "/private/var/folders/yf/q0zr3n9s33q_y9rtsnfdnrzh0000gn/T/pip-build-l9c_ljng/progressbar/progressbar/__init__.py", line 59, in <module>
from progressbar.widgets import *
File "/private/var/folders/yf/q0zr3n9s33q_y9rtsnfdnrzh0000gn/T/pip-build-l9c_ljng/progressbar/progressbar/widgets.py", line 121, in <module>
class FileTransferSpeed(Widget):
File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/abc.py", line 133, in __new__
cls = super().__new__(mcls, name, bases, namespace)
ValueError: 'format' in __slots__ conflicts with class variable
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/yf/q0zr3n9s33q_y9rtsnfdnrzh0000gn/T/pip-build-l9c_ljng/progressbar/
Could this have something to do with the latest 3.6 release?
I found and downloaded this project today and have tried several times to create srt file as follow, but it just return empty. So I consider that if there are any requirement for source video or something wrong in my program?
autosub -C 4 ./wiml.wav
Converting speech regions to FLAC files: 100% |##################| Time: 0:00:01
Performing speech recognition: 100% |############################| Time: 0:00:04
Subtitles file created at ./wiml.srt
autosub -C 4 ./android.mp4
Converting speech regions to FLAC files: 100% |##################| Time: 0:00:01
Performing speech recognition: 100% |############################| Time: 0:00:02
Subtitles file created at ./android.srt
autosub ./spill.mp4
Converting speech regions to FLAC files: 100% |##################| Time: 0:00:00
Performing speech recognition: 100% |############################| Time: 0:00:01
Subtitles file created at ./spill.srt
Ps:
Codec: WAV
CHannels: Mono
Sample rate: 16000HZ
Bitrate:N/A
wget www.google.com
--2017-03-26 16:11:53-- http://www.google.com/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:8087... connected.
Proxy request sent, awaiting response... 301
Location: https://www.google.com/ [following]
--2017-03-26 16:11:53-- https://www.google.com/
Connecting to localhost (localhost)|127.0.0.1|:8087... connected.
Proxy request sent, awaiting response... 302 Found
Location: http://www.google.com.hk/url?sa=p&hl=zh-CN&pref=hkredirect&pval=yes&q=http://www.google.com.hk/%3Fgws_rd%3Dcr&ust=1490515943883163&usg=AFQjCNEN29XXuEQQlfOE3M_SZTGZKSvsbg [following]
--2017-03-26 16:11:53-- http://www.google.com.hk/url?sa=p&hl=zh-CN&pref=hkredirect&pval=yes&q=http://www.google.com.hk/%3Fgws_rd%3Dcr&ust=1490515943883163&usg=AFQjCNEN29XXuEQQlfOE3M_SZTGZKSvsbg
Reusing existing connection to localhost:8087.
Proxy request sent, awaiting response... 302
Location: http://www.google.com.hk/?gws_rd=cr [following]
--2017-03-26 16:11:54-- http://www.google.com.hk/?gws_rd=cr
Reusing existing connection to localhost:8087.
Proxy request sent, awaiting response... 200
Length: 11020 (11K) [text/html]
Saving to: ‘index.html’
100%[======================================>] 11,020 --.-K/s in 0s
For Video YouTube: ¡Bienvenidos a Extraordinerd!
Audio
Result Run Script Autosub
Silence Audio (Noise,music, etc.)
Observations: The best method, but it requires a long time to identify the sounds, voices, ambient noise.
Use Filters of FFmpeg, loudnorm or dynaudnorm
ffmpeg -i myvideo.mp4 -af loudnorm=i=-5 myvideoFilter.wav
Observations: It requires a special compilation of ffmpeg, but can be downloaded from here.
Modify the script, and Zero the value of threshold=0
Observations:this case, it worked like that with the filter, but it is not always so. LOST TOTAL TIMING.
Note 1 : For speed, the audio must be converted to mono and frequency to 16000
Note 2 : For methods 2 to 4, the script could not identify the silences, so cutting it done automatically at 6.1 seconds (min_region_size = 0.5, max_region_size = 6)
generating the command everytime or writing a list substitution function would be a good idea,
cmd = ['ffmpeg', 'filename', ]
for x, y in kwargs.iteritems():
cmd[cmd.index(x)] = y
rather than str.format and splitting.
str.format and splitting is also a working idea if you separate the ffmpeg arguments with a unique token(but that is just complicated)
great tool btw...
Hi guys
Could you help me please with this error?
http://screencast.com/t/gEOLSd96Au6P
I'am not sure if it is a ffmpeg error or autosub error
What do you think?
Thanks so much
ioni
I have this error. Can anyone help me? I tried to uninstall and reinstall autosub many times but not still not working. Thank you!
Traceback (most recent call last):
File "C:\Python27\Scripts\autosub_app.py", line 17, in
from autosub.constants import LANGUAGE_CODES
File "C:\Python27\Scripts\autosub.py", line 17, in
ImportError: No module named constants
File "constants.py" was already in "lib" folder.
Please help me. Thank you so much!
Hi,
I tried to create subtitles for some home videos of mine. And only two sentences where found in a 2min long video.
I tried changing the percentile and the min & max region sizes, but had no luck with it.
Have you taken a look at https://github.com/Uberi/speech_recognition ? Isn't it a replacement choice?!
$ sudo pip install autosub
$ ls
test.avi
$ autosub --format=srt -C 2 -S en-US -D en -o test.srt test.avi
Traceback (most recent call last):
File "/usr/local/bin/autosub", line 256, in <module>
sys.exit(main())
File "/usr/local/bin/autosub", line 193, in main
audio_filename, audio_rate = extract_audio(args.source_path)
File "/usr/local/bin/autosub", line 103, in extract_audio
subprocess.check_output(command)
File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
$ autosub test.avi
Traceback (most recent call last):
File "/usr/local/bin/autosub", line 256, in <module>
sys.exit(main())
File "/usr/local/bin/autosub", line 193, in main
audio_filename, audio_rate = extract_audio(args.source_path)
File "/usr/local/bin/autosub", line 103, in extract_audio
subprocess.check_output(command)
File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I have successfully installed and tried running it, the help shows, but when I try to create subtitles, it gets stuck in some kind of loop. There is constant text output in the windows that is too fast to read and seems garbled when copied. Pasting it below:
D:>python autosub -F srt -S en -D en PuertoRico.mp4
Traceback (most recent call last):
File "", line 1, in
Traceback (most recent call last):
Traceback (most recent call last):
File "", line 1, in
File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
C File "", line 1, in
prepare(preparation_data)
File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
Traceback (most recent call last):
File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
Traceback (most recent call last):
File "", line 1, in iles: 0% | | ETA: --:--:--
prepare(preparation_data)
File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
file, path_name, etc = imp.find_module(main_name, dirs)
File "", line 1, in
Traceback (most recent call last):
File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
File "", line 1, in
file, path_name, etc = imp.find_module(main_name, dirs)
prepare(preparation_data)
File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
Traceback (most recent call last):
ImportError : prepare(preparation_data)
File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
ImportErrorN File "", line 1, in
Traceback (most recent call last):
file, path_name, etc = imp.find_module(main_name, dirs)
: o module named autosub File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
File "", line 1, in
file, path_name, etc = imp.find_module(main_name, dirs)
ImportErrorN
prepare(preparation_data)
prepare(preparation_data)
File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
ImportError: : File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
prepare(preparation_data)
o module named autosubNN Traceback (most recent call last):
prepare(preparation_data)
File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
o module named autosubo module named autosubTraceback (most recent call last):
File "", line 1, in
File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
file, path_name, etc = imp.find_module(main_name, dirs)
file, path_name, etc = imp.find_module(main_name, dirs)
File "", line 1, in
File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
ImportErrorImportErrorfile, path_name, etc = imp.find_module(main_name, dirs)
File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
ImportErrorfile, path_name, etc = imp.find_module(main_name, dirs)
: : : ImportErrorNprepare(preparation_data)
o module named autosubprepare(preparation_data)
N: N File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
o module named autosub File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
No module named autosub
o module named autosub
file, path_name, etc = imp.find_module(main_name, dirs)
file, path_name, etc = imp.find_module(main_name, dirs)
ImportErrorImportError: No module named autosub
: No module named autosub
Traceback (most recent call last):
File "", line 1, in
Traceback (most recent call last):
File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
File "", line 1, in
Traceback (most recent call last):
Traceback (most recent call last):
File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
Traceback (most recent call last):
File "", line 1, in
File "", line 1, in
File "", line 1, in
prepare(preparation_data)
File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
prepare(preparation_data)
File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
prepare(preparation_data)
prepare(preparation_data)
File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
prepare(preparation_data)
File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
file, path_name, etc = imp.find_module(main_name, dirs)
File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
file, path_name, etc = imp.find_module(main_name, dirs)
ImportErrorfile, path_name, etc = imp.find_module(main_name, dirs)
ImportErrorfile, path_name, etc = imp.find_module(main_name, dirs)
file, path_name, etc = imp.find_module(main_name, dirs)
: ImportErrorNImportErrorImportError: : o module named autosub: : NN
NNo module named autosubo module named autosubo module named autosubo module named autosub
Traceback (most recent call last):
File "", line 1, in
Traceback (most recent call last):
File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
File "", line 1, in
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
File "", line 1, in
File "", line 1, in
prepare(preparation_data)
File "", line 1, in
File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
prepare(preparation_data)
File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
prepare(preparation_data)
file, path_name, etc = imp.find_module(main_name, dirs)
prepare(preparation_data)
prepare(preparation_data)
File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
ImportError File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
: file, path_name, etc = imp.find_module(main_name, dirs)
file, path_name, etc = imp.find_module(main_name, dirs)
Nfile, path_name, etc = imp.find_module(main_name, dirs)
ImportErrorImportErroro module named autosubImportErrorfile, path_name, etc = imp.find_module(main_name, dirs)
: :
: ImportErrorNNN: o module named autosubo module named autosubo module named autosub
No module named autosub
Traceback (most recent call last):
File "", line 1, in
File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
prepare(preparation_data)
File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
Traceback (most recent call last):
Traceback (most recent call last):
File "", line 1, in
Traceback (most recent call last):
File "", line 1, in
file, path_name, etc = imp.find_module(main_name, dirs)
File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
File "", line 1, in
File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
Traceback (most recent call last):
ImportError File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
File "", line 1, in
: prepare(preparation_data)
N File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
prepare(preparation_data)
File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
o module named autosubprepare(preparation_data)
File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
prepare(preparation_data)
file, path_name, etc = imp.find_module(main_name, dirs)
File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare
ImportErrorfile, path_name, etc = imp.find_module(main_name, dirs)
file, path_name, etc = imp.find_module(main_name, dirs)
ImportError: ImportError: Nfile, path_name, etc = imp.find_module(main_name, dirs)
: No module named autosubImportErrorNo module named autosub
: o module named autosub
N
o module named autosub
^C
D:>
Requeriments
Windows 32 or 64 bits.
Connection Internet.
Links Downloads
Python
FFMPEG
AutoInstall autosub_app 0.3.12.zip
SampleVideos Spanish - English.zip
Subtitle Editor Aegisub
For Version autosub 0.3.9
Note: Uninstall Python 3.x
Tutorial Video Youtube
Install Python 2.7 (32 bits)
https://www.python.org/ftp/python/2.7.12/python-2.7.12.msi
## Note: Check Add Python.exe to Path
Run cmd (Win+R)
C:\Python27\Scripts\pip.exe install autosub
Or
C:\Python27\Scripts\pip.exe install https://pypi.python.org/packages/35/7b/9d5361c0f7abfcc6d826a5279b1c4501f7616505629f6c54857587ec6e37/autosub-0.3.9.tar.gz
or
(Download Last version autosub https://pypi.python.org/pypi/autosub)
C:\Python27\Scripts\pip.exe install "c:\youdownloaded\autosub-0.3.9.tar.gz"
Message Output Normal
Installing collected packages: autosub
Successfully installed autosub-0.3.9
Change Name File "autosub" to "autosub_app.py"
Rename C:\Python27\Scripts\autosub autosub_app.py
Modify with notepad.exe or Notepad++(Edit Text) autosub_app.py
4.1 In line 48 add ", delete=False"
temp = tempfile.NamedTemporaryFile(suffix='.flac')
by
temp = tempfile.NamedTemporaryFile(suffix='.flac', delete=False)
4.2 Eliminate line 53 os.system('stty sane')
. (Optional)
UPDATE For last Version Autosub (23 May 2017)
In Windows xp,7,8,10
With Program Notepad change lines :
Line 127 change
exe_file = os.path.join(path, program)
exe_file = os.path.join(path, program + ".exe")
Line 47 change
temp = tempfile.NamedTemporaryFile(suffix='.flac')
temp = tempfile.NamedTemporaryFile(suffix='.flac', delete=False)
Download(https://ffmpeg.zeranoe.com/builds/) and
Copy ffmpeg.exe to C:\Python27\
Restart Windows
Test Script C:\Python27\python.exe C:\Python27\scripts\autosub_app.py --list-languages
SampleVideos Spanish - English.zip
autosub_app 0.3.12.zip
Spanish
C:\Python27\python.exe C:\Python27\scripts\autosub_app.py -S es -D es TuVideo.mp4
English
C:\Python27\python.exe C:\Python27\scripts\autosub_app.py -S en -D en YouVideo.mp4
Japanese
C:\Python27\python.exe C:\Python27\scripts\autosub_app.py -S ja -D ja YouAnimeVideo.mp4
Optional
Compile script Python(Exe Executable)
C:\Python27\python.exe -m compileall C:\Python27\scripts\autosub_app.py
Run
C:\Python27\scripts\autosub_app.pyc YouVideo.mp4
(English Default)
Upgrade Pip
python -m pip install --upgrade pip
autosub_app.zip
Create batch by language (JA) AutoSub_Jap.bat and copy to directory SendTo
"shell:sendto"
"%APPDATA%\Microsoft\Windows\SendTo"
AutoSub_Jap.bat
C:\Python27\python.exe C:\Python27\Scripts\autosub_app.py -C 2 -S ja -D ja %1
http://www.howtogeek.com/howto/windows-vista/customize-the-windows-vista-send-to-menu/
7.- Translate your Subtitles
Download Subtitle Edit https://github.com/SubtitleEdit/subtitleedit/releases
SubtitleEdit-3.4.13-Setup.zip Or VersionPortable SE3413PL.zip
Or
https://sourceforge.net/projects/srt-tran/
Auto-Generated by Youtube
President Obama Addresses the Nation on the BP Oil Spill (inglés).Youtube.srt.txt
Generated by Script AutoSub
President Obama Addresses the Nation on the BP Oil Spill (inglés).AutoSub.srt.txt
Time Process: 01:15 Abot Minute
Times are best generated by AUTOSUB.
-Error install pip
"python setup.py egg_info"
Solution
Install Python 2.7 uninstall 3.x
"WindowsError [Error 2]"
C:\Python27>python.exe C:\Python27\scripts\autosub_app.py -S en -D en test.mp4
Traceback (most recent call last):
File "C:\Python27\scripts\autosub_app.py", line 284, in <module>
sys.exit(main())
File "C:\Python27\scripts\autosub_app.py", line 210, in main
audio_filename, audio_rate = extract_audio(args.source_path)
File "C:\Python27\scripts\autosub_app.py", line 120, in extract_audio
subprocess.check_output(command)
File "C:\Python27\lib\subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "C:\Python27\lib\subprocess.py", line 710, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 958, in _execute_child
startupinfo)
WindowsError: [Error 2]
Solution.
Copy ffmpeg.exe to C:\Python27\
or
Or ADD Path (Directory) File ffmpeg.
Examples: c:\ffmpeg\ , c:\Program Files\ffmpeg, c:\Mydownloads
Link Help Add Path(Directory)
http://www.computerhope.com/issues/ch000549.htm
Error infinite loop
"File "C:\Python27\lib\multiprocessing\forking.py", line 380"
"File "C:\Python27\lib\multiprocessing\forking.py", line 503"
ImportError : prepare(preparation_data)
Solution
Change name script C:\Python27\Scripts\autosub autosub_app.py
Error Permission denied Files Flac
c:...local\temp\tmpksjd.flac Permission denied
Solution:
Modify Script, close file. Link
#15
----------------------Before - Original-------------------------
class FLACConverter(object):
def __init__(self, source_path, include_before=0.25, include_after=0.25):
self.source_path = source_path
self.include_before = include_before
self.include_after = include_after
def __call__(self, region):
try:
start, end = region
start = max(0, start - self.include_before)
end += self.include_after
temp = tempfile.NamedTemporaryFile(suffix='.flac')
command = ["ffmpeg", "-y", "-i", self.source_path,
"-ss", str(start), "-t", str(end - start),
"-loglevel", "error", temp.name]
subprocess.check_output(command)
os.system('stty sane')
return temp.read()
----------------------After - Modified Option 1 ------------------------
class FLACConverter(object):
def __init__(self, source_path, include_before=0.25, include_after=0.25):
self.source_path = source_path
self.include_before = include_before
self.include_after = include_after
def __call__(self, region):
try:
start, end = region
start = max(0, start - self.include_before)
end += self.include_after
temp = tempfile.NamedTemporaryFile(suffix='.flac')
temp.close()
command = ["ffmpeg", "-y", "-i", self.source_path,
"-ss", str(start), "-t", str(end - start),
"-loglevel", "error", temp.name]
subprocess.check_output(command)
return open(temp.name, "rb").read()
----------------------after - Modified Option 2 ------------------------
class FLACConverter(object):
def __init__(self, source_path, include_before=0.25, include_after=0.25):
self.source_path = source_path
self.include_before = include_before
self.include_after = include_after
def __call__(self, region):
try:
start, end = region
start = max(0, start - self.include_before)
end += self.include_after
temp = tempfile.NamedTemporaryFile(suffix='.flac', delete=False)
command = ["ffmpeg", "-y", "-i", self.source_path,
"-ss", str(start), "-t", str(end - start),
"-loglevel", "error", temp.name]
subprocess.check_output(command)
return temp.read()
except KeyboardInterrupt:
return
Message Normal Output Pip install autosub
Collecting autosub
Downloading autosub-0.3.9.tar.gz
Collecting google-api-python-client>=1.4.2 (from autosub)
Downloading google_api_python_client-1.5.1-py2.py3-none-any.whl (50kB)
Collecting requests>=2.3.0 (from autosub)
Downloading requests-2.11.0-py2.py3-none-any.whl (514kB)
Collecting pysrt>=1.0.1 (from autosub)
Downloading pysrt-1.1.1.tar.gz (104kB)
Collecting progressbar>=2.3 (from autosub)
Downloading progressbar-2.3.tar.gz
Collecting six<2,>=1.6.1 (from google-api-python-client>=1.4.2->autosub)
Downloading six-1.10.0-py2.py3-none-any.whl
Collecting uritemplate<1,>=0.6 (from google-api-python-client>=1.4.2->autosub)
Downloading uritemplate-0.6.tar.gz
Collecting httplib2<1,>=0.8 (from google-api-python-client>=1.4.2->autosub)
Downloading httplib2-0.9.2.zip (210kB)
Collecting oauth2client (from google-api-python-client>=1.4.2->autosub)
Downloading oauth2client-3.0.0.tar.gz (77kB)
Collecting chardet (from pysrt>=1.0.1->autosub)
Downloading chardet-2.3.0.tar.gz (164kB)
Collecting simplejson>=2.5.0 (from uritemplate<1,>=0.6->google-api-python-client>=1.4.2->autosub)
Downloading simplejson-3.8.2-cp27-cp27m-win32.whl (65kB)
Collecting pyasn1>=0.1.7 (from oauth2client->google-api-python-client>=1.4.2->autosub)
Downloading pyasn1-0.1.9-py2.py3-none-any.whl
Collecting pyasn1-modules>=0.0.5 (from oauth2client->google-api-python-client>=1.4.2->autosub)
Downloading pyasn1_modules-0.0.8-py2.py3-none-any.whl
Collecting rsa>=3.1.4 (from oauth2client->google-api-python-client>=1.4.2->autosub)
Downloading rsa-3.4.2-py2.py3-none-any.whl (46kB)
Installing collected packages: six, simplejson, uritemplate, httplib2, pyasn1, pyasn1-modules, rsa, oauth2client, google-api-python-client, requests, chardet, pysrt, progressbar, autosub
Running setup.py install for uritemplate: started
Running setup.py install for uritemplate: finished with status 'done'
Running setup.py install for httplib2: started
Running setup.py install for httplib2: finished with status 'done'
Running setup.py install for oauth2client: started
Running setup.py install for oauth2client: finished with status 'done'
Running setup.py install for chardet: started
Running setup.py install for chardet: finished with status 'done'
Running setup.py install for pysrt: started
Running setup.py install for pysrt: finished with status 'done'
Running setup.py install for progressbar: started
Running setup.py install for progressbar: finished with status 'done'
Running setup.py install for autosub: started
Running setup.py install for autosub: finished with status 'done'
Successfully installed autosub-0.3.9 chardet-2.3.0 google-api-python-client-1.5.1 httplib2-0.9.2 oauth2client-3.0.0 progressbar-2.3 pyasn1-0.1.9 pyasn1-modules-0.0.8 pysrt-1.1.1 requests-2.11.0 rsa-3.4.2 simplejson-3.8.2 six-1.10.0 uritemplate-0.6
For Version autosub 0.3.9
File For Windows Modified. Rename autosub_app.py.txt to autosub_app.py, and copy
C:\Python27\Scripts
autosub_app.py.txt
SampleVideos Spanish - English.zip
autosub_app 0.3.12.zip
After one hour past, I just get a blank srt file.Why?
I made sure that video file "welcome.mp4" is in the directory where I ran
autosub welcome.py
Outputs the error:
Traceback (most recent call last):
File "/home/rahul/miniconda2/bin/autosub", line 284, in
sys.exit(main())
File "/home/rahul/miniconda2/bin/autosub", line 210, in main
audio_filename, audio_rate = extract_audio(args.source_path)
File "/home/rahul/miniconda2/bin/autosub", line 120, in extract_audio
subprocess.check_output(command)
File "/home/rahul/miniconda2/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, _popenargs, *_kwargs)
File "/home/rahul/miniconda2/lib/python2.7/subprocess.py", line 710, in init
errread, errwrite)
File "/home/rahul/miniconda2/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I'm new to this and am finding it useful. However, for most transcripts I'd like it to be able to control how many characters you can have for each subtitle. For interview transcription, I'd set it at 300 characters, so it doesn't interrupt the text flow quite so often.
Also, if there is any way to grab the starting timecode from the video file, that would also be enormously helpful. But I'm not sure if FLAC files have timecode capabilities.
Thanks. And good work.
Traceback (most recent call last):
File "/usr/local/bin/autosub", line 256, in <module>
sys.exit(main())
File "/usr/local/bin/autosub", line 247, in main
open(dest, 'wb').write(formatted_subtitles)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe8' in position 125: ordinal not in range(128)```
While I was developing my own Speech-to-text generator. I came to know that google charges for speech API after 60 minutes.
As you have also used this API.. so are you really paying for this API every month? Or using for free? If free..please let me know so that i can use it for my project
Excellent script - I wonder if there is a way to improve accuracy of the subtitles (not necessarily translations) without making additional audio adjustments? I would like to use this script to replace a process that involves uploading to Youtube to retrieve their auto generated captions. Perhaps this could be incorporated as optional, as I am not as concerned about the speed of output though others may be.
To illustrate, the screenshot I'm including is a side-by-side comparison of the .SRT files, one generated by Autosub and the other by the Youtube generator.
Suggestions welcome, thank you.
Installing collected packages: progressbar, six, httplib2, uritemplate, pyasn1, rsa, pyasn1-modules, oauth2client, google-api-python-client, urllib3, idna, chardet, requests, pysrt, autosub
Found existing installation: six 1.4.1
DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling six-1.4.1:
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/Library/Python/2.7/site-packages/pip/utils/init.py", line 267, in renames
shutil.move(old, new)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
copy2(src, real_dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
copystat(src, dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/tmp/pip-5if5AG-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
I got it a chinese subtitle from a english move.
chinese subtitle need GB2312 can work but it still keep UTF8 windows10 player can't load it
The use of capitalize() on each line of the speech API output here causes capital letters in proper nouns and abbreviations to be lost.
For example:
API output: the city of York is in the UK
Subtitle: The city of york is in the uk
Instead, something along the lines of
line = line['result'][0]['alternative'][0]['transcript']
return line[:1].upper() + line[1:]
could be used instead.
Error when running the install command pip install autosub
Collecting autosub
Using cached autosub-0.3.12.tar.gz
Collecting google-api-python-client>=1.4.2 (from autosub)
Using cached google_api_python_client-1.6.2-py2.py3-none-any.whl
Collecting requests>=2.3.0 (from autosub)
Using cached requests-2.18.1-py2.py3-none-any.whl
Collecting pysrt>=1.0.1 (from autosub)
Using cached pysrt-1.1.1.tar.gz
Collecting progressbar>=2.3 (from autosub)
Using cached progressbar-2.3.tar.gz
Collecting six<2dev,>=1.6.1 (from google-api-python-client>=1.4.2->autosub)
Using cached six-1.10.0-py2.py3-none-any.whl
Collecting httplib2<1dev,>=0.9.2 (from google-api-python-client>=1.4.2->autosub)
Using cached httplib2-0.10.3.tar.gz
Collecting uritemplate<4dev,>=3.0.0 (from google-api-python-client>=1.4.2->autosub)
Using cached uritemplate-3.0.0-py2.py3-none-any.whl
Collecting oauth2client<5.0.0dev,>=1.5.0 (from google-api-python-client>=1.4.2->autosub)
Using cached oauth2client-4.1.2-py2.py3-none-any.whl
Collecting urllib3<1.22,>=1.21.1 (from requests>=2.3.0->autosub)
Using cached urllib3-1.21.1-py2.py3-none-any.whl
Collecting idna<2.6,>=2.5 (from requests>=2.3.0->autosub)
Using cached idna-2.5-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests>=2.3.0->autosub)
Using cached certifi-2017.4.17-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests>=2.3.0->autosub)
Using cached chardet-3.0.4-py2.py3-none-any.whl
Collecting rsa>=3.1.4 (from oauth2client<5.0.0dev,>=1.5.0->google-api-python-client>=1.4.2->autosub)
Using cached rsa-3.4.2-py2.py3-none-any.whl
Collecting pyasn1-modules>=0.0.5 (from oauth2client<5.0.0dev,>=1.5.0->google-api-python-client>=1.4.2->autosub)
Using cached pyasn1_modules-0.0.9-py2.py3-none-any.whl
Collecting pyasn1>=0.1.7 (from oauth2client<5.0.0dev,>=1.5.0->google-api-python-client>=1.4.2->autosub)
Using cached pyasn1-0.2.3-py2.py3-none-any.whl
Installing collected packages: six, httplib2, uritemplate, pyasn1, rsa, pyasn1-modules, oauth2client, google-api-python-client, urllib3, idna, certifi, chardet, requests, pysrt, progressbar, autosub
Found existing installation: six 1.4.1
DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling six-1.4.1:
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
copy2(src, real_dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
copystat(src, dst)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/var/folders/nf/n6bqf42169s8n0q3669609n40000gn/T/pip-kmtfhQ-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
I was trying to install autosub on Windows 8.1 but i did get this message:
pip install autosub
Collecting autosub
Downloading autosub-0.3.8.tar.gz
Collecting google-api-python-client>=1.4.2 (from autosub)
Downloading google_api_python_client-1.5.1-py2.py3-none-any.whl (50kB)
100% |################################| 51kB 1.6MB/s
Requirement already satisfied (use --upgrade to upgrade): requests>=2.3.0 in c:\users\<user>\appdata\local\progr
ams\python\python35-32\lib\site-packages (from autosub)
Collecting pysrt>=1.0.1 (from autosub)
Downloading pysrt-1.1.1.tar.gz (104kB)
100% |################################| 112kB 6.6MB/s
Collecting progressbar>=2.3 (from autosub)
Downloading progressbar-2.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\<user>\AppData\Local\Temp\pip-build-rjxli7ux\progressbar\setup.py", line 5, in <module>
import progressbar
File "C:\Users\<user>\AppData\Local\Temp\pip-build-rjxli7ux\progressbar\progressbar\__init__.py", line 59,
in <module>
from progressbar.widgets import *
File "C:\Users\<user>\AppData\Local\Temp\pip-build-rjxli7ux\progressbar\progressbar\widgets.py", line 121,
in <module>
class FileTransferSpeed(Widget):
File "c:\users\<user>\appdata\local\programs\python\python35-32\lib\abc.py", line 133, in __new__
cls = super().__new__(mcls, name, bases, namespace)
ValueError: 'format' in __slots__ conflicts with class variable
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\<user>\AppData\Local\Temp\pip-build-rjxl
i7ux\progressbar\
The reason i believe was python 3 so i tried python 2 instead and it seems to work but instead i now get this message when i try to run it:
python autosub
File "autosub", line 252
See --help for further information."
^
SyntaxError: Missing parentheses in call to 'print'
So i can't even get the help to show up :(
Is there any way I can force the program to spell out numbers (i.e, eight instead of 8) when it generates the subtitles? It is very difficult to find and replace them as any search just catches the times....
Hi,
thanks for the great library 👍
Installed autosub with python 2.7 in ubuntu 14.04 and using ffmpeg. Autosub is generating subtitle files, but the subtitle files are not accurate, its about only 5% accuracy.
I used the command as 'autosub videofile.mp4'.
Tried this video : https://www.youtube.com/watch?v=Ya6Av7uecbg
and the output is
President Obama Addresses the Nation on the BP Oil Spill.txt
Do I need to install/setup any additional libraries/plug-ins. Is any specific ffmpeg version needed. Is any machine configurations needed to change.
Please help.
its showing me this error while i was trying getting subtitles in any other language.
Hello, I'm a github newbie and have only taken a couple of Python classes so if this is in the wrong place or out of line please forgive me. I think I have 2 ideas that would make this code even more useful than in already is and probably wouldn't take to much more effort for someone as skilled as you.
For the sake of brevity I'm simply say that I've got over 12k in short clips I'm working with (less than 30 seconds each) and that's the context of what I'm looking at this code with.
Here's are my suggestions:
1.) Building in a loop to go through a folder of video files. With my minimal skills I think I could put this together but I think it could help in this main code too.
2.) Have the option to have the code rename the original video file with the first X number of characters from the sub folder file, substituting spaces with underscores. This is more complex than #1 above, but for those of us dealing with large camera dumps of video files and sorting through lots of video files like I am it would be a lifesaver. This would really be pushing my limits in programming to figure out.
With these two enhancements I think you'd have quite the script. It wouldn't be aimed at your original target but the potential audience is much larger. I don't know if you have any interest in including these features but I wanted to suggest them and see what your thoughts are.
Regardless I may take a swipe at this and see if I can hack something together to get it to work over the next couple of weeks.
Thanks for sharing your work!
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.