{"id":34776832,"url":"https://github.com/bcc-code/bcc-media-audio-vizualizer","last_synced_at":"2026-05-21T20:36:24.645Z","repository":{"id":312688162,"uuid":"1048355745","full_name":"bcc-code/bcc-media-audio-vizualizer","owner":"bcc-code","description":"Simple python container to generate video vizualization of an audio file","archived":false,"fork":false,"pushed_at":"2025-09-01T12:20:51.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-01T12:38:51.942Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bcc-code.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-01T10:11:54.000Z","updated_at":"2025-09-01T12:20:54.000Z","dependencies_parsed_at":"2025-09-01T12:38:53.566Z","dependency_job_id":"55550bef-c3c5-48ed-b7ce-472b7e0df60f","html_url":"https://github.com/bcc-code/bcc-media-audio-vizualizer","commit_stats":null,"previous_names":["bcc-code/bcc-media-audio-vizualizer"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/bcc-code/bcc-media-audio-vizualizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcc-code%2Fbcc-media-audio-vizualizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcc-code%2Fbcc-media-audio-vizualizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcc-code%2Fbcc-media-audio-vizualizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcc-code%2Fbcc-media-audio-vizualizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcc-code","download_url":"https://codeload.github.com/bcc-code/bcc-media-audio-vizualizer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcc-code%2Fbcc-media-audio-vizualizer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33313867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T12:23:38.849Z","status":"ssl_error","status_checked_at":"2026-05-21T12:22:11.673Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-12-25T08:34:35.946Z","updated_at":"2026-05-21T20:36:24.634Z","avatar_url":"https://github.com/bcc-code.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Music Visualizer Video Generator\n\nA Python-based music visualizer that creates stunning bar-style visualizations and renders them to video files. Available as both a command-line tool and REST API service.\n\n## Features\n\n- **Bar-style visualization** with frequency-responsive heights\n- **Beautiful color gradients** from magenta through purple, blue, cyan, to red/orange\n- **High-quality video output** with customizable resolution and frame rate\n- **Audio synchronization** with automatic audio track addition\n- **Optimized rendering** with pre-computed spectrum analysis\n- **REST API** with background job processing\n\n## Installation\n\n1. Install Python dependencies:\n```bash\npip install -r requirements.txt\n```\n\n2. Install FFmpeg (required for audio integration):\n- **macOS**: `brew install ffmpeg`\n- **Ubuntu/Debian**: `sudo apt install ffmpeg`\n- **Windows**: Download from https://ffmpeg.org/\n\n## Usage\n\n### Command Line Usage\n\n#### Basic Usage\n```bash\npython video_visualizer.py input_audio.mp3\n```\n\n#### Advanced Options\n```bash\npython video_visualizer.py input_audio.mp3 -o my_visualization.mp4 -w 1920 -b 1080 -f 60\n```\n\n#### Parameters\n- `input_audio`: Path to your audio file (MP3, WAV, FLAC, OGG supported)\n- `-o, --output`: Output video filename (default: visualization.mp4)\n- `-w, --width`: Video width in pixels (default: 1920)\n- `-b, --height`: Video height in pixels (default: 1080)\n- `-f, --fps`: Video frame rate (default: 50)\n- `--no-audio`: Generate video without audio track\n\n#### Examples\n\nCreate a 4K visualization at 60fps:\n```bash\npython video_visualizer.py song.mp3 -o song_4k.mp4 -w 3840 -b 2160 -f 60\n```\n\nGenerate silent video (video only):\n```bash\npython video_visualizer.py song.mp3 -o silent_viz.mp4 --no-audio\n```\n\n### REST API Usage\n\nStart the Flask server:\n```bash\npython app.py\n```\n\nThe API will be available at `http://localhost:5000`\n\n#### API Endpoints\n\n**POST /api/visualize**\nCreate a visualization job from a local audio file.\n\nRequest body:\n```json\n{\n  \"audio_path\": \"/path/to/audio.mp3\",\n  \"output_path\": \"/path/to/output.mp4\",\n  \"width\": 1920,\n  \"height\": 1080,\n  \"fps\": 50,\n  \"include_audio\": true\n}\n```\n\nResponse:\n```json\n{\n  \"job_id\": \"uuid-string\",\n  \"status\": \"pending\",\n  \"message\": \"Visualization job started\",\n  \"output_path\": \"/path/to/output.mp4\"\n}\n```\n\n**GET /api/status/{job_id}**\nCheck the status of a visualization job.\n\nResponse:\n```json\n{\n  \"job_id\": \"uuid-string\",\n  \"status\": \"completed\",\n  \"progress\": 100,\n  \"message\": \"Visualization completed successfully\",\n  \"output_file\": \"/path/to/output.mp4\",\n  \"created_at\": 1234567890\n}\n```\n\n**GET /api/jobs**\nList all jobs.\n\n**GET /api/health**\nHealth check endpoint.\n\n#### Job Status Values\n- `pending`: Job created but not started\n- `processing`: Job is currently running\n- `completed`: Job finished successfully\n- `failed`: Job encountered an error\n\n## How It Works\n\n1. **Audio Analysis**: Uses librosa to perform Short-Time Fourier Transform (STFT) on the input audio\n2. **Frequency Mapping**: Maps frequency data to visual bars with emphasis on lower frequencies (up to 8kHz)\n3. **Color Generation**: Creates smooth color gradients across 120 bars\n4. **Frame Generation**: Renders each video frame with PIL for precise drawing\n5. **Video Encoding**: Uses OpenCV to encode frames and FFmpeg to add audio\n\n## Technical Details\n\n- **Bars**: 30 frequency bars across the width\n- **Frequency Range**: 0-8kHz (optimized for music visualization)\n- **Color Palette**: White bars on black background with optional gradient support\n- **Audio Processing**: 44.1kHz sample rate with 8192-point FFT\n- **Video Codec**: MP4V with AAC audio\n\n## Troubleshooting\n\n### Common Issues\n\n**\"Error: Could not open video writer\"**\n- Ensure you have write permissions in the output directory\n- Try a different output filename\n\n**\"Warning: Could not add audio\"**\n- Install FFmpeg: the visualizer needs it to combine video and audio\n- Check that FFmpeg is in your system PATH\n\n**Slow rendering**\n- Reduce resolution with `-w` and `-b` parameters\n- Lower frame rate with `-f` parameter\n- Use shorter audio files for testing\n\n### Performance Tips\n\n- **Resolution vs Speed**: 1920x1080 @ 50fps renders much faster than 4K @ 60fps\n- **Audio Length**: 3-minute songs typically take 2-5 minutes to render\n- **Memory Usage**: Longer songs require more RAM for spectrum analysis\n\n## License\n\nThis project is open source. Feel free to modify and distribute.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcc-code%2Fbcc-media-audio-vizualizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcc-code%2Fbcc-media-audio-vizualizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcc-code%2Fbcc-media-audio-vizualizer/lists"}