[MEncoder-users] image sequence output, distorted colours.

James Tripp eliared at yahoo.com
Thu Aug 2 23:15:59 CEST 2007


James Tripp <eliared at yahoo.com> wrote: 
Hi,

someone was having trouble encoding image sequences that he'd first run
 through exiftran with: exiftran -a -i -p *.jpg
Here is sample material:
http://stuff.nieko.net/burst/

mencoder mf://r*.JPG -mf fps=10:type=jpeg -ovc xvid -xvidencopts
 bitrate=1600 -oac copy -o output.avi

MEncoder Sherpya-SVN-r22870-4.1.2 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (Family: 15, Model: 2, Stepping:
 9)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

success: format: 16  data: 0x0 - 0x0
MF file format detected.
[mf] search expr: r*.JPG
[mf] number of files: 2 (8)
VIDEO:  [IJPG]  0x0  24bpp  10.000 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:16  fourcc:0x47504A49  size:0x0  fps:10.00  ftime:=0.1000
xvid: using library version 1.1.2 (build xvid-1.1.2)
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG decoder)
==========================================================================
VDec: vo config request - 180 x 240 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 3)
Movie-Aspect is 0.75:1 - prescaling to correct movie aspect.
videocodec: XviD (180x240 fourcc=44495658 [XVID])
xvid: par=0/0 (vga11), displayed=180x240, sampled=180x240
xvid: CBR Rate Control -- bitrate=1600kbit/s
Writing header...
ODML: vprp aspect is 12288:16384.
Writing header...
ODML: vprp aspect is 12288:16384.
Pos:   0.1s      1f (100%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]
Pos:   0.1s      2f (100%)  0.00fps Trem:   0min   0mb  A-V:0.000
 [0:0]Flushing video frames.
Writing index...
Writing header...
ODML: vprp aspect is 12288:16384.

Video stream:  584.880 kbit/s  (73110 B/s)  size: 14622 bytes  0.200
 secs  2 frames



whereas the same with the pics not run through exiftran gives:



MEncoder Sherpya-SVN-r22870-4.1.2 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (Family: 15, Model: 2, Stepping:
 9)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

success: format: 16  data: 0x0 - 0x0
MF file format detected.
[mf] search expr: q*.JPG
[mf] number of files: 3 (12)
VIDEO:  [IJPG]  0x0  24bpp  10.000 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:16  fourcc:0x47504A49  size:0x0  fps:10.00  ftime:=0.1000
xvid: using library version 1.1.2 (build xvid-1.1.2)
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG decoder)
==========================================================================
VDec: vo config request - 320 x 240 (preferred colorspace: Planar 422P)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Planar 422P as output csp (no 1)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 9 -> 8
[swscaler @ 00C8D020]SwScaler: BICUBIC scaler, from yuv422p to yuv420p
 using MMX2
[swscaler @ 00C8D020]SwScaler: using 4-tap MMX scaler for horizontal
 luminance scaling
[swscaler @ 00C8D020]SwScaler: using 4-tap MMX scaler for horizontal
 chrominance scaling
[swscaler @ 00C8D020]SwScaler: using 1-tap MMX "scaler" for vertical
 scaling (YV12 like)
[swscaler @ 00C8D020]SwScaler: 320x240 -> 320x240
videocodec: XviD (320x240 fourcc=44495658 [XVID])
xvid: par=0/0 (vga11), displayed=320x240, sampled=320x240
xvid: CBR Rate Control -- bitrate=1600kbit/s
Writing header...
ODML: vprp aspect is 4:3.
Writing header...
ODML: vprp aspect is 4:3.
Pos:   0.1s      1f (50%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]
Pos:   0.1s      2f (100%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]
VDec: vo config request - 624 x 352 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 3)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
Pos:   0.2s      3f (100%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]

Flushing video frames.
Writing index...
Writing header...
ODML: vprp aspect is 4:3.

Video stream: 1081.600 kbit/s  (135200 B/s)  size: 40560 bytes  0.300
 secs  3 frames


I don't know exiftran and what it does to the image, but based on the
 different colorspace output by the video decoder I tried adding:
-vf scale,format=rgb24  or yuy2 or ....
just tries a few times and fails:

VDec: vo config request - 180 x 240 (preferred colorspace: Planar YV12)
[PP] Using external postprocessing filter, max q = 6.
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]

I'm interested in finding out what's wrong,
workarounds.

ty
Tripp


       

bump

this is what the images look like, colour distortion
http://img68.imageshack.us/img68/6250/distortedug7.png
----------------------------------------------------------------------------------------

RC  wrote: That's not a very good bugreport.

You haven't narrowed down the problem at all...  It could well be a bug
in xvid or exiftran, both of which have basically nothing to do with
MPlayer.

You could at least have tried displaying the images with MPlayer to
eliminate xvid, and kept your modified JPEGs as similar as possible to
the originals to eliminate irrelivant changes, rather than leaving
it for someone else to figure it all out for you.  Obviously, the
dimentions are different, and 180 is not a multiple of 16.

_______________________________________________

ok
I was pretty sure it was exiftran changing something in the image that borks mplayer decoding.

first.
they are not my images. I've never used exiftran.
second
if you have a look you'll see that the images in their original dimensions are there.
third.
i haven't sat back twiddling my thumbs, i tried 
and when reaching the extent of my abilities I ask for help.
hints, suggestions, and yes perhaps someone solving it for me, at least trying. how much bandwith to download a few images? how long to run an encode or two on 1-2 images?

to provide more info:
playback of image with mplayer gives the same distortion

I can't comment on whether it's a bug in exiftran or not, but I can encode the problem images with vdubmod without problem. with xvid.
so the images are decodable despite the exiftran run, and encodable with xvid.

encoding with libavcodec in mencoder, rather than xvid, results in the same 
colour distortion. using ffmpeg results in the same.

encoding the frames at their original size gives the same distortion.
encoding the other pics not run through exiftran at original size, crashes both ffmpeg and mencoder. can't figure that out now

original size has a mod 8 horizontal resolution...
Can not having mod 16 resolutions fuck up colour?
Colour aside, could you point me to a lead on the importance of having mod16 resolutions?

i don't understand the decoding problem
does one look into mplayer decoding options?

ty
Tripp

       

I'm still interested in any info provided.
If anybody has any hints or suggestions, let me know.

tripp

       
---------------------------------
Yahoo! oneSearch: Finally,  mobile search that gives answers, not web links. 


More information about the MEncoder-users mailing list