twopoint71 / ogg-image-blobber

Simple script to convert jpg image files into base64 blobs suitable for attaching to ogg files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ogg-image-blobber

Simple script to convert jpg files into base64 blobs suitable for attaching to ogg image files as metadata_block_picture Runs in bash, no known dependencies, simply uses what come on a standard Linux install

The image width/height determination method feels fragile, but it seems to work so far.

Follows the format outlined by ogg creators

https://xiph.org/flac/format.html#metadata_block_picture

With credit to Biapy

https://superuser.com/questions/169151/embed-album-art-in-ogg-through-command-line-in-linux

Example usage: This produces cover.base64 blob

$ ogg-image-blobber.sh cover.jpg

This attaches the blob to an ogg file

$ ffmpeg -i file.ogg -metadata "metadata_block_picture=$(cat cover.base64)" new.ogg

About

Simple script to convert jpg image files into base64 blobs suitable for attaching to ogg files.

License:MIT License


Languages

Language:Shell 100.0%