Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use it on windows? #23

Closed
tarvos21 opened this issue Jun 13, 2016 · 5 comments
Closed

How to use it on windows? #23

tarvos21 opened this issue Jun 13, 2016 · 5 comments

Comments

@tarvos21
Copy link

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.

@JeanDown123
Copy link
Contributor

JeanDown123 commented Aug 8, 2016

  1. Install Python 2.7
    https://www.python.org/ftp/python/2.7.12/python-2.7.12.msi
  2. Run cmd (Win+R)
    pip install autosub
    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"
  3. Change Name File Autosub
    Rename C:\Python27\Scripts\autosub autosub_app.py
  4. 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)
  5. Download(https://ffmpeg.zeranoe.com/builds/) and
    Copy ffmpeg.exe to C:\Python27\Scripts\
  6. Test Script C:\Python27\python.exe C:\Python27\scripts\autosub_app.py --list-languages

Auto-generating subtitles for any video file

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)

7.- Translate your Subtitles
Download Subtitle Edit https://github.com/SubtitleEdit/subtitleedit/releases
SubtitleEdit-3.4.13-Setup.zip Or VersionPortable SE3413PL.zip

  • Run SubtitleEdit.exe
  • Open Subtitle (TuVideo.srt,YouAnimeVideo.srt,YouVideo)
  • Menu-Auto-Translate-(PowerbyGoogle)
  • From(Japanese) To:English
  • Translate

@ivandrofly
Copy link

I'm stuck in step 3, I couldn't find the file named Autosub inside scripts folder. /cc @JeanDown123

@JeanDown123
Copy link
Contributor

with
C:\Python27\Scripts\pip.exe install autosub
Message Install normal is:

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

Try uninstall, after install
C:\Python27\Scripts\pip.exe uninstall autosub

Uninstalling autosub-0.3.9:
  c:\python27\lib\site-packages\autosub-0.3.9.dist-info\description.rst
  c:\python27\lib\site-packages\autosub-0.3.9.dist-info\installer
  c:\python27\lib\site-packages\autosub-0.3.9.dist-info\metadata
  c:\python27\lib\site-packages\autosub-0.3.9.dist-info\metadata.json
  c:\python27\lib\site-packages\autosub-0.3.9.dist-info\pbr.json
  c:\python27\lib\site-packages\autosub-0.3.9.dist-info\record
  c:\python27\lib\site-packages\autosub-0.3.9.dist-info\top_level.txt
  c:\python27\lib\site-packages\autosub-0.3.9.dist-info\wheel
  c:\python27\lib\site-packages\autosub\__init__.py
  c:\python27\lib\site-packages\autosub\__init__.pyc
  c:\python27\lib\site-packages\autosub\constants.py
  c:\python27\lib\site-packages\autosub\constants.pyc
  c:\python27\lib\site-packages\autosub\formatters.py
  c:\python27\lib\site-packages\autosub\formatters.pyc
  c:\python27\scripts\autosub
Proceed (y/n)? y
  Successfully uninstalled autosub-0.3.9

Your Message out?

@waseem101
Copy link

waseem101 commented Sep 18, 2016

@JeanDown123 I followed the guide everything is installed correctly 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

@tarvos21
Copy link
Author

Great! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants