Extracting ID3 Tags out of an Audio stream

Hello all

Is there a way to extract the Artist and Album information out of an internet audiostream?

What have you tried?

searched for ID3 Extractor :slight_smile:

perhaps Im not using the right search term.
I would like to have a node where I put in a URL an get the "Artist", "Album" and so on tags, that are in this stream.

you guess it, Im a complete noob :wink:

Where do you get the 'internet audiostream' from?
Do you know if the 'internet audiostream' actually contains the information?
Do you have a flow that is playing the stream?

  • if so please export the flow and attach it to a reply.

Its from a website and i have no node yet.
Im looking for a way into this.

And when I play the stream in VLC it shows the information that I want.
Stream adress is http://cc6.beheerstream.com:8151/stream

If you install ffmpeg on your system, then it will usually comes with ffprobe. It can be used to get data about various media sources.

run the following command:
ffprobe -loglevel quiet -print_format json -show_format -show_streams http://cc6.beheerstream.com:8151/stream

output:

{
    "streams": [
        {
            "index": 0,
            "codec_name": "mp3",
            "codec_long_name": "MP3 (MPEG audio layer 3)",
            "codec_type": "audio",
            "codec_tag_string": "[0][0][0][0]",
            "codec_tag": "0x0000",
            "sample_fmt": "fltp",
            "sample_rate": "44100",
            "channels": 2,
            "channel_layout": "stereo",
            "bits_per_sample": 0,
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/14112000",
            "start_pts": 0,
            "start_time": "0.000000",
            "bit_rate": "320000",
            "disposition": {
                "default": 0,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0,
                "captions": 0,
                "descriptions": 0,
                "metadata": 0,
                "dependent": 0,
                "still_image": 0
            }
        }
    ],
    "format": {
        "filename": "http://cc6.beheerstream.com:8151/stream",
        "nb_streams": 1,
        "nb_programs": 0,
        "format_name": "mp3",
        "format_long_name": "MP2/3 (MPEG audio layer 2/3)",
        "start_time": "0.000000",
        "bit_rate": "320000",
        "probe_score": 51,
        "tags": {
            "icy-notice1": "<BR>This stream requires <a href=\"http://www.winamp.com\">Winamp</a><BR>",
            "icy-notice2": "SHOUTcast DNAS/posix(linux x64) v2.5.5.733<BR>",
            "icy-name": "Radio078Synth",
            "icy-genre": "Misc",
            "icy-br": "320",
            "icy-sr": "44100",
            "icy-url": "http://www.shoutcast.com",
            "icy-pub": "1",
            "StreamTitle": "Radio078Synth - The Best Electronic Music",
            "StreamUrl": "http://"
        }
    }
}

You could run the command in the exec node and handle the json output and extract whatever data is pertinent.

1 Like

thank you.
I'll try my best

installed ffmpeg but got error:

"{"code":127,"message":"Command failed: ffprobe -loglevel quiet -print_format json -show_format -show_streams http://cc6.beheerstream.com:8151/stream\n/bin/bash: ffprobe: command not found\n"}"

Node Red runs in a Docker container on a Linux Mint installation
and as I said in the first post - I'm a noob :wink:

The key is in "container", ie. it is isolated from the rest of the system. If you want to keep running in docker, you will need to create a custom docker container, include ffmpeg and build a new image.

Or just run node-red natively then you can access the installed ffmpeg binary from node-red directly.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.