[MEncoder-users] Color Space Problem with a Sequence of RGB JPEG Images
Irv Elshoff
elshoff at wldelft.nl
Wed Oct 7 00:35:04 CEST 2009
Greeting,
I'm fairly new to Mencoder and would like to create movies from a
sequence of existing JPEG files. The final output is intended to be
viewed by mainstream movie players such as MPlayer, QuickTime and
Windows Media Player. I'm not targeting any specific "hard" output
media (e.g., DVD).
My problem is that the perceived colors in my input files - which look
OK using every image viewer I know - are changed on output to something
that does not look OK. For instance, pure white (0xFFFFFF) becomes pink
(0xFF7DFF) and pure black becomes olive green (0x008700) in the output.
I'm looking for command-line options to maintain the perceived colors.
The JPEG images were produced by my own C++ program using the
ubiquitous libjpeg "6b" library. In my output routine I set the color
space to JCS_RGB because we need to retain as much information as
possible (the source and most destinations are RGB-based). If I change
this to JCS_YCbCr ("YUV") in a test program, Mencoder makes proper
looking output, but this is not an option...
My second problem is that I have more than 2 TB of existing RGB JPEG
files that I want to be able to process. I can use something like
ImageMagick to convert each frame to something else (e.g., uncompressed
TIFF) and then make a movie from those files, but this isn't practical.
ImageMagick seems to know how to deal with RGB JPEGs. I'm hoping that
Mencoder can too, with the right command-line options. I've tried a
bunch based on what I read from Google hits, but nothing is working for me.
I'd really appreciate any help you can give.
If needed, I can supply a simple (single source file, GNU) C++ program
to generate the synthetic test images, the test images themselves,
single-frame mencoded movies (that demonstrate the problem), and
whatever else is relevant.
For the record, the mencoder command line I'm using is:
/opt/mplayer/bin/mencoder \
mf://input.jpg \
-mf fps=5 \
-ovc lavc \
-lavcopts vcodec=mpeg4:mbd=2:trell \
-of lavf \
-lavfopts format=mov \
-o output.mov
I work on Linux and Mac. I've got Windows XP if needed.
Cheers,
Irv.
More information about the MEncoder-users
mailing list