Closed MinePro120 closed 5 months ago
Hi @MinePro120,
settings.log.level := 5
.
Could you paste the results of ffprobe music.flac
and file --mime music.flac
?When using the
enable_autocue_metadata()
though, the script completely fails.
Could you paste the log?
dpkg --list | grep libav
.ffprobe
:
ffprobe version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2007-2021 the FFmpeg developers
built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Input #0, flac, from 'music.flac':
Metadata:
replaygain_album_gain: +1.13 dB
replaygain_album_peak: 0.883971
replaygain_track_gain: +0.43 dB
replaygain_track_peak: 0.883971
TITLE : test
ARTIST : test
ALBUM : test
DATE : test
GENRE : test
track : 03
disc : 1
ALBUM ARTIST : test
album_artist : test
encoder : Lavf59.27.100
Duration: 00:07:03.80, start: 0.000000, bitrate: 867 kb/s
Stream #0:0: Audio: flac, 44100 Hz, stereo, s16
Side data:
replaygain: track gain - 0.430000, track peak - 0.000021, album gain - 1.130000, album peak - 0.000021,
Stream #0:1: Video: png, rgb24(pc), 250x250 [SAR 1:1 DAR 1:1], 90k tbr, 90k tbn, 90k tbc (attached pic)
Metadata:
comment : Cover (front)
, and file
:
music.flac: audio/flac; charset=binary
libavahi-client3:arm64 0.8-5ubuntu5.2
libavahi-common-data:arm64 0.8-5ubuntu5.2
libavahi-common3:arm64 0.8-5ubuntu5.2
libavahi-core7:arm64 0.8-5ubuntu5.2
libavc1394-0:arm64 0.5.4-5build2
libavcodec-dev:arm64 7:4.4.2-0ubuntu0.22.04.1
libavcodec58:arm64 7:4.4.2-0ubuntu0.22.04.1
libavdevice-dev:arm64 7:4.4.2-0ubuntu0.22.04.1
libavdevice58:arm64 7:4.4.2-0ubuntu0.22.04.1
libavfilter-dev:arm64 7:4.4.2-0ubuntu0.22.04.1
libavfilter7:arm64 7:4.4.2-0ubuntu0.22.04.1
libavformat-dev:arm64 7:4.4.2-0ubuntu0.22.04.1
libavformat58:arm64 7:4.4.2-0ubuntu0.22.04.1
libavutil-dev:arm64 7:4.4.2-0ubuntu0.22.04.1
libavutil56:arm64 7:4.4.2-0ubuntu0.22.04.1
timeout -s 9 30 ./test.liq > test.log 2>&1
:
test.logaudio/flac
is the official, registered MIME type, but I think audio/x-flac
should be graciously accepted, too, since many have been using that.
Note at least with my autocue.cue_file
you should never enable replaygain as well, because that functionality is built into autocue.cue_file
. Both do CPU-intensive calculations and might even write files back, which can lead to some chaos and enormous CPU usage.
I think that’s also valid for autocue.internal
but I’m not sure.
Note at least with my
autocue.cue_file
you should never enable replaygain as well, because that functionality is built intoautocue.cue_file
. Both do CPU-intensive calculations and might even write files back, which can lead to some chaos and enormous CPU usage.I think that’s also valid for
autocue.internal
but I’m not sure.
Can you quote some documentation about this? Reading the dev docs, I don't see anything about autocue implementing replaygain.
I didn’t get round to update the documentation lately (sorry!), but the GitHub is here (use the integrate-with-liquidsoap
branch for now please) and the Liquidshop 4 presentation here.
Basically, instead of the internal autocue, you can (if on Mac/Linux) just copy cue_file
somewhere in the path, make it executable, then, in Liquidsoap:
%include "autocue.cue_file.liq"
do some settings (complete list with defaults here):
# settings.autocue.cue_file.path := "cue_file"
# settings.autocue.cue_file.fade_in := 0.1
# settings.autocue.cue_file.fade_out := 2.5
# settings.autocue.cue_file.timeout := 60.0
# settings.autocue.cue_file.target := -18.0
# settings.autocue.cue_file.silence := -42.0
# settings.autocue.cue_file.overlay := -8.0
# settings.autocue.cue_file.longtail := 15.0
# settings.autocue.cue_file.overlay_longtail := -15.0
# settings.autocue.cue_file.noclip := false # clipping prevention
# settings.autocue.cue_file.blankskip := false
# settings.autocue.cue_file.unify_loudness_correction := true
# settings.autocue.cue_file.write_tags := false
# settings.autocue.cue_file.write_replaygain := false
# settings.autocue.cue_file.force_analysis := false
settings.autocue.cue_file.nice := true # Linux/MacOS only!
# `enable_autocue_metadata()` will autocue ALL files Liquidsoap processes.
# You can disable it for selected sources using 'annotate:liq_cue_file=false'.
# Remember you won't get `liq_amplify` data then -- expect loudness jumps!
settings.autocue.preferred := "cue_file"
settings.autocue.amplify_behavior := "keep"
enable_autocue_metadata()
That should get you up & running.
No problem, I was talking about the internal one and the liquidsoap documentation. Just tested though, it definitely does not implement replaygain.
The log file looks strange. The liquidsoap doesn't even try to use the decoder.
2024/06/09 01:03:22 [request.2:4] Pushed ["/home/user/Temp/Music/music3.flac";...].
2024/06/09 01:03:22 [decoder.video.metadata:4] Unsupported MIME type for "/home/user/Temp/Music/music3.flac": audio/x-flac!
2024/06/09 01:03:22 [decoder.ogg.metadata:4] Unsupported MIME type for "/home/user/Temp/Music/music3.flac": audio/x-flac!
2024/06/09 01:03:22 [decoder.image.metadata:4] Unsupported MIME type for "/home/user/Temp/Music/music3.flac": audio/x-flac!
2024/06/09 01:03:22 [decoder.id3:4] Unsupported MIME type for "/home/user/Temp/Music/music3.flac": audio/x-flac!
2024/06/09 01:03:22 [decoder.id3:4] Unsupported MIME type for "/home/user/Temp/Music/music3.flac": audio/x-flac!
2024/06/09 01:03:22 [decoder.id3:4] Unsupported MIME type for "/home/user/Temp/Music/music3.flac": audio/x-flac!
2024/06/09 01:03:22 [decoder.flac.metadata:4] Unsupported file extension for "/home/user/Temp/Music/music3.flac"!
2024/06/09 01:03:22 [decoder.flac.metadata:4] Unsupported MIME type for "/home/user/Temp/Music/music3.flac": audio/x-flac!
2024/06/09 01:03:22 [metadata.mp4:4] Unsupported MIME type for "/home/user/Temp/Music/music3.flac": audio/x-flac!
2024/06/09 01:03:22 [decoder.ffmpeg:4] Unsupported file extension for "/home/user/Temp/Music/music3.flac"!
2024/06/09 01:03:22 [metadata.flac:4] Unsupported file extension for "/home/user/Temp/Music/music3.flac"!
2024/06/09 01:03:22 [decoder.ogg:4] Unsupported MIME type for "/home/user/Temp/Music/music3.flac": audio/x-flac!
2024/06/09 01:03:22 [decoder.taglib:4] Unsupported file extension for "/home/user/Temp/Music/music3.flac"!
2024/06/09 01:03:22 [decoder.taglib:4] Unsupported MIME type for "/home/user/Temp/Music/music3.flac": audio/x-flac!
2024/06/09 01:03:22 [Music:5] Queue is empty!
2024/06/09 01:03:22 [Music:5] Failed to prepare track: no file.
I'd like to see the result of the following lines in your script.
print(settings.request.metadata_decoders())
print(settings.decoder.decoders())
print(settings.decoder.mime_types.ffmpeg())
print(settings.decoder.file_extensions.ffmpeg())
Here you go:
["video-metadata", "ogg_native", "image", "ID3", "ID3v1", "ID3v2", "flac_native", "mp4", "ffmpeg", "flac", "ogg", "taglib"]
["wav", "aiff", "pcm/basic", "srt", "raw audio", "midi", "image", "aac", "mp4", "ffmpeg", "flac", "ogg", "mad"]
["application/f4v", "application/ffmpeg", "application/mp4", "application/mxf", "application/octet-stream", "application/octet-stream", "application/ogg", "application/vnd.pg.format", "application/vnd.rn-realmedia", "application/vnd.smaf", "application/x-mpegURL", "application/x-ogg", "application/x-pgs", "application/x-shockwave-flash", "application/x-subrip", "application/xml", "audio/G722", "audio/MP4A-LATM", "audio/MPA", "audio/aac", "audio/aacp", "audio/aiff", "audio/amr", "audio/basic", "audio/bit", "audio/flac", "audio/g723", "audio/iLBC", "audio/mp4", "audio/mpeg", "audio/ogg", "audio/vnd.wave", "audio/wav", "audio/wave", "audio/webm", "audio/x-ac3", "audio/x-adpcm", "audio/x-caf", "audio/x-dca", "audio/x-eac3", "audio/x-flac", "audio/x-gsm", "audio/x-hx-aac-adts", "audio/x-ogg", "audio/x-oma", "audio/x-tta", "audio/x-voc", "audio/x-wav", "audio/x-wavpack", "multipart/x-mixed-replace;boundary=ffserver", "text/vtt", "text/x-ass", "text/x-jacosub", "text/x-microdvd", "video/3gpp", "video/3gpp2", "video/MP2T", "video/mp2t", "video/mp4", "video/mpeg", "video/ogg", "video/webm", "video/x-flv", "video/x-h261", "video/x-h263", "video/x-m4v", "video/x-matroska", "video/x-mjpeg", "video/x-ms-asf", "video/x-msvideo", "video/x-nut"]
What's interesting to me is that all my flacs are recognised as audio/x-flac
by liquidsoap. Shouldn't they be the standard audio/flac
, just like file
suggests?
Well, the output looks completely normal to me, so it doesn't explain why liquidsoap even didn't try to resolve the request. So here are some more tests:
liquidsoap --build-config
.ffmpeg -formats
and ffmpeg -codecs
.settings.log.level := 5
p = playlist("/home/user/FLACs/")
output.dummy(p, fallible=true)
1.
2.
3.
The result looks good. So it's not really flac, but something with the replaygain/autocue function.
Here is another test, but this time with replaygain.
settings.log.level := 3
enable_replaygain_metadata()
p = playlist("/home/user/Temp/Music")
p = replaygain(p)
p.on_metadata(print)
output.dummy(p, fallible=true)
So the unsupported mime type info is normal then? Here's the log:
Yes, everything is fine as long as there are no obvious errors or warnings.
[decoder.taglib:4] Unsupported MIME type for "music.flac": audio/x-flac!
This is an info(4) level message.
I'm turning this into a discussion because I don't see anything that looks like an issue anymore. If you want to enable autocue, then @Moonbase59 will give you a better guidance.
Describe the bug Hello. Using the following script to stream a folder of flacs to icecast2, the following warnings repeat for each track:
Despite the warnings, the script works fine (as far as I can hear) since the tracks seem to be processed after a couple of tries. When using the
enable_autocue_metadata()
though, the script completely fails and generates too many requests and the same warnings (no other debug info from the log). Here is the output ofmediainfo
for one of my flacs:To Reproduce This is the script I am using:
Expected behavior No warnings should be printed since flacs are widely supported both by liquidsoap and ffmpeg (to my knowledge). The script should also function normally with
enable_autocue_metadata()
.Version details
Install method Installed the
liquidsoap_2.2.5-ubuntu-jammy-1_arm64.deb
package from GitHub