I wanted to use mencoder to decode an avi file (and normally do some filtering which is not supported by ffmpeg), then pipe the output to ffmpeg to encode as prores using:
Problem is that the output is all blue, and all people look like smurfs, which normally is a good indicator that some color conversion went wrong.Code:mencoder -lavdopts threads=2 -really-quiet -of rawvideo -o - -ovc raw -demuxer lavf -vfm ffmpeg -noskip -vf scale,format=i420,scale,format=422p -nosound -mc 0 test.avi | ffmpeg -y -pix_fmt yuv422p -s 640x352 -f rawvideo -i - -threads 2 -vcodec prores_aw -profile:v 0 -f mov test.mov
-> does any one see where I made the mistake ?
+ Reply to Thread
Results 1 to 10 of 10
-
-
yes, but why?
Code:-vf scale,format=i420,scale,format=422p
-
-
I don't know. Try working backwards, and go step by step
1st are you sure it's not a prores decoding issue ? Try another player/decoder
2nd, something other than prores (ie. is it the prores encoder that is the problem ) ? - I doubt it , but try huffyuv or utvideo instead . If that test is ok, then the pipe up to ffmpeg should be ok
3rd , is it -vf scale or swscale ? try i420 with ffv1, instead of i422 , maybe something got swapped during the chroma upscale ?
.
.
. -
I 'm not familiar with the syntax for mencoder -vf scale, but why is format specified as i420, then 422p (not i422) ?
I would expect the same naming conventions between the arguments
i420, i422
or
420p, 422p
or
yuv420p, yuv422pLast edited by poisondeathray; 12th Jul 2013 at 10:58.
-
Only reason I do the conversion in mencoder is that I generate the call and switch out the encoder depending on the format I want to convert to (x264, vpxenc, ffmpeg, ....) and not all encoders can do the color conversion themself.
I 'm not familiar with the syntax for mencoder -vf scale, but why is format specified as i420, then 422p (not i422) ?
422p seems to be correct:
Code:#include "libmpcodecs/img_format.h" /* FIXME: snyc with img_format.h */ static struct { const char* name; unsigned int fmt; } mp_imgfmt_list[] = { {"444p16le", IMGFMT_444P16_LE}, {"444p16be", IMGFMT_444P16_BE}, {"444p14le", IMGFMT_444P14_LE}, {"444p14be", IMGFMT_444P14_BE}, {"444p12le", IMGFMT_444P12_LE}, {"444p12be", IMGFMT_444P12_BE}, {"444p10le", IMGFMT_444P10_LE}, {"444p10be", IMGFMT_444P10_BE}, {"444p9le", IMGFMT_444P9_LE}, {"444p9be", IMGFMT_444P9_BE}, {"422p16le", IMGFMT_422P16_LE}, {"422p16be", IMGFMT_422P16_BE}, {"422p14le", IMGFMT_422P14_LE}, {"422p14be", IMGFMT_422P14_BE}, {"422p12le", IMGFMT_422P12_LE}, {"422p12be", IMGFMT_422P12_BE}, {"422p10le", IMGFMT_422P10_LE}, {"422p10be", IMGFMT_422P10_BE}, {"422p9le", IMGFMT_422P9_LE}, {"422p9be", IMGFMT_422P9_BE}, {"420p16le", IMGFMT_420P16_LE}, {"420p16be", IMGFMT_420P16_BE}, {"420p10le", IMGFMT_420P10_LE}, {"420p10be", IMGFMT_420P10_BE}, {"420p9le", IMGFMT_420P9_LE}, {"420p9be", IMGFMT_420P9_BE}, {"444p16", IMGFMT_444P16}, {"422p16", IMGFMT_422P16}, {"422p10", IMGFMT_422P10}, {"420p16", IMGFMT_420P16}, {"420p10", IMGFMT_420P10}, {"420p9", IMGFMT_420P9}, {"444a", IMGFMT_444A}, {"422a", IMGFMT_422A}, {"420a", IMGFMT_420A}, {"444p", IMGFMT_444P}, {"422p", IMGFMT_422P}, {"411p", IMGFMT_411P}, {"440p", IMGFMT_440P}, {"yuy2", IMGFMT_YUY2}, {"yvyu", IMGFMT_YVYU}, {"uyvy", IMGFMT_UYVY}, {"yvu9", IMGFMT_YVU9}, {"if09", IMGFMT_IF09}, {"yv12", IMGFMT_YV12}, {"i420", IMGFMT_I420}, {"iyuv", IMGFMT_IYUV}, {"clpl", IMGFMT_CLPL}, {"hm12", IMGFMT_HM12}, {"y800", IMGFMT_Y800}, {"y8", IMGFMT_Y8}, {"y8a", IMGFMT_Y8A}, {"y16be", IMGFMT_Y16_BE}, {"y16le", IMGFMT_Y16_LE}, {"nv12", IMGFMT_NV12}, {"nv21", IMGFMT_NV21}, {"bgr24", IMGFMT_BGR24}, {"bgr32", IMGFMT_BGR32}, {"bgr16", IMGFMT_BGR16}, {"bgr15", IMGFMT_BGR15}, {"bgr12", IMGFMT_BGR12}, {"bgr8", IMGFMT_BGR8}, {"bgr4", IMGFMT_BGR4}, {"bg4b", IMGFMT_BG4B}, {"bgr1", IMGFMT_BGR1}, {"rgb64be", IMGFMT_RGB64BE}, {"rgb64le", IMGFMT_RGB64LE}, {"rgb48be", IMGFMT_RGB48BE}, {"rgb48le", IMGFMT_RGB48LE}, {"rgb48ne", IMGFMT_RGB48NE}, {"rgb24", IMGFMT_RGB24}, {"rgb32", IMGFMT_RGB32}, {"rgb16", IMGFMT_RGB16}, {"rgb15", IMGFMT_RGB15}, {"rgb12", IMGFMT_RGB12}, {"rgb8", IMGFMT_RGB8}, {"rgb4", IMGFMT_RGB4}, {"rg4b", IMGFMT_RG4B}, {"rgb1", IMGFMT_RGB1}, {"rgba", IMGFMT_RGBA}, {"argb", IMGFMT_ARGB}, {"bgra", IMGFMT_BGRA}, {"abgr", IMGFMT_ABGR}, {"xyz12be", IMGFMT_XYZ12LE}, {"xyz12le", IMGFMT_XYZ12BE}, {"gbr14pbe", IMGFMT_GBR14PLE}, {"gbr14ple", IMGFMT_GBR14PBE}, {"gbr12pbe", IMGFMT_GBR12PLE}, {"gbr12ple", IMGFMT_GBR12PBE}, {"gbr24p", IMGFMT_GBR24P}, {"mjpeg", IMGFMT_MJPEG}, {"mjpg", IMGFMT_MJPEG}, { NULL, 0 } };
Last edited by Selur; 12th Jul 2013 at 11:29.
Similar Threads
-
Mix 2 videos with FFmpeg
By wolfox in forum Video ConversionReplies: 3Last Post: 4th Sep 2012, 07:31 -
60i and ffmpeg or mencoder
By wiz561 in forum Video ConversionReplies: 9Last Post: 9th Jan 2012, 17:02 -
fFMpeg or Mencoder Help! :(
By Shohag_ifas in forum Video ConversionReplies: 0Last Post: 4th Feb 2011, 17:52 -
H.264 ffmpeg vs mencoder
By tommcd64 in forum Video ConversionReplies: 1Last Post: 6th Jun 2010, 13:22 -
Color shift in ffmpeg X - ffmpegX native color space and gamma?
By rbot1980 in forum ffmpegX general discussionReplies: 0Last Post: 2nd Feb 2009, 21:16