| Streaks in Movie
• | | | |
 | Streaks in Movie
by Adam Theisen on Jan 13, 2012 at 8:18:52 pm |
Hello,
I have been searching a while for the answer to this question and have not had any luck yet. Hopefully I did not miss something.
I am using imagemagick convert to combine a jpg onto a png image (final image is a png). I then try and make a movie out of these images using ffmpeg. In the resultant movie (not the images) there are yellow streaks across the image.
http://reels.creativecow.net/film/streaks-in-resultant-movie
Thanks for the help!
| | | | |
• | | | |  | Re: Streaks in Movie by Adam Theisen on Jan 24, 2012 at 8:44:16 pm |
The movie is fine if I do not use the imagemagick convert command, but when I try to combine another image (even if it is the same image) I get streaks when I use ffmpeg. I am using:
call='convert -composite '+tsi_temp+$
' '+tsi_temp+' -geometry 150x140+580+27 '+tsi_temp
to convert the image. The latest I have found out is after I use the convert command, the color table from the metadata is not available.
I am guessing that I am loosing information along the way that ffmpeg uses.
Thoughts?
Thanks!
Adam
| | | | |
• | | | |  | Re: Streaks in Movie by Michael Rampe on Jan 30, 2012 at 10:58:14 pm |
[Adam Theisen] "The latest I have found out is after I use the convert command, the color table from the metadata is not available."
I have had issues with this in the past....
I fixed it by running another convert command to set the colorspace.
Example:
$ convert input.png -type TrueColorMatte output.png
Give it a go and try a few different colorspaces to see if this helps.
Michael
| | | | |
• | | | |  | Re: Streaks in Movie by Adam Theisen on Jan 31, 2012 at 5:24:53 pm |
Thank you for the suggestion!
I was able to get it to work, but only for the grayscale colorspace. The other spaces are still leaving me with streaks in the final movie and an empty color table when I read it in.
I am going to keep testing this way and see what I can get.
| | | | |
• | | | |  | Re: Streaks in Movie by Michael Rampe on Jan 31, 2012 at 8:59:56 pm |
[Adam Theisen] "I was able to get it to work, but only for the grayscale colorspace. The other spaces are still leaving me with streaks in the final movie and an empty color table when I read it in."
Can you post some of these images so I can try to replicate? I am intrigued now;-)
Michael
| | | | |
• | | | |  | Re: Streaks in Movie by Adam Theisen on Jan 31, 2012 at 9:09:41 pm |
| | | | |
• | | | |  | Re: Streaks in Movie by Michael Rampe on Feb 1, 2012 at 9:00:07 pm |
...and a sample of your FFmpeg command line? (codec, bitrate etc.)
| | | | |
• | | | |  | Re: Streaks in Movie by Adam Theisen on Feb 1, 2012 at 9:13:56 pm |
Ah... Of course... I am creating a .mov file and then converting it to an mp4 file along with a couple other formats (mpg, ogv).
To .mov
ffmpeg -f image2 -bufsize 12000.0k -i image_%2d.png -y -r 20 -sameq movie.mov
From .mov to mpg4
ffmpeg -f mov -i movie.mov -vcodec libx264 -fpre /apps/base/share/ffmpeg/libx264-normal.ffpreset -bufsize 12000.0k -b 3000k -minrate 500 -y movie.mp4
| | | | |
• | | | |  | Re: Streaks in Movie by Michael Rampe on Feb 1, 2012 at 9:26:12 pm |
ahhhh, ok.
[Adam Theisen] "ffmpeg -f image2 -bufsize 12000.0k -i image_%2d.png -y -r 20 -sameq movie.mov"
Why are you setting bufsize on the input? Firstly, try to remove this.
[Adam Theisen] "ffmpeg -f mov -i movie.mov -vcodec libx264 -fpre /apps/base/share/ffmpeg/libx264-normal.ffpreset -bufsize 12000.0k -b 3000k -minrate 500 -y movie.mp4"
Again, not sure why you are setting bufsize here either? The streaks you are getting could very easily be caused by buffer overflows.
Also, from this command line, I can determine that it may be time to upgrade to a more recent version. -fpre for libx264 is now deprecated and -preset is used to directly access x264 presets. I am running a very recent version which comes with NO x264 preset files in the ffprests folder (only vpx presets)
Michael
| | | | |
• | | | |  | Re: Streaks in Movie by Adam Theisen on Feb 1, 2012 at 9:57:43 pm |
We were mainly setting the buffer to limit the size of the movie files. Not sure if that is the proper way, but it seemed to work.
I did remove it and tried it, but I was still seeing streaks, even in the original .mov file.
I will try and get the updated version. I don't have admin privileges on the machine I'm running this on, so I will try and get them to install the latest version. It might take a little while though.
Thanks for the suggestions!
| | | | |
• | | | |  | Re: Streaks in Movie by Michael Rampe on Feb 1, 2012 at 10:30:51 pm |
[Adam Theisen] "
I did remove it and tried it, but I was still seeing streaks, even in the original .mov file."
OK. This helps narrow down the problem to your intermediate.
As you are not specifying a codec here, FFmpeg uses a default for the container which is most likely mpeg4 (divx variety not x264 variety).
I use .mpg with -sameq for my intermediates which does result in near lossless large files.
All you would need to do is change .mov to .mpg in your example and FFmpeg will get the codec right.
eg.
$ ffmpeg -f image2 -i image_%2d.png -y -r 20 -sameq movie.mpg
If the streaks are still there after that, there is another upstream issue but we are getting closer;-)
Michael
| | | | |
• | | | |  | Re: Streaks in Movie by Adam Theisen on Feb 2, 2012 at 3:13:44 pm |
[Michael Rampe]$ ffmpeg -f image2 -i image_%2d.png -y -r 20 -sameq movie.mpg
Tried this and still had streaks, so it must be further upstream.
Would an issue with the color table associated with the image possibly cause this? It might be that I have to go back to my original code and fix something in there.
Have you tried to replicate this with the images I sent you?
Thank you!
| | | | |
• | | | |  | Re: Streaks in Movie by Adam Theisen on Feb 2, 2012 at 5:51:20 pm |
Hello,
I was able to get this to work, but I had to write out to a jpg format instead of png. Not really a big deal on my end, but now the streaks are gone. It took a little bit to get the correct colortable with IDL, but it works now.
Thanks for all the help!
| | | | |
• | | | |  | Re: Streaks in Movie by Michael Rampe on Feb 2, 2012 at 9:14:20 pm |
Good to see a resolution.
Lesson for all of us: png is good for some things but not for all;-)
Michael
| | | | |
| |
|