0

I want to add artwork to my MP4 file. How do I do this successfully / without errors? I've tried these methods with numerous MP4 files, none worked. If you would like to replicate the errors / bugs, here are the sample files I've used for this question.

I've tried the following:


  1. ffmpeg -i sample.mp4 -i sample.png -map 0 -map 1 -c copy -disposition:v:0 attached_pic sample_w_artwork.mp4 as stated by Lukas

with this error:

[mp4 @ 0000019ee4852280] Could not find tag for codec h264 in stream #0, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument

ffmpeg 4.2.2 (Windows build by Zeranoe)

  1. atomicparsley sample.mp4 --artwork sample.png --overWrite

with no success; AtomicParsley

I get this message when executing the first time:

Started writing to temp file.
 Progress: =============================================>100%|
 Finished writing to temp file.

Executing the next (nth) time gives this:

Updating metadata...   completed.
  1. Adding artwork through the GUI Tag Editor using both available versions: i686-w64 & x86_64-w64

with no success; it creates a sample.mp4.bak file, even though the software says that the operation was successful

can't insert any more links, because I got too little rep apparently

  1. Mp3tag (mp3tag.de/en)

with no success; I can successfully add the image as a cover, but it's not visible in the File Explorer. After saving it says Saved tag in 1 of 1 files. The picture can been seen in Mp3tag though as if it's applied.

  1. Tag&Rename (softpointer.com)

with no success; same story as with Mp3tag, I can apply and it's visible in the app, but not in File Explorer.

  1. mp4v2 (https:// code.google.com/archive/p/mp4v2/downloads)

mp4tags.exe -picture sample.png sample.mp4

with no success; it executes with no (error)message

I found it on this thread

(https:// forum.videohelp.com/threads/388025-How-to-set-the-thumbnail-of-a-video-clip).

Have used the updated version which is the Windows build

(https:// forum.doom9.org/attachment.php?attachmentid=14314&d=1407985798).

  1. iTunes

iTunes 12.10.6.2 (Microsoft Store version)

iTunes doesn't load the file into the library. I can run it fine though in QuickTime Player.

I didn't notice the 'Home Videos' tab. Now I can see it in there. I tried to apply the image, and it applied it only inside iTunes... So it's still not working for me.

I tried to convert the MP4 to M4A and then adding it to iTunes. I was finally successfully able to change the cover and it was visible in File Explorer. But that's not what I want.

I know for a fact that it's possible, because I've seen pictures on the Internet and YT and different threads where an answer is upvoted.

  1. tag

https:// github.com/b4winckler/tag

The description is: Simple command line audio tag editor... After having to install millions of libraries and a package manager I was stuck with the compilation of the software, followed all the steps, didn't work.

I've also tried using MP4art as suggested by a comment on another issue about this. He didn't include a link to it so I went looking and found another issue about this. One comment recommended MP4art as well, with a link that's dead.


I believe I've used some other methods as well but can't think of them right now. Will update if I recall.

Any help is greatly appreciated.

symonxd
  • 21
  • 1
  • 8
  • Use the command as shown at https://stackoverflow.com/a/54719926 – Gyan Apr 23 '20 at 06:36
  • Didn't work, does it work for you? – symonxd Apr 23 '20 at 12:37
  • Add -report and rerun. Share report. – Gyan Apr 23 '20 at 13:09
  • Where do I insert it? I don't want to spend another 30 mins figuring out haha `ffmpeg -i sample.mp4 -i sample.png -map 1 -map 0 -c copy -disposition:0 attached_pic out.mp4` – symonxd Apr 23 '20 at 13:13
  • It's a global option, so anywhere after ffmpeg. – Gyan Apr 23 '20 at 13:15
  • Ah, yes I figured. Here's the file: http://www.mediafire.com/file/pfgy1dakha5q44s/ffmpeg-20200423-151515.log/file – symonxd Apr 23 '20 at 13:18
  • The sample.mp4 on which you've run the command already has two cover images attached and the command attaches a third image. – Gyan Apr 23 '20 at 13:27
  • I'm confused, how do I fix this then? When loading it into Mp3tag it doesn't show that I have a cover on it... – symonxd Apr 23 '20 at 13:30
  • `ffmpeg -i sample.mp4 -i sample.png -map 1 -map 0:v:0 -map 0:a -c copy -disposition:v:0 attached_pic sample_w_artwork.mp4` – Gyan Apr 23 '20 at 13:52
  • I still does nothing for me, does it work for you? Report: http://www.mediafire.com/file/9d656z6bln8owhp/ffmpeg-20200423-161713.log/file – symonxd Apr 23 '20 at 14:16

2 Answers2

1

set disposition in the image.-disposition:v:0 is mapping sample.mp4. change from 0 to 1.

ffmpeg -i sample.mp4 -i sample.png -map 0 -map 1 -c copy -disposition:v:1 attached_pic sample_w_artwork.mp4
nico_lab
  • 1,044
  • 1
  • 8
  • 10
0

In the Codec Tweak Tool under Miscellaneous > Thumbnails the checkbox for .mp4 was unchecked. After checking it and saving the settings it finally showed the thumbnail.

The Tweak Tool is installed with K-Lite Codec Pack. There are different editions available, I use the Standard edition so I can't talk for the other ones.

Credits for finding the solution: Furty from the same (copied) thread on Super User in a comment

symonxd
  • 21
  • 1
  • 8