Skip to content

Repository files navigation

Social Media Video Downloader

A modern web-based video downloader that supports TikTok, Instagram, and Facebook videos. Built with Flask and featuring a responsive, user-friendly interface.

Features

  • 🎵 TikTok Videos: Download with or without watermark
  • 📸 Instagram Posts: Download videos and reels
  • 📘 Facebook Videos: Download videos and posts
  • 📱 Mobile Friendly: Responsive design that works on all devices
  • 🎨 Modern UI: Beautiful, intuitive interface
  • Fast Downloads: Optimized for quick video processing
  • 🔍 Auto-Detection: Automatically detects platform from URL

Installation

Prerequisites

  • Python 3.7 or higher
  • pip (Python package installer)

Setup

  1. Clone or download the project files

    # If you have git installed
    git clone <repository-url>
    cd social-video-downloader
  2. Create a virtual environment (recommended)

    python -m venv venv
    
    # On Windows
    venv\Scripts\activate
    
    # On macOS/Linux
    source venv/bin/activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Run the application

    python app.py
  5. Open your browser Navigate to http://localhost:5000

Usage

Web Interface

  1. Select Platform: Choose TikTok, Instagram, or Facebook
  2. Paste URL: Enter the video URL you want to download
  3. Configure Options:
    • For TikTok: Choose whether to download with or without watermark
    • For Instagram/Facebook: No additional options needed
  4. Download: Click the download button and wait for processing
  5. Save File: Click the download link to save the video to your device

Supported URL Formats

  • TikTok: https://www.tiktok.com/@username/video/1234567890
  • Instagram: https://www.instagram.com/p/ABC123/ or https://www.instagram.com/reel/ABC123/
  • Facebook: https://www.facebook.com/watch/?v=1234567890 or https://fb.watch/ABC123/

API Endpoints

The application also provides REST API endpoints:

  • POST /download - Download a video
  • POST /detect_platform - Detect platform from URL
  • GET /download_file/<filename> - Serve downloaded files

File Structure

social-video-downloader/
├── app.py                 # Main Flask application
├── requirements.txt       # Python dependencies
├── templates/
│   └── index.html        # Web interface template
├── downloads/            # Downloaded videos (created automatically)
└── README.md            # This file

Configuration

Environment Variables

You can customize the application by setting these environment variables:

  • FLASK_ENV: Set to development for debug mode
  • SECRET_KEY: Change the Flask secret key for production
  • MAX_CONTENT_LENGTH: Maximum file size limit (default: 16MB)

Production Deployment

For production deployment:

  1. Set environment variables:

    export FLASK_ENV=production
    export SECRET_KEY=your-secret-key-here
  2. Use a production WSGI server:

    pip install gunicorn
    gunicorn -w 4 -b 0.0.0.0:5000 app:app
  3. Configure reverse proxy (nginx recommended):

    server {
        listen 80;
        server_name your-domain.com;
        
        location / {
            proxy_pass http://127.0.0.1:5000;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
        }
    }

Troubleshooting

Common Issues

  1. "No downloadable URL found"

    • The video might be private or restricted
    • Try using a different video URL
    • For TikTok, try the watermark option
  2. "API error"

    • The external API might be temporarily unavailable
    • Wait a few minutes and try again
    • Check your internet connection
  3. "Invalid URL format"

    • Make sure the URL is complete and properly formatted
    • Copy the URL directly from the browser address bar
  4. Download fails

    • Check if the video is publicly accessible
    • Some videos might be region-restricted
    • Try a different video to test if the service is working

Performance Tips

  • Use a stable internet connection for better download speeds
  • Close other bandwidth-intensive applications during downloads
  • For large videos, be patient as processing may take longer

Legal Notice

This tool is for educational and personal use only. Please respect the terms of service of the platforms you're downloading from:

Always ensure you have permission to download and use the content, and respect copyright laws in your jurisdiction.

Contributing

Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.

License

This project is open source and available under the MIT License.

Support

If you encounter any issues or have questions:

  1. Check the troubleshooting section above
  2. Search for existing issues in the project repository
  3. Create a new issue with detailed information about your problem

Happy downloading! 🎉

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages