Using Imagemagick to convert images to the video: background of the video is black, whereas the background of the pictures are white
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.mp4on 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?
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`