Log in

View Full Version : color problem when piping Apple ProRes with mencoder to x264


Selur
25th November 2010, 17:05
I'm using the MEncoder Sherpya-SVN-r32492-4.2.5 from http://sourceforge.net/projects/mplayer-win32/files/, the binary codec package from http://www.mplayerhq.hu/design7/dload.html#binary_codecs and latest 32bit x264 Version from x264.nl to convert a 29MB Apple ProRes File (http://selur.bplaced.net/AppleProRes.mov) (<120 frames).

mencoder AppleProRes.mov -demuxer mov -noskip -vf scale,format=i420 -nosound -mc 0 -ovc x264 -of rawvideo -o "D:\Encoding Output\mencoderDirect.264"
-> delivers correct output

mencoder "AppleProRes.mov" -really-quiet -demuxer mov -noskip -vf scale,format=i420 -nosound -mc 0 -ovc raw -of rawvideo -o - | x264 --crf 18 --fps 24000/1001 --input-res 848x352 --output "D:\Encoding Output\mencoderPipe.264" -
-> output has 'b0rked' colors (http://www.multiupload.com/4E7CIY95N0)

I also tried -vf format=yuy2,scale,format=i420 instead of -vf scale,format=i420 , but that didn't help either.

Does anyone know what's going wrong and how to fix it?

Cu Selur

kolak
25th November 2010, 17:37
Avisynth's qtinput plugin keeps proper colors for ProRes source- output is YUY2.

Andrew

Selur
25th November 2010, 18:54
I wanted to stay with only mencoder&x264 if possible and not use avisynth or other additional tools.
using:mencoder AppleProRes.mov -demuxer mov -ovc raw -noskip -vid 0 -vf scale,format=i420 -sws 0 -forcedsubsonly -noautosub -nosound -mc 0 -lavdopts threads=1 -really-quiet -of rawvideo -o test.yuv I created a raw test.yuv file and checked it with Avisynth RawSource("test.yuv",848,352,"I420")
and VirtualDub
-> raw output (http://selur.bplaced.net/rawtest.zip) looks fine

Selur
25th November 2010, 19:44
Found the problem! It's the output to stdout that's inside components.h, when replacing "printf(" with "printf(stderr, " rawvideo output isn't broken when piping and using a component,...
Uploaded (http://selur.bplaced.net/mencoder.zip) a modified version of mencoder.

I wasn't aware I modifierd the binary codec pack, simply download http://support.apple.com/downloads/Apple_ProRes_QuickTime_Decoder_1_0_for_Windows extract it with winrar/7zip and place the AppleProResDecoder.qtx in folder, place the folder in the same folder mplayer lies in and rename the folder to codecs. (for AppleProRes one needs: AppleProResDecoder.qtx and qtmlClient.dll in the codecs folder)


Cu Selur