YTDL Preview Audio (Legacy)
YTDL Preview Audio (Legacy) — the Old Audio Player That Still Works, and Why to Switch
- audio_file
- current_file_path
- file_info_json
- total_files_count
YTDL Preview Audio is the original audio-preview node from ComfyUI-ytdl_nodes, and it carries the "(Legacy)" tag for a reason. When the pack hit v1.0.7, the author replaced it with the unified YTDL Preview node (which handles video too), and this one is now officially deprecated - still fully functional, but marked for removal in a future version. If you're starting fresh, use the new node. If you've got old workflows, here's what this one still does and why the upgrade is a ten-second swap.
How it works
Same shape as its replacement, minus the video. You feed it the downloaded_files STRING from YTDL Downloader - newline-separated paths - plus a file_index to pick which file you're previewing. It loads the audio with torchaudio, and if that fails (say, an odd container), it falls back to running FFmpeg to convert the file to wav in a temp folder and loads that. The result comes out as a proper AUDIO tensor plus a JSON blob of metadata: file name, size in MB, duration, sample rate, and channel count. There's also an HTML audio player embedded in the node's preview so you can listen without leaving the canvas.
Outputs, in order: audio_file (AUDIO), current_file_path (STRING), file_info_json (STRING metadata), and total_files_count (INT). The file_index browsing works like the new node - bump it to step through a multi-file download, and the console prints a track list with indices.
Why migrate
The legacy node is audio-only and its output port is named audio_file; the new YTDL Preview detects audio and video automatically, uses the cleaner output name audio, and has the same inputs - so swapping is literally deleting one node and dropping in the other, then reconnecting the same wires. The only real reason to stay on this one is a workflow you don't want to touch, and since it still works, you're not in a rush. But "will be removed in future versions" is the kind of sentence you don't want to discover in an old workflow on update day.
Installing
Same pack, same install, no special deps beyond what ComfyUI already has (torch, torchaudio):
cd ComfyUI/custom_nodes
git clone https://github.com/Saganaki22/ComfyUI-ytdl_nodes
Restart and you'll find both preview nodes under audio/ytdl - this one's display name literally says "(Legacy)". One less confusing detail in this pack than you'd expect: the author marked the deprecation right in the node's display name and the README, so it's hard to miss. Grab the new YTDL Preview, keep this one only for old saved graphs.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| downloaded_files | STRING | — | |
| file_index | INT | 00–999 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| audio_file | AUDIO | — |
| current_file_path | STRING | — |
| file_info_json | STRING | — |
| total_files_count | INT | — |