Dealing with videos that contain coverart/mjpeg streams

This is a tip rather than a question.

I ran into an error today where my usual video assembly failed on a specific file. The failure happened on the second step in my assembly with an initially confusing error message: “Unable to stat file.”

The video file played fine locally in all browsers and players.

I inspected the video file a bit with ffprobe and noticed it has two video streams: one for video and an mjpeg stream for “cover art”.

In this case I want to ignore the cover art stream and just use the video. I added the following ffmpeg parameters to the first encoder step in my assembly and it then worked as expected.

'ffmpeg': {
  'map': ['0', '-v', 'V'],

Hope it helps someone!

1 Like

Really awesome tip! I think this is the second time we’ve seen a cover art related issue (the other was in an mp3 file). So this is something that could definitely be upgraded on the API side to be automatically handled I think.

And Transloadit now does this automatically so this tip is obsolete :slight_smile: Nice!