{"id":24589306,"url":"https://github.com/bsstudio/web-media-converter-scripts","last_synced_at":"2025-03-17T22:04:44.888Z","repository":{"id":222832393,"uuid":"758497667","full_name":"BSStudio/web-media-converter-scripts","owner":"BSStudio","description":"Script collection for generating VOD files for HLS distribution","archived":false,"fork":false,"pushed_at":"2024-02-20T16:51:39.000Z","size":54804,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-24T08:14:38.915Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://bsstudio.github.io/web-media-converter-scripts/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BSStudio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-16T13:01:54.000Z","updated_at":"2024-02-19T21:50:48.000Z","dependencies_parsed_at":"2024-02-19T11:30:55.362Z","dependency_job_id":null,"html_url":"https://github.com/BSStudio/web-media-converter-scripts","commit_stats":null,"previous_names":["bsstudio/ffmpeg-template","bsstudio/web-media-converter-scripts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BSStudio%2Fweb-media-converter-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BSStudio%2Fweb-media-converter-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BSStudio%2Fweb-media-converter-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BSStudio%2Fweb-media-converter-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BSStudio","download_url":"https://codeload.github.com/BSStudio/web-media-converter-scripts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244117619,"owners_count":20400742,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-24T08:14:50.113Z","updated_at":"2025-03-17T22:04:44.857Z","avatar_url":"https://github.com/BSStudio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# web-media-converter-scripts\n\nThis repo stores a template for\n * generating VOD (Video On Demand) files for the bsstudio.hu project\n * generating optimised images for the bsstudio.hu web project\n\n# Usage\n\n## Convert image\n![./convert-image.py ./sample/original.jpeg ./docs/image](./docs/demo/image.gif)\n1. The first argument is the path to the original image.\n2. The second (optional) argument is the path to the output directory.\n   It's the current directory by default.\n\n## Convert video\n![./convert-video.py ./sample/original.mp4 ./docs/video](./docs/demo/video.gif)\n1. The first argument is the path to the original video.\n2. The second (optional) argument is the path to the output directory.\n   It's the current directory by default.\n\n# Sample media file\n\n## Video\nThe sample media file is a copy of the Big Buck Bunny movie,\nwhich is licensed under the Creative Commons Attribution 3.0 license.\nThe original file can be found at https://peach.blender.org/download/\n\nI used the following ffmpeg command to keep only the first 30 seconds of the movie\n```bash\ncurl -O http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4\nffmpeg -i bbb_sunflower_1080p_30fps_normal.mp4 -t 30 -c copy ./media/original.mp4\nrm bbb_sunflower_1080p_30fps_normal.mp4\n```\n\n## Photo\nAn image I took with my phone in Connemara, Ireland.  \n![Original photo](./sample/original.jpeg)\n`iPhone 15 Pro f/1.8 1/7092 6.86mm ISO80`\n\n# Generated formats\nThe attempts to follow Apple's recommendations for HTTP Live Streaming (HLS) format.\nhttps://developer.apple.com/streaming/examples/\n\n * 8 video variants\n   * Gear 1 - 480x270 @ 775 kbps\n   * Gear 2 - 640x360 @ 1.2 Mbps\n   * Gear 3 - 768x432 @ 1.5 Mbps\n   * Gear 4 - 960x540 @ 2.5 Mbps\n   * Gear 5 - 1280x720 @ 3.5 Mbps\n   * Gear 6 - 1920x1080 @ 5 Mbps\n   * Gear 7 - 1920x1080 @ 6.5 Mbps\n   * Gear 8 - 1920x1080 @ 8 Mbps\n * 1 audio variant\n   * original audio (this will change)\n\n# Generated files\n## Video\nA HSL (HTTP Live Streaming) web player should be pointed at the ./prog_index.m3u8 file.  \nAfter that the web player can figure out what format the client can play and start streaming the video.\n```\n📁 ./\n├─ 📄️ prog_index.m3u8\n├─ 📁️ a1/\n│  ├─ 📄️ prog_index.m3u8\n│  ├─ 🎵️ int0.mp4\n│  ├─ 🎵️ fileSequence0.aac\n│  ├─ 🎵️ fileSequence1.aac\n│  ├─ [...]\n├─ 📁️ v1/\n│  ├─ 📄️ prog_index.m3u8\n│  ├─ 🎞️ int1.mp4\n│  ├─ 🎞️ fileSequence0.ts\n│  ├─ 🎞️ fileSequence1.ts\n│  ├─ [...]\n├─ 📁️ v2/\n│  ├─ 📄️ prog_index.m3u8\n│  ├─ 🎞️ int2.mp4\n│  ├─ 🎞️ fileSequence0.ts\n│  ├─ 🎞️ fileSequence1.ts\n│  ├─ [...]\n├─ 📁️ v3/\n│  ├─ 📄️ prog_index.m3u8\n│  ├─ 🎞️ int1.mp4\n│  ├─ 🎞️ fileSequence0.ts\n│  ├─ 🎞️ fileSequence1.ts\n│  ├─ [...]\n├─ 📁️ v4/\n│  ├─ 📄️ prog_index.m3u8\n│  ├─ 🎞️ int4.mp4\n│  ├─ 🎞️ fileSequence0.ts\n│  ├─ 🎞️ fileSequence1.ts\n│  ├─ [...]\n├─ 📁️ v5/\n│  ├─ 📄️ prog_index.m3u8\n│  ├─ 🎞️ int5.mp4\n│  ├─ 🎞️ fileSequence0.ts\n│  ├─ 🎞️ fileSequence1.ts\n│  ├─ [...]\n├─ 📁️ v6/\n│  ├─ 📄️ prog_index.m3u8\n│  ├─ 🎞️ int6.mp4\n│  ├─ 🎞️ fileSequence0.ts\n│  ├─ 🎞️ fileSequence1.ts\n│  ├─ [...]\n├─ 📁️ v7/\n│  ├─ 📄️ prog_index.m3u8\n│  ├─ 🎞️ int7.mp4\n│  ├─ 🎞️ fileSequence0.ts\n│  ├─ 🎞️ fileSequence1.ts\n│  ├─ [...]\n├─ 📁️ v8/\n│  ├─ 📄️ prog_index.m3u8\n│  ├─ 🎞️ int8.mp4\n│  ├─ 🎞️ fileSequence0.ts\n│  ├─ 🎞️ fileSequence1.ts\n│  ├─ [...]\n```\n\n## Photo\n```\n📁 ./\n├─ 🖼️️ image-xlg.avif\n├─ 🖼️️ image-xlg.webp\n├─ 🖼️️ image-xlg.jpeg\n├─ 🖼️️ image-lg.avif\n├─ 🖼️️ image-lg.webp\n├─ 🖼️️ image-lg.jpeg\n├─ 🖼️️ image-md.avif\n├─ 🖼️️ image-md.webp\n├─ 🖼️️ image-md.jpeg\n├─ 🖼️️ image-sm.avif\n├─ 🖼️️ image-sm.webp\n├─ 🖼️️ image-sm.jpeg\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsstudio%2Fweb-media-converter-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbsstudio%2Fweb-media-converter-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsstudio%2Fweb-media-converter-scripts/lists"}