How to remove black background in animation/movies in latex Beamer

How to remove black background in animation/movies in latex Beamer

Gone the days when we used overhead projectors or film projectors, in the current world, we often use the Microsoft or beamer presentation slides to show our results. For a better presentation of the data, we use animation or the movies to pass the message of the work done.

In Beamer, while using  

\movie[label=cells,width=5.72cm,height=6.2cm,loop,poster,showcontrol]
{\includegraphics[width=5.72cm,height=6.2cm]{image.png}{movie.mp4}


command, sometimes gives an annoying black background and does not look good.

Here, I am providing the solution to this problem. The cause of the problem is the mismatch in the size of the image and movie (say movie.mp4 file) file.

Hence, the do the following to resolve this issue:

(1) Get the dimensions of the movie file by the following command:

mediainfo movie.mp4

This will return the width (W) and height (H) of the movie in the units of pixels.

(2) Get the dimensions of your image by the following command:

file image.png

This will return the width (w) and height (h) of image in the units of pixels.
Now you will observe a mismatch in the sizes of movie (W X H) and image
(w X h). So, all you need to do is resize the movie by the following command

(2) Resize your movie so that the dimensions of moive matches with that of the image:

ffmpeg -i movie.mp4 -vf scale=w:h ResizedMovie.mp4

Now do the regular thing to include an animations/movie in your Beamer.
I hope this will resolve the problem.

Happy coding!! :-)


Comments

Popular posts from this blog

How to Embed mp4 movie in beamer latex presentation

How to install ifort compiler in you personal directory on University cluster/workstation

How Install XGRAFIX in Ubuntu-12.04