| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| FFMPEG video->gif palette issues; Help? | |
|---|---|
| Tweet Topic Started: May 16 2011, 12:22 AM (4,349 Views) | |
| IceMetalPunk | May 16 2011, 12:22 AM Post #1 |
|
We are all IMPerfect. Be proud!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I'm using PHP's popen() to call FFMpeg from the command-line in order to convert videos. I've long since been able to convert videos to .flv for playback just fine. My problem is now I'm trying to convert snippets of the video to animated GIFs. I've gotten the conversion working, but the problem is that the palette of the resulting GIF seems quite a bit off. I realize GIFs can only handle 256 colors, but there's just something...wrong with the colors I'm getting. It's not so bad that red becomes yellow, for example; the images are still easily recognizable. It's just off somehow. I'm calling FFMpeg with these parameters:
Apparently, FFMpeg's GIF codec can only support 24-bit colors, hence the rgb24 pixel format. The -ss 10 -t 3 are simply the start times and duration to convert to GIF (so for testing I'm converting seconds 10 through 13). -y just means "overwrite output files if they already exist". -an means "no audio", and -r means "frame rate" (this can be changed with no issues, I've found). If you want to see for yourself, test out your own video on my test site here: http://imperfectdesigns.dyndns.org/upload.php . I hope you'll agree that the palette seems wrong. Does anyone know how to fix this? I've looked on ffmpeg support forums and Google, but no luck. -IMP
Edited by IceMetalPunk, May 16 2011, 12:23 AM.
|
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Technology Chat · Next Topic » |
| Track Topic · E-mail Topic |
10:13 AM Jul 11
|



![]](http://b1.ifrm.com/0/1/0/p601690/pipright.png)



10:13 AM Jul 11