1

I tried using FFMPEG, however if it has cover art it fails and the cover art is not included in the MP4 file.

No, I will not use VLC.

2
  • Could you please add a little more detail? What exactly did you do, what did you expect to happen and what happened instead? Did you encounter any warning or error messages? Please reproduce them in their entirety in your question. It would also help to see the output of ffprobe for the source and destination file. You can select, copy and paste terminal content and most dialogue messages in Ubuntu. Please edit your post to add information instead of posting a comment. (see How do I ask a good question?) Mar 2, 2018 at 13:39
  • 1
    Close voters. Crafting an answer..
    – Elder Geek
    Mar 7, 2018 at 18:29

1 Answer 1

1

If I'm understanding your question correctly, the problem that you are having has nothing to do with ffmpeg and everything to do with your choice of container. The MP4 container is fine when put to the use it was designed for, but is a poor choice when attempting to include cover art. To the best of my knowledge, the best choice of multimedia container that supports what you are attempting is Matroska as it supports adding virtually anything to a multimedia file. There's an example of adding cover art available here. A quick look the file manager (nautilus in my case) shows the cover art as the icon as shown below:

enter image description here

mediainfo makes it clear that there are attachments in the container providing output like:

mediainfo cover_art.mkv 
 ----Snip---
    Attachment                               : Yes / Yes / Yes / Yes
 ----Snip--- 

And ffmpeg will even tell you what those attachments are with ffmpeg -i cover_art.mkv:

--Snip--
    Metadata:
      filename        : cover.jpg
      mimetype        : image/jpeg
    Stream #0:3: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 120x176 [SAR 300:300 DAR 15:22], 90k tbr, 90k tbn
    Metadata:
      filename        : small_cover.jpg
      mimetype        : image/jpeg
    Stream #0:4: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 1067x600 [SAR 96:96 DAR 1067:600], 90k tbr, 90k tbn
    Metadata:
      filename        : cover_land.jpg
      mimetype        : image/jpeg
    Stream #0:5: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 213x120 [SAR 96:96 DAR 71:40], 90k tbr, 90k tbn
    Metadata:
      filename        : small_cover_land.jpg
      mimetype        : image/jpeg

Of course you'll have to map the streams appropriately and provide the metadata upon creation. The thing to remember is that ffmpeg treats these images as additional video streams.

Crafting the ``ffmpeg` command line that you need can be assisted with a review of the documentation. If your .ogg file is audio only you can use the MP3 container and your answer is here.

2
  • But can you upload the Matroska format to youtube?
    – Prisma
    Mar 22, 2018 at 0:49
  • @Prisma I honestly never tried. What Youtube supports sounds like another question to me. Cheers!
    – Elder Geek
    Mar 22, 2018 at 13:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.