savonet / liquidsoap

Liquidsoap is a statically typed scripting general-purpose language with dedicated operators and backend for all thing media, streaming, file generation, automation, HTTP backend and more.
http://liquidsoap.info
GNU General Public License v2.0
1.45k stars 131 forks source link

Error 8: Unsupported format: %mp3() #3934

Closed anoniniarz closed 6 months ago

anoniniarz commented 6 months ago

I upgraded from 2.0.2 to 2.2.3 using opam. liquidsoap was working kinda fina (was playing music, but metadata was not working), so I decided to upgrade using opam hoping that it will fix this issue. And now I am getting error about unsupported format, no matter what format I am using (I tried with opus and vorbis, same error). Here is my config

set("log.level", 3)

playlist = playlist.safe("playlist.m3u")

output.icecast(
  %mp3(bitrate=128),  
  host = "127.0.0.1",
  port = ,
  mount = "/mount,
  password = "pasword",
  fallible=true,
  send_icy_metadata = true,
  playlist
)

What am I doing wrong? My machine is running Ubuntu 22.04

vitoyucepi commented 6 months ago

Hi @anoniniarz, I suppose you have build liquidsoap without mp3 support. Can you paste the liquidsoap --build-config?

If you're not very familiar with opam, there are some other options for ubuntu 22.04.

  1. Install from the release artifact package. https://github.com/savonet/liquidsoap/releases/tag/v2.2.5
  2. Use the container image. https://hub.docker.com/r/savonet/liquidsoap
anoniniarz commented 6 months ago

Hello @vitoyucepi , thanks for fast reply! I indeed did not install mp3 support, I wam not familiar with opam and assumed that it could use libraries from system, apparently it does not and after installing them it works now. But issue with title persists. Earlier it was sending "Unknown" title to icecast, now it's just empty string. How do I fix this? I used this command to install

opam install taglib mad lame vorbis cry samplerate liquidsoap.2.3.3

do I need something else for metadata?

vitoyucepi commented 6 months ago

It would be very helpful in debugging this problem if you could share

  1. `liquidsoap --build-config' so I can check which modules are enabled.
  2. `opam list' to check the list of installed opam packages.

opam and assumed that it could use libraries from system

Most packages rely on system libraries, but liquidsoap uses ocaml interfaces for them. lame is one of these interfaces. By the way, why did you install liquidsoap 2.2.3 instead of 2.2.5?

anoniniarz commented 6 months ago

