Answer the question
In order to leave comments, you need to log in
How to find out the encoding of an encrypted image and is it correct?
I'm trying to make it possible to access the icon of an audio file, but the resulting picture is encoded. It doesn’t look like base64, but I didn’t find anything similar on the Internet (Maybe it’s not even a picture?
I seem to get all the necessary data
{ title: 'Название песни',
artist: [ 'Певец' ],
albumartist: [ 'Певец' ],
album: 'Тут альбом ',
year: '2015',
track: { no: 96, of: 114 },
genre: [ 'Тут жанр' ],
disk: { no: 6, of: 6 },
...
var parser = mm(fs.createReadStream('Путь к аудио'), function (err, metadata) {
if (err) throw err;
console.log(metadata.picture);
});
{ format: 'jpg',
data: <Buffer ff d8 ff e1 00 a1 45 78 69 66 00 00 49 49 2a 00 08 00 00 00 05 00 12 01 03 00 01 00 00 00 01 00 00 00 31 01 02 00 0d 00 00 00 4a 00 00 00 32 01 02 00 ... > }
Answer the question
In order to leave comments, you need to log in
This buffer can be decoded as follows:
Buffer:
To paste in css:
Used - npm musicmetadata
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question