Closed vitoyucepi closed 3 years ago
Thanks for reporting this one. I can't reproduce here. File created like you. Here's my script:
log.level.set(4)
s = single("/tmp/output.mp3")
s.on_metadata(print)
output.dummy(s)
Could you send the final output of your configure
run where it lists all the bindings that are enabled? Or else the first line of the logs, where it should also say the same?
Thanks!
I used artifact from this pipeline https://github.com/savonet/liquidsoap/runs/3612704083
Thanks for these details. I stil cannot reproduce with the same optional dependencies. Could be the underlying versions.
Could you try the following:
List all enabled decoders:
liquidsoap 'print(settings.request.metadata_decoders())'
Disable them one by one to figure out the one that's creating the issue? My money's on "GSTREAMER"
!:
settings.request.metadata_decoders.set(["FFMPEG"])
etc..
Thanks!
["FFMPEG", "FLAC", "MP4", "OGG", "TAGLIB", "ID3V2"]
It was taglib
["TAGLIB"]
2021/09/17 18:12:00 >>> LOG START
2021/09/17 18:12:00 [main:3] Liquidsoap 2.0.0
2021/09/17 18:12:00 [main:3] Using: bytes=[distributed with OCaml 4.02 or above] posix-time2=2.0.0 pcre=7.4.6 sedlex=2.3 menhirLib=20210419 curl=0.9.1 dtools=0.4.4 duppy=0.9.2 cry=0.6.5 mm=0.7.2 xmlplaylist=0.1.5 lastfm=0.3.3 ogg=0.7.0 ogg.decoder=0.7.0 vorbis=0.8.0 vorbis.decoder=0.8.0 opus=0.2.0 opus.decoder=0.2.0 speex=0.4.0 speex.decoder=0.4.0 mad=0.5.1 flac=0.3.0 flac.ogg=0.3.0 flac.decoder=0.3.0 dynlink=[distributed with Ocaml] lame=0.3.4 shine=0.2.2 frei0r=0.1.2 fdkaac=0.3.2 theora=0.4.0 theora.decoder=0.4.0 ffmpeg-avutil=1.0.1 ffmpeg-avcodec=1.0.1 ffmpeg-avdevice=1.0.1 ffmpeg-av=1.0.1 ffmpeg-avfilter=1.0.1 ffmpeg-swresample=1.0.1 ffmpeg-swscale=1.0.1 bjack=0.1.6 alsa=0.3.0 ao=0.2.3 samplerate=0.1.6 taglib=0.3.7 ssl=0.5.9 magic=0.7.3 camomile=1.0.2 inotify=2.3 yojson=1.7.0 faad=0.5.0 soundtouch=0.1.9 portaudio=0.2.2 pulseaudio=0.1.4 ladspa=0.2.0 dssi=0.1.3 tsdl=v0.9.8 tsdl_ttf=0 tsdl_image=0 camlimages=4.2.6 cohttp-lwt-unix=2.5.5 prometheus-app=1.1 srt.constants=0.2.0 srt.types=0.2.0 srt.stubs=0.2.0 srt.stubs.locked=0.2.0 srt=0.2.0 lo=0.2.0 gd=1.0a5
2021/09/17 18:12:00 [clock:3] Using native (high-precision) implementation for latency control
2021/09/17 18:12:00 [frame:4] frame.audio.channels set to: 2
2021/09/17 18:12:00 [frame:4] frame.video.default set to: false
2021/09/17 18:12:00 [frame:4] frame.midi.channels set to: 0
2021/09/17 18:12:00 [frame:4] frame.video.width set to: 1280
2021/09/17 18:12:00 [frame:4] frame.video.height set to: 720
2021/09/17 18:12:00 [frame:4] frame.audio.samplerate set to: 44100
2021/09/17 18:12:00 [frame:4] frame.video.framerate set to: 25
2021/09/17 18:12:00 [frame:4] frame.audio.samplerate set to: 44100
2021/09/17 18:12:00 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz main.
2021/09/17 18:12:00 [frame:3] Video frame size set to: 1280x720
2021/09/17 18:12:00 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples.
2021/09/17 18:12:00 [frame:3] Targeting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks.
2021/09/17 18:12:00 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks.
2021/09/17 18:12:00 [sandbox:3] Sandboxing disabled
2021/09/17 18:12:00 [video.converter:3] Using preferred video converter: ffmpeg.
2021/09/17 18:12:00 [audio.converter:3] Using samplerate converter: ffmpeg.
2021/09/17 18:12:00 [clock:4] Currently 1 clocks allocated.
2021/09/17 18:12:00 [clock.main:4] Starting 1 sources...
2021/09/17 18:12:00 [source:4] Source output.dummy_0 gets up with content kind: {audio=any,video=any,midi=any}.
2021/09/17 18:12:00 [dummy:4] Content type is {audio=pcm(stereo),video=none,midi=none}.
2021/09/17 18:12:00 [source:4] Source single_0 gets up with content kind: {audio=any,video=any,midi=any}.
2021/09/17 18:12:00 [single_0:3] /var/liquidsoap/output.mp3 is static, resolving once for all...
2021/09/17 18:12:00 [decoder.ogg:4] Unsupported file extension for "/var/liquidsoap/output.mp3"!
2021/09/17 18:12:00 [decoder.ogg:4] Unsupported MIME type for "/var/liquidsoap/output.mp3": audio/mpeg!
2021/09/17 18:12:00 [decoder.mp4:4] Unsupported file extension for "/var/liquidsoap/output.mp3"!
2021/09/17 18:12:00 [decoder.mp4:4] Unsupported MIME type for "/var/liquidsoap/output.mp3": audio/mpeg!
2021/09/17 18:12:00 [decoder.aac:4] Unsupported file extension for "/var/liquidsoap/output.mp3"!
2021/09/17 18:12:00 [decoder.aac:4] Unsupported MIME type for "/var/liquidsoap/output.mp3": audio/mpeg!
2021/09/17 18:12:00 [decoder.flac:4] Unsupported file extension for "/var/liquidsoap/output.mp3"!
2021/09/17 18:12:00 [decoder.flac:4] Unsupported MIME type for "/var/liquidsoap/output.mp3": audio/mpeg!
2021/09/17 18:12:00 [decoder.aiff:4] Unsupported file extension for "/var/liquidsoap/output.mp3"!
2021/09/17 18:12:00 [decoder.aiff:4] Unsupported MIME type for "/var/liquidsoap/output.mp3": audio/mpeg!
2021/09/17 18:12:00 [decoder.wav:4] Unsupported file extension for "/var/liquidsoap/output.mp3"!
2021/09/17 18:12:00 [decoder.wav:4] Unsupported MIME type for "/var/liquidsoap/output.mp3": audio/mpeg!
2021/09/17 18:12:00 [decoder:4] Available decoders: FFMPEG (priority: 10), MAD (priority: 1)
2021/09/17 18:12:00 [decoder.ffmpeg:4] ffmpeg recognizes /var/liquidsoap/output.mp3 as: audio: {codec: mp3, 44100Hz, 1 channel(s)} and content-type: {audio=pcm(mono),video=none,midi=none}.
2021/09/17 18:12:00 [decoder:4] Selected decoder FFMPEG for file "/var/liquidsoap/output.mp3" with expected kind {audio=pcm(stereo),video=none,midi=none} and detected content {audio=pcm(mono),video=none,midi=none}
2021/09/17 18:12:00 [single_0:4] Content type is {audio=pcm(stereo),video=none,midi=none}.
2021/09/17 18:12:00 [single_0:3] Prepared "/var/liquidsoap/output.mp3" (RID 0).
2021/09/17 18:12:00 [threads:4] Created thread "clock_main" (1 total).
2021/09/17 18:12:00 [clock:4] Main phase starts.
2021/09/17 18:12:00 [threads:4] Created thread "generic queue #1" (1 total).
2021/09/17 18:12:00 [threads:4] Created thread "generic queue #2" (2 total).
2021/09/17 18:12:00 [threads:4] Created thread "non-blocking queue #1" (3 total).
2021/09/17 18:12:00 [threads:4] Created thread "non-blocking queue #2" (4 total).
2021/09/17 18:12:00 [clock.main:3] Streaming loop starts in auto-sync mode
2021/09/17 18:12:00 [clock.main:3] Delegating synchronisation to CPU clock
[mp3float @ 0x7f7a1c008540] Could not update timestamps for skipped samples.
[("track", "0"), ("on_air_timestamp", "1631902320.00"), ("kind", "{audio=pcm(stereo),video=none,midi=none}"), ("year", "0"), ("decoder", "FFMPEG"), ("filename", "/var/liquidsoap/output.mp3"), ("temporary", "false"), ("initial_uri", "/var/liquidsoap/output.mp3"), ("status", "playing"), ("on_air", "2021/09/17 18:12:00"), ("rid", "0")]
^C2021/09/17 18:12:01 [main:3] Shutdown started!
2021/09/17 18:12:01 [main:3] Waiting for main threads to terminate...
2021/09/17 18:12:01 [threads:4] Waiting for thread clock_main to shutdown
2021/09/17 18:12:01 [single_0:4] Finished with "/var/liquidsoap/output.mp3".
2021/09/17 18:12:01 [clock.main:3] Streaming loop stopped.
2021/09/17 18:12:01 [threads:4] Thread "clock_main" terminated (0 remaining).
2021/09/17 18:12:01 [main:3] Main threads terminated.
2021/09/17 18:12:01 [threads:3] Shutting down scheduler...
2021/09/17 18:12:01 [threads:4] Thread "generic queue #1" terminated (3 remaining).
2021/09/17 18:12:01 [threads:4] Thread "generic queue #2" terminated (2 remaining).
2021/09/17 18:12:01 [threads:4] Thread "non-blocking queue #1" terminated (1 remaining).
2021/09/17 18:12:01 [threads:4] Thread "non-blocking queue #2" terminated (0 remaining).
2021/09/17 18:12:01 [threads:3] Scheduler shut down.
2021/09/17 18:12:01 [main:3] Cleaning downloaded files...
2021/09/17 18:12:01 [main:3] Freeing memory...
Here's my dockerfile
FROM ubuntu:20.04@sha256:9d6a8699fb5c9c39cf08a0871bd6219f0400981c570894cd8cbea30d3424a31f
ENV TZ=UTC
# renovate: datasource=repology depName=ubuntu_20_04/curl versioning=loose
ENV CURL_VERSION=7.68.0-1ubuntu2.7
# renovate: datasource=repology depName=ubuntu_20_04/ca-certificates versioning=loose
ENV CA_CERTIFICATES_VERSION=20210119~20.04.1
# renovate: datasource=repology depName=ubuntu_20_04/gosu versioning=loose
ENV GOSU_VERSION=1.10-1ubuntu0.20.04.1
ENV LIQUIDSOAP_DEB="liquidsoap-v2.0.0_2.0.0-ubuntu-focal-1_amd64.deb"
COPY "$LIQUIDSOAP_DEB" "/$LIQUIDSOAP_DEB"
RUN set -eux; \
apt-get update -y; \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
ca-certificates="${CA_CERTIFICATES_VERSION}" \
curl="${CURL_VERSION}" \
gosu="${GOSU_VERSION}" \
; \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
"/${LIQUIDSOAP_DEB}" \
; \
apt-get autoremove --purge -y; \
apt-get clean -y; \
rm -rf \
/var/lib/apt \
/var/lib/cache \
/var/lib/log \
"/${LIQUIDSOAP_DEB:?}" \
;
COPY rootfs /
ENTRYPOINT [ "entrypoint" ]
CMD [ "liquidsoap", "/var/liquidsoap/default.liq" ]
Maybe related to https://taglib.org/api/classTagLib_1_1ID3v2_1_1Tag.html#ae62d0b79a4d706c4650836ed52dac2eb
Thanks for your help with this. This should be fixed in both main
and v2.0.0
now.
Are you sure that this should be fixed like this? Maybe something goes wrong here? https://github.com/savonet/ocaml-taglib/blob/abc7aef47aee4a45ff7cbfbaa7b745e0147bd160/src/taglib_stubs.cc#L336
We are collecting most tags through the generic Taglib.File.properties
. I think your values came from there, which was not filtered for 0
, so now we are doing an explicit fetch for those. However, the check for zero value is indeed redundant.
Have you been able to test/confirm the fix?
Liquidsoap 2.0.0-rc1+git@ce2632f9
[("track", "0"), ("on_air_timestamp", "1632068606.00"), ("kind", "{audio=pcm(stereo),video=none,midi=none}"), ("year", "0"), ("decoder", "FFMPEG"), ("filename", "/var/liquidsoap/output.mp3"), ("temporary", "false"), ("initial_uri", "/var/liquidsoap/output.mp3"), ("status", "playing"), ("on_air", "2021/09/19 16:23:26"), ("rid", "0")]
This is weird. We can call the tag decoders directly:
./liquidsoap 'print(file.metadata.taglib("/tmp/output.mp3"))'
[("label", "foobarlol"), ("encoding", "Lavf58.76.100"), ("publisher", "foobarlol"), ("tracknumber", "1")]
Could you try that? Thanks!
The same with https://github.com/savonet/liquidsoap/actions/runs/1251016098
Config
print(file.metadata.taglib("/var/liquidsoap/output.mp3"))
log.level.set(4)
s = single("/var/liquidsoap/output.mp3")
output.dummy(s)
Log
[("track", "0"), ("year", "0")]
2021/09/19 16:37:29 >>> LOG START
2021/09/19 16:37:28 [main:3] Liquidsoap 2.0.0
That's odd. What's your version of taglib?
The build is based on ubuntu:20.04
.
So taglib
version is 1.11.1+dfsg.1-0.3ubuntu2
.
The same with debian:10
and debian:11
.
I've prepared custom container images with artifacts from fa073db
.
ubuntu:20.04
registry.gitlab.com/vito-containers/liquidsoap/build:custom-b322f3de
debian:11
registry.gitlab.com/vito-containers/liquidsoap/build:custom-fc9c0c18
Yeah, I was able to reproduce on ubuntu. I have the same version on OSX here and it does not behave the same way.. Should be fixed now in both main
and v2.0.0
Describe the bug If
track
andyear
metadata tags are not set inmp3
file, then in metadata they will present as0
.To Reproduce
mp3
files with ffmpeg without metadata headers.Get metadata by
Expected behavior If metadata tags are empty in source file, then they should not present in
metadata
list.Version details
ubuntu:20.04
in docker2.0.0-rc1
Install method Deb package from liquidsoap releases at github
Common issues N/A