Here is output from --build-config


 * Compilation options
   - Release build       : false
   - Git SHA             : (none)
   - OCaml version       : 5.2.0
   - OS type             : Unix
   - Libs versions       : angstrom=0.16.0 bigstringaf=0.9.1 bytes=[distributed with OCaml 4.02 or above] camlp-streams camomile.lib=2.0 cry=1.0.1 curl=0.9.2 dtools=0.4.5 dune-build-info=3.15.2 dune-private-libs.dune-section=3.15.2 dune-site=3.15.2 dune-site.private=3.15.2 duppy=0.9.3 fileutils=0.6.4 gen=1.1 lame=0.3.7 liquidsoap-lang=2.2.3 liquidsoap-lang.console=2.2.3 liquidsoap_builtins liquidsoap_core liquidsoap_lame liquidsoap_mad liquidsoap_ogg liquidsoap_optionals liquidsoap_oss liquidsoap_runtime liquidsoap_samplerate liquidsoap_taglib liquidsoap_vorbis mad=0.5.3 menhirLib=20231231 metadata=0.3.0 mm=0.8.5 mm.audio=0.8.5 mm.base=0.8.5 mm.image=0.8.5 mm.midi=0.8.5 mm.video=0.8.5 ogg=0.7.4 ogg.decoder=0.7.4 pcre=7.5.0 ppx_string.runtime=v0.17.0 samplerate=0.1.6 sedlex=3.2 seq=[distributed with OCaml 4.07 or above] stdlib-shims=0.3.0 str=5.2.0 stringext=1.6.0 taglib=0.3.10 threads=5.2.0 unix=5.2.0 uri=4.4.0 vorbis=0.8.0 vorbis.decoder=0.8.0
   - architecture        : amd64
   - host                : x86_64-pc-linux-gnu
   - target              : x86_64-pc-linux-gnu
   - system              : linux
   - ocamlopt_cflags     : -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -pthread
   - native_c_compiler   : gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -pthread -D_FILE_OFFSET_BITS=64
   - native_c_libraries  : -lm -lpthread

 * Configured paths
   - mode              : default
   - standard library  : (set by dune-site)
   - scripted binaries : (set by dune-site)
   - rundir            : (set by dune-site)
   - logdir            : (set by dune-site)
   - camomile files    : (set by dune-site)

 * Supported input formats
   - MP3               : yes
   - AAC               : no (requires faad)
   - Ffmpeg            : no (requires ffmpeg)
   - Flac (native)     : no (requires flac)
   - Flac (ogg)        : no (requires ogg)
   - Opus              : no (requires opus)
   - Speex             : no (requires speex)
   - Theora            : no (requires theora)
   - Vorbis            : yes

 * Supported output formats
   - FDK-AAC           : no (requires fdkaac)
   - Ffmpeg            : no (requires ffmpeg)
   - MP3               : yes
   - MP3 (fixed-point) : no (requires shine)
   - Flac (native)     : no (requires flac)
   - Flac (ogg)        : no (requires ogg)
   - Opus              : no (requires opus)
   - Speex             : no (requires speex)
   - Theora            : no (requires theora)
   - Vorbis            : yes

 * Tags
   - Taglib (ID3 tags) : yes
   - Vorbis            : yes

 * Input / output
   - ALSA              : no (requires alsa)
   - AO                : no (requires ao)
   - FFmpeg            : no (requires ffmpeg)
   - GStreamer         : no (requires gstreamer)
   - JACK              : no (requires bjack)
   - OSS               : yes
   - Portaudio         : no (requires portaudio)
   - Pulseaudio        : no (requires pulseaudio)
   - SRT               : no (requires srt)

 * Audio manipulation
   - FFmpeg            : no (requires ffmpeg)
   - LADSPA            : no (requires ladspa)
   - Lilv              : no (requires lilv)
   - Samplerate        : yes
   - SoundTouch        : no (requires soundtouch)
   - StereoTool        : no (requires ctypes-foreign)

 * Video manipulation
   - camlimages        : no (requires camlimages)
   - FFmpeg            : no (requires ffmpeg)
   - frei0r            : no (requires frei0r)
   - ImageLib          : no (requires imagelib)
   - SDL               : no (requires tsdl-image & tsdl-ttf)

 * MIDI manipulation
   - DSSI              : no (requires dssi)

 * Visualization
   - GD                : no (requires gd)
   - Graphics          : no (requires graphics)
   - SDL               : no (requires tsdl-image & tsdl-ttf)

 * Additional libraries
   - FFmpeg filters    : no (requires ffmpeg)
   - FFmpeg devices    : no (requires ffmpeg)
   - inotify           : no (requires inotify)
   - irc               : no (requires irc-client-unix)
   - jemalloc          : no (requires jemalloc)
   - lastfm            : no (requires lastfm)
   - lo                : no (requires lo)
   - magic             : no (requires magic)
   - memtrace          : no (requires memtrace)
   - mem_usage         : no (requires mem_usage)
   - osc               : no (requires osc-unix)
   - ssl               : no (requires ssl)
   - tls               : no (requires tls-liquidsoap)
   - posix-time2       : no (requires posix)
   - windows service   : no (requires winsvc)
   - YAML support      : no (requires yaml)
   - XML playlists     : no (requires xmlplaylist)

 * Monitoring
   - Prometheus        : no (requires prometheus)

here is opam list

