Город МОСКОВСКИЙ
00:02:47

Reel To Reel Audio Visualizer [V1]

Аватар
Боты: учимся программировать
Просмотры:
30
Дата загрузки:
02.12.2023 17:50
Длительность:
00:02:47
Категория:
Фильмы

Описание

This audio file is just an example for YouTube. The creation script will take any file with audio as input. Below you'll find the details on how the final render file is created:

* Reel to Reel model created in Solidworks
* Texturing and rendered base model with Blender 3D (BlenderKit Procedural Materials)
* Info Panel (lower right) created with Inkscape
* VU Meter background from Grabcad (https://grabcad.com/library/analog-vu-meter-1)
* VU Meter rendered with Blender 3D
* Spectrum Analyzer levels computed with librosa FFT library (Python)
* Spectrum Analyzer image frames rendered with ImageMagick
* Final composite/mp4 rendered with ffmpeg

Composite is 9 layers of images sequences, 1 audio
Layer 1: Black Background Image - 1 frame (4k)
Layer 2: Base Reel To Reel Model - 150 frames (1 revolution)
Layer 3: Tape Simulation - 1000 frames (auto scaled to audio length)
Layer 4: Middle Logo - 1 frame
Layer 5: Left VU meter
Layer 6: Right VU Meter
Layer 7: Spectrum Analyzer Image Sequence
Layer 8: Info Panel Image Sequence (SVG)
Layer 9: Front Reels, Hubs, Screws, Transport - 150 frames (1 revolution)

Render automation script will take as input, any file with an audio channel and render the completed video file. Input file must be readable by ffmpeg.

Final render with ffmpeg gets around 3.5fps at 4k resolution (3840x2160) on an 8 core/16thread Intel Core i7-11800H laptop with 64GB RAM. Laptop has a mix of NVME and SSD drives.

ffmpeg uses the RTX 3060 mobile GPU with "-hwaccel cuda -hwaccel_output_format cuda" and "-c:v h264_nvenc" for accelerated encoding.

The "tape" simulation is scaled automatically to whatever size/length the input file is. In this version, the tape doesn't cast or receive shadows, seen most noticeably in the area between the reels and the transport.

The reel rotation speed is constant, regardless of input audio length.

In this version, the left and right VU meters are the same (summed mono)

The VU meters are pre-rendered with 1000 frames for 1000 discrete audio levels from 0 to max. The Python librosa script symlinks the VU image for each frame & volume level to temp directory, used as the image sequence for final render.

Each frame of the Info Panel is created by doing a simple text replacement on the SVG template. Artist name, Title, Length, Current Time, Remaining Time fields are text replaced. The progress bar is done with a text replacement of the lower X corner of the progress bar, ranging from min to max position. Each frame of the Info Panel is output to new SVG file and used as layer 8 on the final render.

Any other questions about how the visualizer was created, drop them in the comments below!

Рекомендуемые видео