Giter Club home page Giter Club logo

video2pdf's Introduction

Video2PDF

適合將任何線上影片、課程壓制成一格一格播放的 PDF

pre-Installation

需要先安裝 moviepy

pip install moviepy

執行

功能 1. 壓制

python main.py xxx.mp4

  • 需要兩個檔案 mp4, srt (不管有沒有內嵌字幕檔,都需要 srt 當時間參考點)
  • srt 必須是 xxx.zh.srt
  • 將同名的 mp4 與同名的 srt 放在一起,執行 python main.py xxx.mp4 等待一定時間即會產生 pdf
  • 如果影片已經有預設 srt 不需 srt 壓制進去只需要檔參考點,請用 python main.py xxx.mp4 --embed

功能 2. 下載 Youtube 影片並下載字幕、翻譯

python you_dt.py [youtube_url]

功能 3. 純翻譯字幕

python translate_srt.py xxxx.srt

注意事項

  • 檔案太大會遇到同時開啟個數限制
  • 先執行 ulimit -n 4096 可以解決

不喜歡指定字體可以換

執行 python font.py 察看你有哪些 font 可以用

推薦工具

TODO

  • 雙語字幕
  • 多核 CPU 平行處理
  • Streamlit UI 介面
  • 向量檢索
  • PDF searchable

video2pdf's People

Contributors

xdite avatar ericfu0613 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.