Welcome! Log In Create A New Profile

Advanced

Movie not displayed properly

Posted by pmoghimi 
Movie not displayed properly
March 16, 2021 10:18PM
Hi,

I am running a simple script that requires displaying a movie of randomly moving white dots against a plain background. The movie is displayed fine if the background color in monkeylogic and in the movie are both set to [0 0 0] (black). If I change the background color of the movie and monkeylogic to anything other than black (e.g. [0.2 0.2 0.2] which is dark gray), then the movies are displayed with a black line at the bottom. I tried playing with the movie size or its location on the screen, but the black line at the bottom of the movie does not go away. What can I do to be able to get rid of the line?

I run monkeylogic 2, Jan 4th 2019 build.

Thanks for your help,
Pantea
Re: Movie not displayed properly
March 16, 2021 10:42PM
Inspect your movie with a video editor. It is because the video frames in your movie are smaller than the size that the movie file claims (likely by one pixel). Basically the black line is in your movie.
Re: Movie not displayed properly
March 19, 2021 10:01PM
Thanks for your prompt response. I double checked my videos and examined every frame, but the line does not seem to be in the movie. I tested the exact same movie files on mokeylogic 1 (the old version), and they were displayed properly. I think this has something to do with how monkeylogic 2 displays the movies. Does anyone have an idea how I could fix it?

Thanks,
Pantea
Re: Movie not displayed properly
March 20, 2021 02:37AM
Okay. It is an issue of the codec installed in your computer, but, since I do not know whether the video editor decoded the movie with the same codec or not, I guess it wasn't a good solution. Re-encoding the movie with a different codec will fix the problem, but, to be sure, please send me the movie file. I will take a look.

The fact that you did not see the problem in the original ML does not mean that it worked in the right way.
Re: Movie not displayed properly
March 22, 2021 04:58PM
Thanks a bunch. Here is a sample movie that I have had difficulty displaying properly.

Best,
Pantea
Attachments:
open | download - Passive_C1_n1.avi.zip (792.2 KB)
Re: Movie not displayed properly
March 22, 2021 05:34PM
What is your Windows version, by the way?
Re: Movie not displayed properly
March 22, 2021 06:56PM
Windows 7 professional, 2009.

Thanks,
Pantea
Re: Movie not displayed properly
March 22, 2021 07:16PM
I asked your Windows version, because I did not see the problem in my Win10 computer. I have a movie from another user who reported the same problem, but that movie also runs fine on Win10. So I think the codec shipped with Win7 is the cause. As I said, re-encoding with a different codec is probably the easiest solution.

-----

I confirmed it occurred in Win7.
Re: Movie not displayed properly
March 22, 2021 09:56PM
Thanks a bunch. I switched to a non-compressing codec in MATLAB to generate my movies and that completely solved my problem.

Thanks again,
Pantea

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.