[Ffmpeg-devel] [PATCH] Targa encoder

Benjamin Larsson banan
Wed Mar 21 15:00:10 CET 2007


Bobby Bingham skrev:
> Kostya wrote:
>> On Wed, Mar 14, 2007 at 08:07:36PM +0900, Bobby Bingham wrote:
>> [...]
>>>> Problem is that quicktime can't decode generated bitstream.
>>>> you can test encoder by using
>>>>
>>>> ffmpeg -i file -vcodec targa test.mov
>>>>
>>> I'm on linux, so I don't have quicktime for testing.  I did test 
>>> with mplayer, and ffplay with the patch applied, and both played 
>>> fine in my tests.  I'll try to get quicktime going under wine or 
>>> something for testing.
>>
>> Lavc decoder expect general picture format and will work on standalone
>> pictures too (ffmpeg -i file -f image2 -vcodec targa %05d.tga) while
>> QuickTime may expect only some subset. Try to compare your output with
>> samples here:
>> http://openquicktime.sf.net/files.php/aletrek/
>>
>
> I've compared against those, and the only obvious differences I see are:
>
> 1) my files don't claim to have a color map (which the spec says is 
> the right thing to do for true-color images).  those files claim to 
> have a zero-item color map.
>
> 2) my files aren't RLE compressed
>
> 3) my files have the footer at the end, which those don't.
>
> I've tried changing all these things about my encoder, and the result 
> still doesn't play in quicktime.  But interestingly enough, if you use 
> the command line you gave above (ffmpeg -i file -f image2 -vcodec 
> targa %05d.tga), quicktime's picture viewer will display the resulting 
> still targa images just fine.  I'll try to take a further look at it 
> tomorrow.
>

Hi, this openquicktime code should produce quicktime compatible files. 
Check and see if you can find any obvious diffrences.

http://openquicktime.cvs.sourceforge.net/openquicktime/OpenQuicktime/videoplugins/tga/codec_tga.c?revision=1.5&view=markup
http://openquicktime.cvs.sourceforge.net/openquicktime/OpenQuicktime/videoplugins/tga/tga.h?revision=1.1&view=markup

MvH
Benjamin Larsson






More information about the ffmpeg-devel mailing list