--- license: cc-by-4.0 task_categories: - video-classification - feature-extraction - text-to-video language: - en - ne tags: - youtube - creative-commons - video-links - multimodal - metadata - nepal - dataset size_categories: - 10K ⚠️ **Important Legal & License Notice:** > **Links and metadata only, no video files included. Each video keeps its original Creative Commons license; credit the creators.** --- ## 📌 Dataset Overview * **Total Records:** `14,600` unique video links and metadata records * **Categories:** 20 balanced categories with **exactly 730 videos per category** (5.00% each) * **License:** Creative Commons Attribution (CC-BY / CC-BY-SA) * **Formats Provided:** `metadata.jsonl` (JSON Lines) and `metadata.csv` (Comma-Separated Values) * **Duration Filter:** Strictly filtered between **5 seconds and 20 minutes (1,200 seconds)** — zero ultra-short clips (<5s) and zero livestreams/full movies (>20min) * **Deduplication:** 100% deduplicated by unique `video_id` * **Geographic & Cultural Diversity:** Global coverage with dedicated focus on Nepal (trekking, Himalayan mountain trails, festivals like Dashain/Tihar, Newari heritage, rural villages, local markets). --- ## 🗂️ Categories & Distribution | Category | Description & Scope | Video Count | % of Dataset | |:---|:---|---:|---:| | `animals` | Safari wildlife, pets, birds of prey, marine life, domestic animals | 730 | 5.00% | | `art` | Oil painting, watercolors, sculpture, printmaking, calligraphy, murals | 730 | 5.00% | | `city_life` | Walking tours, urban architecture, street atmosphere, transit, skylines | 730 | 5.00% | | `cooking` | Recipes, sourdough baking, curry making, campfire meals, culinary skills | 730 | 5.00% | | `dance` | Ballet, hip-hop, contemporary, traditional folk, tango, salsa, bboy | 730 | 5.00% | | `diy_crafts` | Woodworking, pottery, leathercraft, knitting, origami, blacksmithing | 730 | 5.00% | | `education` | Mathematics, history, physics, philosophy, linguistics, biology, astronomy | 730 | 5.00% | | `everyday_scenes` | Rain against windows, coffee rituals, quiet libraries, peaceful gardens | 730 | 5.00% | | `fashion` | Sustainable fashion, handloom weaving, vintage styling, bespoke tailoring | 730 | 5.00% | | `festivals_culture` | Lantern festivals, street carnivals, folk pageants, solstice bonfires | 730 | 5.00% | | `food` | Street food night markets, artisan bread, coffee culture, cheese making | 730 | 5.00% | | `gaming` | Indie game showcases, retro speedruns, flight simulators, chess, sandboxes | 730 | 5.00% | | `music` | Fingerstyle guitar, piano solos, ambient modular synths, lofi beats | 730 | 5.00% | | `nature` | Mountain landscapes, ocean waves, waterfalls, forest wilderness, 4K vistas | 730 | 5.00% | | `nepal_content` | Nepali culture, Annapurna/Everest trekking, Kathmandu, villages, festivals | 730 | 5.00% | | `science` | Chemical reactions, deep space astrophotography, fluid dynamics, botany | 730 | 5.00% | | `sports` | Skateboarding, rock climbing, ocean surfing, basketball, cycling, workouts | 730 | 5.00% | | `technology` | Linux OS, electronics soldering, 3D printing, robotics, custom keyboards | 730 | 5.00% | | `travel` | Solo backpacking, historic towns, road trips, islands, scenic railways | 730 | 5.00% | | `vehicles` | Classic car restoration, motorcycles, ebikes, train cab rides, aviation | 730 | 5.00% | | **TOTAL** | **20 Balanced Categories** | **14,600** | **100.00%** | --- ## 🏷️ Field Explanations Both `metadata.jsonl` and `metadata.csv` contain the following 13 metadata fields: | Field Name | Type | Example | Description | |:---|:---|:---|:---| | `video_id` | `string` | `QT97HgUUW8w` | Unique 11-character YouTube video identifier | | `url` | `string` | `https://www.youtube.com/watch?v=QT97HgUUW8w` | Canonical YouTube watch URL | | `title` | `string` | `Unreal Sunrise at Khumai Danda \| Nepal Trek` | Full video title | | `description` | `string` | `Join our trek to Khumai and Korchan hilltop...` | First 500 characters of the video description | | `channel_name` | `string` | `Anmol Aashish` | Channel or creator display name | | `channel_id` | `string` | `UCx7...` | Unique YouTube channel identifier | | `category` | `string` | `nepal_content` | One of the 20 target categories | | `duration_seconds` | `integer` | `908` | Video duration in seconds (5s to 1200s) | | `language` | `string` | `ne` | Detected language (`en`, `ne`, `ja`, etc.) | | `upload_date` | `string` | `2024-03-15` | ISO 8601 upload date (`YYYY-MM-DD`) | | `view_count` | `integer` | `45200` | Recorded view count | | `license` | `string` | `Creative Commons (CC-BY)` | Creative Commons license declaration | | `tags` | `list / string` | `["sunrise", "khumai", "nepal", "trek"]` | Topical keywords associated with the video | --- ## 💻 Quickstart: Loading the Dataset ### Method 1: Using Hugging Face `datasets` ```python from datasets import load_dataset # Load directly from Hugging Face dataset = load_dataset("sushan98/youtube-creative-commons-15k", split="train") print(f"Loaded {len(dataset):,} video metadata entries!") sample = dataset[0] print(f"Title: {sample['title']}") print(f"Category: {sample['category']}") print(f"URL: {sample['url']}") print(f"Duration: {sample['duration_seconds']}s") ``` ### Method 2: Using Pandas ```python import pandas as pd # Read CSV directly df = pd.read_csv("https://huggingface.co/datasets/sushan98/youtube-creative-commons-15k/raw/main/metadata.csv") print(df.groupby("category")["video_id"].count()) ``` --- ## ⬇️ How to Download Videos with `yt-dlp` You can use [`yt-dlp`](https://github.com/yt-dlp/yt-dlp) to download videos or extract audio locally. ### 1. Download a Single Video (MP4, Max 720p/1080p): ```bash yt-dlp -f "bestvideo[height<=720][ext=mp4]+bestaudio[ext=m4a]/best[height<=720][ext=mp4]/best" \ -o "downloads/%(title)s.%(ext)s" \ "https://www.youtube.com/watch?v=QT97HgUUW8w" ``` ### 2. Batch Download Script in Python: ```python import json import subprocess import os os.makedirs("downloads", exist_ok=True) # Read metadata.jsonl with open("metadata.jsonl", "r", encoding="utf-8") as f: for i, line in enumerate(f): item = json.loads(line) url = item["url"] cat = item["category"] title = item["title"] print(f"[{i+1}/14600] Downloading [{cat}]: {title} ({url})") # Run yt-dlp to download video subprocess.run([ "yt-dlp", "-f", "bestvideo[height<=720]+bestaudio/best[height<=720]", "-o", f"downloads/{cat}/%(id)s.%(ext)s", "--max-filesize", "150M", "--no-playlist", url ]) if i >= 5: # Sample run break ``` --- ## 🛠️ Reproducing or Resuming the Collection The companion script `collector.py` provides a complete, self-healing, resumable collector: 1. **API Mode:** Uses YouTube Data API v3 (`YOUTUBE_API_KEY`) with automatic daily quota tracking (10,000 units/day: 100 units/search, 1 unit/videos.list). 2. **Direct Engine:** High-performance multi-threaded search using Creative Commons protobuf filter (`params='EgIwAQ=='`). 3. **Resumable Storage:** SQLite database (`dataset.db`) checkpoints progress automatically. Run the collector: ```bash python collector.py --target 730 --repo-id sushan98/youtube-creative-commons-15k ``` --- ## 🛡️ License & Attribution **Links and metadata only, no video files included. Each video keeps its original Creative Commons license; credit the creators.** Metadata compilation released under CC-BY 4.0.