[MEncoder-users] How to convert from uncompressed yuv420 video to rgb 24?

gerlos gerlosgm at gmail.com
Mon Feb 23 16:01:56 CET 2009


James Hastings-Trew ha scritto:
> The Wanderer wrote:
>   
>> gerlos wrote:
>>
>>   
>>     
>>> The Wanderer ha scritto:
>>>
>>>     
>>>       
>>>> gerlos wrote:
>>>>
>>>>
>>>>       
>>>>         
>>>>> Hello everyone! I captured  many uncompressed videos (tens of
>>>>> GBs) from my webcam for astronomical processing.
>>>>>
>>>>> The format is YUV420, but my processing software doesn't
>>>>> understand this format, and need rgb24, so I need a way (possibly
>>>>> an automatic way) to convert all these files.
>>>>>
>>>>> Reading the documentation it seems to me that it's possible with 
>>>>> mencoder, but so far I couldn't find how... any clue?
>>>>>
>>>>>         
>>>>>           
>>>> I've never had occasion to do this myself, but from searching the
>>>> man page for 'colorspace', I think that '-vf scale' (and possibly
>>>> '-vf format') might be what you want.
>>>>       
>>>>         
>>> I'm not sure, but maybe I'm almost there...
>>>
>>> I tried this command:
>>> mencoder Dark_20090222_0139_011.avi -ovc raw -o out.avi -vf
>>> format=rgb24 scale=640,480
>>>     
>>>       
>> I think there's a mistake here in '-vf' syntax. Instead of a space
>> between the filters, try a comma: '-vf format=rgb24,scale' (you probably
>> also don't need the explicit resolution on the scale filter, since
>> you're just having it perform colorspace conversion).
>>
>>   
>>     
> And also, the format the scale command is wrong. -vf scale=640:480
>   

Ok, I tried this way, but it doesn't work. Here's the command I tried:
$ mencoder 20090223_1552_025_newtest.avi -ovc raw -vf
format=rgb24,scale=640:480 -o out.avi

And this is the relevant output of ffmpeg -i out.avi:
[CUT]
Input #0, avi, from 'out.avi':
  Duration: 00:00:06.42, start: 0.000000, bitrate: 51616 kb/s
    Stream #0.0: Video: 444P / 0x50343434, 640x480 [PAR 1:1 DAR 4:3], 
7.00 tb(r)
Must supply at least one output file

... And vlc still can't play this file!

I've already found a way to do this using ffmpeg, it's true, but I'd
like to know where are my mistakes with mencoder...

regards
gerlos





More information about the MEncoder-users mailing list