How to ignore certain type of streams (mjpeg) while encoding videos in ffmpeg
You can avoid the MJPEG cover art by using properly ordered selective mapping:

-map 0 -map -v -map V


What this does:


-map 0 Map all streams from input 0 (which is the first input per ffmpeg command).
-map -v Then, ignore all video streams including cover art.
-map V Finally, include all non-cover art video streams.


v matches all video streams, and V only matches video streams which are not attached pictures, video thumbnails or cover arts.

For more info see the documentation on stream specifiers and the -map option.