How to add album art with ffmpeg?

With Recent version, ffmpeg -i in.mp3 -i test.png -map 0:0 -map 1:0 -c copy -id3v2_version 3 -metadata:s:v title=”Album cover” -metadata:s:v comment=”Cover (front)” out.mp3 Use -map to associate input stream to the output Use -c copy to directly demux/remux The -id3v2_version 3 is what is missing in your command line. Note that that wil write an … Read more

My ffmpeg output always add extra 30s of silence at the end

Use ffmpeg -y -loop 1 -framerate 2 -i “some.png” -i “with.mp3” -c:v libx264 -tune stillimage -c:a aac -b:a 192k -pix_fmt yuv420p -shortest -fflags +shortest -max_interleave_delta 100M “result.mkv” Containers (AVI, MP4, MKV) usually store multiple streams in an interleaved fashion i.e. a few seconds of video, then a few seconds of audio, and so on. So … Read more

How can I display Album Art using MediaStore.Audio.Albums.ALBUM_ART?

Here’s how I get album art for a song: Cursor cursor = getContentResolver().query(MediaStore.Audio.Albums.EXTERNAL_CONTENT_URI, new String[] {MediaStore.Audio.Albums._ID, MediaStore.Audio.Albums.ALBUM_ART}, MediaStore.Audio.Albums._ID+ “=?”, new String[] {String.valueOf(albumId)}, null); if (cursor.moveToFirst()) { String path = cursor.getString(cursor.getColumnIndex(MediaStore.Audio.Albums.ALBUM_ART)); // do whatever you need to do } albumId refers to MediaStore.Audio.Media.ALBUM_ID for that song. If you’re are looking for album art for a particular … Read more