Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#236 closed defect (fixed)

MJPEG encoder in CVS version

Reported by: ods15@… Owned by: alex@…
Priority: normal Component: ve
Version: HEAD Severity: major
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

Somewhere between MEncoder 1.0pre6 and MEncoder CVS, lavc's MJPEG encoder stopped working.

Using same options as i did from MEncoder 1.0pre6, i get this in CVS when encoding from tv:// :
[mjpeg @ 0x85ea4c0]colorspace not supported in jpeg
Could not open codec.
FATAL: Cannot initialize video driver.
VDecoder init failed :(
Cannot find codec matching selected -vo and video format 0x32315659.

-vf format and scale are useless no matter what combination. MEncoder completely refuses to encode to
MJPEG in ANY case, except one, when re-encoding from an MJPEG source - then it gives 'skipping frame' on
_every_ frame, video bitrate 0, and then segfaults on the end of encode.

Change History (7)

comment:1 Changed 14 years ago by reimar

You can make it work for the moment by changing in ve_lavc.c, lines 612ff
PIX_FMT_YUV420P, PIX_FMT_YUV422P and PIX_FMT_YUV444P to
PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P and PIX_FMT_YUVJ444P.
I have no idea how to fix it permanently though...

comment:2 Changed 14 years ago by ods15@…

Well I don't really need a temporary solution, I still keep pre6 installed as
default and global on my system, CVS only for development.. But as long as that
mjpeg is messed up, i can't update when pre7/whatever will be out. I found the
bug is in libavcodec, downgrading libavcodecs to 2 month old CVS fixed the problem.

comment:3 Changed 14 years ago by reimar

Okay, saw the code... I think you must use vstrict=-1 in you lavcopts, as the
colourspace that you get after decoding video is actually not completely correct
for jpeg (something about 16-223 vs. 0-255 luminance range I think).

comment:4 Changed 14 years ago by ods15@…

I found the exact patch that messes this up -
http://sourceforge.net/mailarchive/forum.php?thread_id=6385591&forum_id=42241
TBH I have no idea what that patch does, but put simply, MEncoder works when I
reverse apply that patch.

I should probably sent a bug report to ffmpeg then,. Not MPlayer?..

vstrict=-1 DID solve the problem... Is this not a bug but my problem?..
Basically a lot of time I want to encode immedeately from tv, so i always keep
vcodec=mjpeg in my mencoder config file and type 'mencoder tv://' quickly... I
would not like to have to add something like 'vstrict' in my config file, and
defenetaly wouldn't like to have to type it everytime I want to encode to
MJPEG... Also, the man page only mentions vstrict about HuffYUV, nothing about
MJPEG.

comment:5 Changed 14 years ago by reimar

The manpage definitly should be update. I admit using vstrict is not really a
good solution - but a different fix would be quite a hack (e.g. replace
PIX_FMT_YUV420 with PIX_FMT_YUVJ420 for mjpeg output).
Not sure what should be done, but for your problem I'd suggest that you use a
script for quick recording *g*.

comment:6 Changed 14 years ago by reimar

Fixed in CVS.

comment:7 Changed 14 years ago by reimar

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.