# Packages matching: installed
# Name                  # Installed # Synopsis
angstrom                0.16.0      Parser combinators built for speed and memory-efficiency
base                    v0.17.0     Full standard library replacement for OCaml
base-bigarray           base
base-bytes              base        Bytes library distributed with the OCaml compiler
base-domains            base
base-nnp                base        Naked pointers prohibited in the OCaml heap
base-threads            base
base-unix               base
bigstringaf             0.9.1       Bigstring intrinsics and fast blits based on memcpy/memmove
camlp-streams           5.0.1       The Stream and Genlex libraries for use with Camlp4 and Camlp5
camomile                2.0.0       A Unicode library
conf-lame               1           Virtual package relying on lame
conf-libcurl            2           Virtual package relying on a libcurl system installation
conf-libogg             1           Virtual package relying on libogg
conf-libpcre            1           Virtual package relying on a libpcre system installation
conf-libvorbis          1           Virtual package relying on libvorbis
conf-mad                1           Virtual package relying on mad
conf-pkg-config         3           Check if pkg-config is installed and create an opam switch local 
conf-samplerate         1           Virtual package relying on samplerate
conf-taglib             1           Virtual package relying on taglib
cry                     1.0.1       OCaml client for the various icecast & shoutcast source protocols
csexp                   1.5.2       Parsing and printing of S-expressions in Canonical form
dtools                  0.4.5       Library providing various helper functions to make daemons
dune                    3.15.2      Fast, portable, and opinionated build system
dune-build-info         3.15.2      Embed build information inside executable
dune-configurator       3.15.2      Helper library for gathering system configuration
dune-private-libs       3.15.2      Private libraries of Dune
dune-site               3.15.2      Embed locations information inside executable and libraries
duppy                   0.9.3       Library providing monadic threads
dyn                     3.15.2      Dynamic type
fileutils               0.6.4       API to manipulate files (POSIX like) and filenames
gen                     1.1         Iterators for OCaml, both restartable and consumable
lame                    0.3.7       MP3 encoding library
liquidsoap              2.2.3       Swiss-army knife for multimedia streaming
liquidsoap-core         2.2.3       Liquidsoap core library and binary
liquidsoap-lang         2.2.3       Liquidsoap language library
liquidsoap-libs         2.2.3       Liquidosap standard library
liquidsoap-libs-extra   2.2.3       Liquidosap standard library -- extra functionalities
mad                     0.5.3       Mad decoding library
menhir                  20231231    An LR(1) parser generator
menhirCST               20231231    Runtime support library for parsers generated by Menhir
menhirLib               20231231    Runtime support library for parsers generated by Menhir
menhirSdk               20231231    Compile-time library for auxiliary tools related to Menhir
metadata                0.3.0       Read metadata from various file formats
mm                      0.8.5       The mm library contains high-level APIs to create and manipulate 
ocaml                   5.2.0       The OCaml compiler (virtual package)
ocaml-base-compiler     5.2.0       Official release 5.2.0
ocaml-compiler-libs     v0.17.0     OCaml compiler libraries repackaged
ocaml-config            3           OCaml Switch Configuration
ocaml-options-vanilla   1           Ensure that OCaml is compiled with no special options enabled
ocaml-syntax-shims      1.0.0       Backport new syntax to older OCaml versions
ocaml_intrinsics_kernel v0.17.0     Intrinsics
ocamlfind               1.9.6       A library manager for OCaml
ocurl                   0.9.2       Bindings to libcurl
ogg                     0.7.4       Bindings to libogg
opam-depext             1.2.1-1     Install OS distribution packages
ordering                3.15.2      Element ordering
pcre                    7.5.0       Bindings to the Perl Compatibility Regular Expressions library
pp                      1.2.0       Pretty-printing library
ppx_base                v0.17.0     Base set of ppx rewriters
ppx_cold                v0.17.0     Expands [@cold] into [@inline never][@specialise never][@local ne
ppx_compare             v0.17.0     Generation of comparison functions from types
ppx_derivers            1.2.1       Shared [@@deriving] plugin registry
ppx_enumerate           v0.17.0     Generate a list containing all values of a finite type
ppx_globalize           v0.17.0     A ppx rewriter that generates functions to copy local values to t
ppx_hash                v0.17.0     A ppx rewriter that generates hash functions from type expression
ppx_sexp_conv           v0.17.0     [@@deriving] plugin to generate S-expression conversion functions
ppx_string              v0.17.0     Ppx extension for string interpolation
ppxlib                  0.32.1      Standard infrastructure for ppx rewriters
ppxlib_jane             v0.17.0     Utilities for working with Jane Street AST constructs
samplerate              0.1.6       Samplerate audio conversion library
sedlex                  3.2         An OCaml lexer generator for Unicode
seq                     base        Compatibility package for OCaml's standard iterator type starting
sexplib0                v0.17.0     Library containing the definition of S-expressions and some base 
stdlib-shims            0.3.0       Backport some of the new stdlib features to older compiler
stdune                  3.15.2      Dune's unstable standard library
stringext               1.6.0       Extra string functions for OCaml
taglib                  0.3.10      Bindings for the taglib library
uri                     4.4.0       An RFC3986 URI/URL parsing library
vorbis                  0.8.0       Bindings to libvorbis

By the way, why did you install liquidsoap 2.2.3 instead of 2.2.5?

At first I thought that maybe downgrade will resolve "unsupported format" issue, but since it is not the case I will upgrade to 2.2.5 later

vitoyucepi commented 6 months ago

Your problem looks strange. I just set up a new VM with Ubuntu 22.04 and I don't have this problem. Maybe there's something wrong with the playlist?

Can you check if my script works or not?

p = playlist("playlist.m3u")

p.on_metadata(print)

output.icecast(
  %mp3,
  p,
  host="127.0.0.1",
  port=8000,
  mount="/mount,
  password="password",
  fallible=true,
)

It should show metadata for each file in the process log. Like this.

[("on_air_timestamp", "1716485467.00"), ("kind", "{audio=pcm(stereo)}"), ("decoder", "mad"), ("title", "music_2"), ("filename", "/home/ubuntu/music/2.mp3"), ("temporary", "false"), ("source", "music"), ("initial_uri", "/home/ubuntu/music/2.mp3"), ("encoder", "Lavf58.76.100"), ("status", "playing"), ("on_air", "2024/05/23 17:31:07"), ("rid", "2")]
anoniniarz commented 6 months ago

Sure thing. Log says

[("on_air_timestamp", "1716486077.00"), ("kind", "{audio=pcm(stereo)}"), ("decoder", "mad"), ("filename", "/etc/liquidsoap/media/filename1.mp3"), ("temporary", "false"), ("source", "current_m3u"), ("initial_uri", "/etc/liquidsoap/media/filename1.mp3"), ("status", "playing"), ("encoder", "Lavf60.16.100"), ("apic", "\x03image/png\x00\x03\x00\x89PNG\r\n\x1A\n\x00\x00\x00\rIHDR\x00\x00\x02\x80\x00\x00\x02\x80\b\x02\x00\x00\x00\x83\xAF^t\x00\x00\x00\tpHYs\x00\x00\x00\x01\x00\x00\x00\x01\x00O%\xC4\xD6\x00\x00\x10\x00IDATx\x9C\xEC\xBD\x07|\x1B\xD9u.\x8E-\xDE\xCD\xBA\xE5\xE5\x97\xE4%\xFF\xF7\xD2^\xF2\xE2\xD8\xCE\xB3\x1D\xDB\xF1s\x8A\xE3\x14\xB7-*\xA4\xD8D\x8A\x92\xA8\xB6\xEB\xED\xDE\x9A\xED\xDEj\xAD\x1AU\xD9\xD0\x1B\x9BD\xB1\xA0w\xB0\x82\x04{\x05\x1B@\x12\x04H\x82\xE8\x1D3\x18\x0C\xE6\x7F\xEE@\x92\xE5\xDD\xD5\xAE\xD7V\xCC\x95\xDF|?\x88\x1A\x00\x83;wn9\xDF9\xE7\x9E{\x86E1`\xC0\x80\x01\x03\x06\x0C~\xE3`mu\x05\x180`\xC0\x80\x01\x83\xFF\x17\xC1\x100\x03\x06\x0C\x180`\xB0\x05`\b\x98\x01\x03\x06\x0C\x180\xD8\x020\x04\xCC\x80\x01\x03\x06\x0C\x18l\x01\x18\x02f\xC0\x80\x01\x03\x06\x0C\xB6\x00\x0C\x013`\xC0\x80\x01\x03\x06[\x00\x86\x80\x190`\xC0\x80\x01\x83-\x00C\xC0\x0C\x180`\xC0\x80\xC1\x16\x80!`\x06\x0C\x180`\xC0`\x0B\xC0\x100\x03\x06\x0C\x180`\xB0\x05`\b\x98\x01\x03\x06\x0C\x180\xD8\x020\x04\xCC\x80\x01\x03\x06\x0C\x18l\x01\x18\x02f\xC0\x80\x01\x03\x06\x0C\xB6\x00\x0C\x013`\xC0\x80\x01\x03\x06[\x00\x86\x80\x190`\xC0\x80\x01\x83-\x00C\xC0\x0C\x180`\xC0\x80\xC1\x16\x80!`\x06\x0C\x180`\xC0`\x0B\xC0\x100\x03\x06\x0C\x180`\xB0\x05`\b\x98\x01\x03\x06\x0C\x180\xD8\x020\x04\xCC\x80\x01\x03\x06\x0C\x18l\x01\x18\x02f\[...]
(there is hundreds of lines)
[...]C/`Y\xB1\x1DK4\x1C\xE3\x04\xB6\xC3\xA3l;\xAC\x952024/05/23 19:41:17 [request:3] Nonexistent file or ill-formed URI "/etc/liquidsoap/media/filename2.mp3"!
2024/05/23 19:41:17 [decoder.mad:3] Libmad recognizes "/etc/liquidsoap/media/\229\146\140\227\129\172\227\129\139 - \231\181\182\233\160\130\232\174\131\230\173\140.mp3" as mpeg audio (layer III, 320kbps, 44100Hz, 2 channels).
\xE6\x9C\xB3\x8D_\xC1\xB9\x97\x9F\b\x00\xA3y\x87{\x0F\xC1\x03?\x1CO`7\x82\xC4i\xD8\xB0\xE1\xA0A\x83&N\x9C8o\xDE\xBCQ\xA3F\xE5\xE4\xE40\x0EvL.[\xFB\xCF\xDE\xA8\xCEL X\xA0u\xEE\xDC\xB9a\xC3\x86a%\xAE\xCE\x91-\x85S\xC7\xF1o \x88\xC2\x94\x02H\x136\\\x87\x9E\x06\x9CmD\\T,\xF0\xBDh\xF7csC\xD4H\x1Eu>\xF1\xAB1\xED\x0BN\xC0\xF8\x06I\x8D\xB1F6\xD1\x8A\xD9\xBCqSa~\x01\xC3\xA2/z;q\xDC\x8D\xC1\xF0\xAE!\xAF\xBD\x0E\x00<\xE6\xA3\xD1\xD4]\xFCX3l\xA5mVX\xB2\r\xFC\x7F\x8D\xCD^A\xD3\xBBR\x8F\x1D[\x9AqhA\xBEaII\xC9\xF2\xFC\"\xDF\xFC\x12\xCF\xBC\xBC\xC5\x86\x8C\xA0\xBCb\x00\xDDeY\x068\x00b}\r\x05\x00\xCC^\xB9\x05\x8B\xF2\x0B\x16\xE7\xD1c)\x1A\xBE\xB9\x85\x9E\xB9E^9EK\x8B\x8A\x[...]
[...]x10\xC0\x00P@\x00\x03@\x01\x01\x0C\x00\x05\x040\x00\x14\x10\xC0\x00P@\x00\x03@\x01\x01\x0C\x00\x05\x040\x00\x14\x10\xC0\x00P@\x00\x03@\x01\x01\x0C\x00\x05\x040\x00\x14\x10\xC0\x00P@\x00\x03@\x01\x01\x0C\x00\x05\x040\x00\x14\x10\xC0\x00P\xE0\x17i\xA6\x80\x8D^\x0B\xEE4\x00\x00\x00\x00IEND\xAEB`\x82"), ("on_air", "2024/05/23 19:41:17"), ("rid", "1")]
2024/05/23 19:41:17 [/mount:3] Connecting mount /mount for source@127.0.0.1...
2024/05/23 19:41:17 [/mount3] Connection setup was successful.
^C2024/05/23 19:42:34 [main:3] Shutdown signal received.

And that's all. What on earth is this? Metadata in the files seems to be correct, ezstream does not have issues with sending it to icecast

vitoyucepi commented 6 months ago

Looks good, the long line is just an image. Here's another attempt to display metadata, check that too.

p = playlist("playlist.m3u")

def custom_log(m)
  print(metadata.cover.remove(m))
end

p.on_metadata(custom_log)

output.icecast(
  %mp3,
  p,
  host="127.0.0.1",
  port=8000,
  mount="/mount,
  password="password",
  fallible=true,
)
anoniniarz commented 6 months ago
Liquidsoap 2.2.5+dev
2024/05/23 20:20:55 [main:3] Using: angstrom=0.16.0 bigstringaf=0.9.1 bytes=[distributed with OCaml 4.02 or above] camlp-streams camomile.lib=2.0 cry=1.0.3 curl=0.9.2 dtools=0.4.5 dune-build-info=3.15.2 dune-private-libs.dune-section=3.15.2 dune-site=3.15.2 dune-site.private=3.15.2 duppy=0.9.4 fileutils=0.6.4 gen=1.1 lame=0.3.7 liquidsoap-lang=2.2.5 liquidsoap-lang.console=2.2.5 liquidsoap_builtins liquidsoap_core liquidsoap_lame liquidsoap_mad liquidsoap_ogg liquidsoap_optionals liquidsoap_oss liquidsoap_runtime liquidsoap_samplerate liquidsoap_taglib liquidsoap_vorbis mad=0.5.3 magic-mime=1.3.1 menhirLib=20231231 metadata=0.3.0 mm=0.8.5 mm.audio=0.8.5 mm.base=0.8.5 mm.image=0.8.5 mm.midi=0.8.5 mm.video=0.8.5 ogg=0.7.4 ogg.decoder=0.7.4 pcre=7.5.0 ppx_string.runtime=v0.17.0 re=1.11.0 samplerate=0.1.6 sedlex=3.2 seq=[distributed with OCaml 4.07 or above] stdlib-shims=0.3.0 str=5.2.0 stringext=1.6.0 taglib=0.3.10 threads=5.2.0 unix=5.2.0 uri=4.4.0 vorbis=0.8.0 vorbis.decoder=0.8.0
2024/05/23 20:20:55 [clock:3] Using builtin (low-precision) implementation for latency control
2024/05/23 20:20:56 [main:3] Standard library loaded in 0.74 seconds.
2024/05/23 20:20:56 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz main.
2024/05/23 20:20:56 [frame:3] Video frame size set to: 1280x720
2024/05/23 20:20:56 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples.
2024/05/23 20:20:56 [frame:3] Targeting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks.
2024/05/23 20:20:56 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks.
2024/05/23 20:20:56 [sandbox:3] Sandboxing disabled
2024/05/23 20:20:56 [startup:3] Typechecking: 0.52s
2024/05/23 20:20:56 [startup:3] Evaluation: 0.02s
2024/05/23 20:20:56 [startup:3] Typechecking: 0.02s
2024/05/23 20:20:56 [startup:3] Evaluation: 0.00s
2024/05/23 20:20:56 [startup:3] Typechecking: 0.00s
2024/05/23 20:20:56 [startup:3] Evaluation: 0.00s
2024/05/23 20:20:56 [startup:3] Loaded test.liq: 0.00s
2024/05/23 20:20:56 [/mount:3] Content type is {audio=pcm(stereo)}.
2024/05/23 20:20:56 [playlist_m3u:3] Content type is {audio=pcm(stereo)}.
2024/05/23 20:20:56 [video.converter:3] Couldn't find preferred video converter: ffmpeg.
2024/05/23 20:20:56 [audio.converter:3] Using samplerate converter: libsamplerate.
2024/05/23 20:20:56 [video.text:3] Using native implementation
2024/05/23 20:20:56 [clock.main:3] Streaming loop starts in auto-sync mode
2024/05/23 20:20:56 [clock.main:3] Delegating synchronization to CPU clock
2024/05/23 20:20:56 [decoder.mad:3] Libmad recognizes "/etc/liquidsoap/media/filename1.mp3" as mpeg audio (layer III, 320kbps, 44100Hz, 2 channels).
2024/05/23 20:20:56 [playlist_m3u:3] Prepared "/etc/liquidsoap/media/filename1.mp3" (RID 1).
[("on_air_timestamp", "1716488456.00"), ("kind", "{audio=pcm(stereo)}"), ("decoder", "mad"), ("filename", "/etc/liquidsoap/media/filename1.mp3"), ("temporary", "false"), ("source", "playlist_m3u"), ("initial_uri", "/etc/liquidsoap/media/filename1.mp3"), ("status", "playing"), ("encoder", "Lavf60.16.100"), ("on_air", "2024/05/23 20:20:56"), ("rid", "1")]
2024/05/23 20:20:56 [request:3] Nonexistent file or ill-formed URI "/etc/liquidsoap/media/filename2.mp3"!
2024/05/23 20:20:56 [/mount:3] Connecting mount /mount for source@127.0.0.1...
2024/05/23 20:20:56 [decoder.mad:3] Libmad recognizes "/etc/liquidsoap/media/filename3.mp3" as mpeg audio (layer III, 320kbps, 44100Hz, 2 channels).
2024/05/23 20:20:56 [/mount:3] Connection setup was successful.
vitoyucepi commented 6 months ago

It looks like your file has no title or something.

[
("on_air_timestamp", "1716488456.00"),
("kind", "{audio=pcm(stereo)}"),
("decoder", "mad"),
("filename", "/etc/liquidsoap/media/filename1.mp3"),
("temporary", "false"),
("source", "playlist_m3u"),
("initial_uri", "/etc/liquidsoap/media/filename1.mp3"),
("status", "playing"),
("encoder", "Lavf60.16.100"),
("on_air", "2024/05/23 20:20:56"),
("rid", "1")
]

Can you extract tags from the file? For example, you could try ffprobe /etc/liquidsoap/media/filename1.mp3 and see if there are any tags. If there are no tags, then the behavior is correct.

By the way, do you have ffmpeg installed on your system, because you can only build liquidsoap with ffmpeg support. Like this opam install liquidsoap ffmpeg, but you don't need to do that right now.

anoniniarz commented 6 months ago

I've run one file through ffprobe, and there was no metadata for title, artist, or album. Seems like they've been lost in conversion from ogg to mp3. It was confusing because ezstream did display artist and title, but apparently it took data from filename. I will re-convert everything later. So liquidsoap cannot display filename? Some songs, for example ripped from youtube, don't have metadata and adding it would be pain in the butt. And no, I do not have ffmpeg in opam environment, but generally I do. I thought that ffmpeg is needed only if I want to re-encode