Skip to content
Snippets Groups Projects
Commit ac60fd03 authored by David Trattnig's avatar David Trattnig
Browse files

Test: Metadata extraction for file and stream

parent e65d0ad7
No related branches found
No related tags found
1 merge request!3Liquidsoap 2 migration
#!/usr/bin/env liquidsoap
#
# Aura Engine (https://gitlab.servus.at/aura/engine)
#
# Copyright (C) 2017-now() - The Aura Engine Team.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
%include "base_config.liq"
settings.frame.audio.samplerate.set(44100)
# Metadata on file
input_fs = single(id="fs", "assets/audio.mp3")
def process(metadata) =
print(json.stringify(metadata))
end
input_fs.on_metadata(process)
output.dummy(id="dummy", input_fs)
#!/usr/bin/env liquidsoap
#
# Aura Engine (https://gitlab.servus.at/aura/engine)
#
# Copyright (C) 2017-now() - The Aura Engine Team.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
%include "base_config.liq"
settings.frame.audio.samplerate.set(44100)
# Metadata on stream
stream_url = "https://securestream.o94.at/live.mp3"
annotated_uri = 'in_http_0.url annotate:current_show_name="XXX":#{stream_url}'
input_stream = input.http(id="input_stream", start=false, stream_url)
def process(metadata) =
print(json.stringify(metadata))
end
input_stream.on_metadata(process)
output.dummy(id="dummy", input_stream, fallible=true)
input_stream.start()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment