Replies: 1 comment
-
Interesting indeed. regarding
This has a dedicated setting: Exclude these metadata from automatic recording. settings.request.metadata_decoders.recode.exclude := ["apic", "metadata_block_picture", "coverart"] |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Moin
I am trying to add image data to a stream. I have a FLAC/OGG stream that is actually fed by an ALSA source. Therefore I want to insert the image into the stream via harbor via http.
The general structure is as follows
The OGG container provides the
metadata_block_picture
to store images. I had considered that it would probably be wise to simply feed in a file with an included image inmeta_block_picture
directly via the playlist as a test. If the image is passed through directly, then at least it would be clear that it is not filtered during processing, so a happy path to start from modifications.I have therefore fed an image into an ogg/vorbis with the following line. The line is adapted from here, as an image I had a small 20kb .jpg. : https://superuser.com/questions/1708793/add-art-cover-in-ogg-audio-file
ffmpeg -i test.ogg -acodec copy -map 0:a -metadata:s:a METADATA_BLOCK_PICTURE=“$(cat vorbis.head test.jpg | base64 --wrap 0)” test_bild.ogg
The VLC player displays the image correctly, so it seems (with a little optimism) to be validly inserted.
I then injected the file and used
playlist()
to play a playlist with only this file as in my earlier tests. Playback works, but the image does not come through. I have two theories.This is still too strange for me as an error message, so I checked another way. To limit the problem, I looked at what tooling is available and installed the “easytag” software. It offers a GUI to edit metadata and also to save the image to the file.
When you add a picture to an .ogg file with the software, it adds the picture to the
meta_block_picture
as expected. I also realized, that the METADATA_BLOCK_PICTURE is not shown usingffprobe
, so I usedvorbiscomment
.However, it feels that it adds a second mjpeg (?) video track with the picture, which is probably a different way of adding picture information. I suspected that this was more likely to cause problems, so I removed it via:
ffmpeg -i test_image.ogg -vn -c:a copy output.ogg
.But it seems I am wrong and this is the same thing and in practise how ffmpeg handles this
METADATA_BLOCK_PICTURE
Meta field (please correct me). In result the METADATA_BLOCK_PICTURE is also gone, not what I wand:In my test, however, I also noticed that the VLC player uses some kind of caching for images. When I changed the cover image, the old image was always displayed - even after restarting the player. So I looked for an alternative and discovered the
smplayer
. It really doesn't win any beauty prizes, but it seems to always show the current image.So I tried the full chain with the
test_image.ogg
in the Playlist and checked what is happening in the stream at the end. The problem is that the tooling is not explicit enougt in the result.I get the Stream using wget and save the file. Then I look with different toolsffprobe
shows not the Metadata (as expected like it seems it is not able to?)vorbiscomment
shows nometadata_block_picture
smplayer
is not showing any image, also not directly playing the stream from icecastI searched a bit through the source code of Liquidsoap for keywords and came across a function that seems to filter things.
I suspect “recording” is a spelling mistake for “recoding” . The context of the code is not primary the encoding, it is from the "request" part. But this should be used e.G. by playlist() and/or harbor icecast?
liquidsoap/src/core/request.ml
Line 341 in 4587675
Maybe there is something happening? But I'm at my wit's end now and I'm running out of approaches and ideas, it's a bit complex and has many aspects. What actually surprises me is that I can't find an existing example of this anywhere. I can't be the first to simply want to “push” an image through to the client :D I am grateful for every thought!
Beta Was this translation helpful? Give feedback.
All reactions