SubTube is a powerful web application that allows users to download, view, and copy subtitles from YouTube videos in various formats. Built with Flask and modern web technologies, it offers a seamless experience for accessing subtitle content without requiring advanced technical knowledge.
- Fixed Mobile Copy Functionality: Resolved an issue where the "Copy Arabic Text" and "Copy English Text" buttons weren't working properly on mobile browsers, particularly Google Chrome. The fix implements a special modal popup for mobile devices with a dedicated copy button that works across different mobile browsers and platforms.
- Improved Cross-Browser Compatibility: Enhanced the clipboard functionality to work properly on both desktop and mobile browsers using a fallback mechanism when the standard Clipboard API isn't available.
- Features
- Installation & Usage
- How to Use
- Requirements
- Development
- Contributing
- License
- Author
- Support My Work
- π Multi-format Support: Download subtitles in SRT, VTT, or TXT format
- π Language Selection: Support for all subtitle languages available on YouTube videos
- π RAW Text Display: View and copy subtitle text directly in the browser without downloading
- π Quick Copy Buttons: Copy English or Arabic subtitles directly with a single click (v1.1.0+)
- π Smart Subtitle Detection: Automatically tries different subtitle variants if the primary one isn't available
- π± Responsive Design: Works seamlessly on desktop and mobile devices
- π Easy URL Pasting: Paste button for quick URL input from clipboard
- π¨ Modern UI: Clean and intuitive interface built with Tailwind CSS
- π Cross-platform Compatibility: Runs on all major operating systems via Docker
- π Fast and Lightweight: Minimal resource usage for optimal performance
-
Clone the repository:
git clone https://github.com/Devehab/subtube.git cd subtube
-
Create and activate a virtual environment (optional but recommended):
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install required dependencies:
pip3 install -r requirements.txt
-
Run the application:
python3 app.py
-
Access the application: Open your browser and navigate to
http://127.0.0.1:5000
-
Build the Docker image:
docker build -t subtube:latest .
-
Run the container:
docker run -p 5000:5000 subtube:latest
-
Access the application: Open your browser and navigate to
http://localhost:5000
-
Start the service:
docker-compose up -d
-
Access the application: Open your browser and navigate to
http://localhost:5000
-
Stop the service:
docker-compose down
SubTube is available in multiple Docker image versions:
-
v1.1.1 (Latest with Fixed Mobile Copy Functionality):
devehab/subtube:v1.1.1
- Includes the fix for mobile copying functionality and improved cross-browser compatibility
- Provides a seamless experience for accessing subtitle content on both desktop and mobile devices
-
v1.1.0 (Original Version with Quick Copy Buttons):
devehab/subtube:v1.1.0
- Original version with the new "Copy English Text" and "Copy Arabic Text" buttons
- Provides instant subtitle copying with a single click
- Shows whether the copied subtitles are original or auto-generated
-
v1.0.0 (Original Version):
devehab/subtube:latest
- Original version without the quick copy buttons
To use a specific version, update your docker-compose.yml file:
services:
subtube:
image: devehab/subtube:v1.1.1 # or :latest for v1.0.0
# other configuration...
SubTube v1.1.1 supports both ARM (Apple Silicon) and AMD64 architectures. To use the multi-architecture build:
services:
subtube:
image: devehab/subtube:v1.1.1
platform: linux/amd64,linux/arm64
# other configuration...
Build and publish for both ARM64 (Apple Silicon/M1/M2) and AMD64 architectures:
-
Enable BuildKit:
export DOCKER_BUILDKIT=1
-
Create and use a multi-architecture builder:
docker buildx create --name mybuilder --use
-
Build for multiple platforms:
docker buildx build --platform linux/amd64,linux/arm64 -t yourusername/subtube:latest .
-
Build and push to Docker Hub (optional):
docker buildx build --platform linux/amd64,linux/arm64 -t yourusername/subtube:latest --push .
- Enter a valid YouTube video URL in the input field (or use the paste button)
- Click "Fetch Subtitles" to retrieve available subtitle languages
- Select your preferred language from the options
- Choose your preferred subtitle format (SRT, VTT, or TXT) to download
- Alternatively, click "Show RAW Text" to view and copy the subtitles directly in the browser
- Python 3.6+
- Flask
- youtube_transcript_api
- requests
- Internet connection
For Docker deployment:
- Docker Engine 19.03.0+
- Docker Compose 1.27.0+ (for compose method)
SubTube is built with the following technologies:
- Backend: Python with Flask framework
- Frontend: HTML, JavaScript, and Tailwind CSS
- API: youtube_transcript_api for fetching YouTube subtitles
- Containerization: Docker for cross-platform deployment
Contributions are welcome! Feel free to fork the repository and submit pull requests. For major changes, please open an issue first to discuss what you would like to change.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
- Ehab Kahwati - GitHub
If you find SubTube useful in your daily workflow, please consider supporting my work! I'm passionate about creating open-source tools that solve real problems.
As an independent developer, I dedicate my time to building and maintaining various open-source web applications and Chrome extensions that are freely available to everyone. Your support helps me:
- β¨ Continue developing new features for SubTube
- π Fix bugs and maintain existing projects
- π Create new open-source tools for the community
- π‘ Explore innovative ideas and technologies
Even a small contribution goes a long way in supporting the development of tools that make the internet more accessible and useful for everyone.
Thank you for your support! β€οΈ
Made with β€οΈ by Ehab Kahwati