When downloading music from sites like SoundCloud using yt-dlp
, you may encounter OGG/Vorbis files that include metadata, such as a description. If you wish to remove this metadata, you can use the vorbiscomment utility in combination with a simple script. Here’s a guide on how to achieve this.
Using yt-dlp
Download Music from SoundCloud:
Use yt-dlp
to download the music from SoundCloud. Ensure that the downloaded music is in OGG/Vorbis format. For example:
yt-dlp -x --audio-format vorbis [SoundCloud URL]
Replace [SoundCloud URL]
with the actual URL of the SoundCloud track you want to download.
Check Metadata:
Before removing the description, check if the OGG/Vorbis file includes a description. You can use the vorbiscomment
utility for this:
vorbiscomment -l [yourfile.ogg]
If you find a “DESCRIPTION” tag in the output, it means that a description is present and can be removed.
Using the Removal Script
You can use the following script to remove the description metadata:
for f in *.ogg; do
vorbiscomment -l "$f" | sed '/^[Dd][Ee][Ss][Cc][Rr][Ii][Pp][Tt][Ii][Oo][Nn]=/,/^purl=/{/purl=/!d}' | vorbiscomment -w "$f";
echo "Removed description from $f";
done
Here’s how the script works:
- It iterates through all OGG/Vorbis files in the current directory.
- The
vorbiscomment -l '$f'
command lists the metadata tags in the file. - The
sed
command filters out all lines between the “DESCRIPTION” and “purl” tags and deletes them, effectively removing the description. - The
vorbiscomment -w '$f'
command writes the modified metadata back to the file. - Finally, it prints a message to confirm the removal of the description from each file.
After running the script, the OGG/Vorbis files will no longer contain the SoundCloud description metadata.
By following these steps, you can successfully remove SoundCloud Vorbis descriptions from OGG/Vorbis files downloaded using yt-dlp
. This can be helpful for organizing and managing your music library without the additional metadata.