Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

Using Imagemagick to convert images to the video: background of the video is black, whereas the background of the pictures are white

Writer Sophia Terry

I created a movie file from a set of PDF files using:

mogrify -verbose -density 500 -resize 800 -format png ./*.pdf"
convert -delay 600 *.png movie.mp4

on Microsoft Windows 10 (requires Imagemagick and Ghostscript to be installed). The first command converts PDF files to PNG. The second command converts PNG files into 1 MP4 file.

When I opened the resulting movie.mp4 in VLC, the background of the video is black, whereas the background of the pictures are white. How can I fix this issue?

4

1 Answer

As slhck pointed out in the comments, the issue stems from a transparency layer that convert does not handle properly.

To prevent mogrify from adding the transparency layer, add -background white -alpha off:

mogrify -background white -alpha off -verbose -density 500 -resize 800 -format png ./*.pdf`

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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