View Full Version : How to convert a YUV video sequence to Motion JPEG2000?
Redhat_doom
11th May 2009, 23:06
Hi,
How can we convert a YUV video sequence to Motion JPEG2000? I use the following
command to convert a YUV sequence to Motion JPEG:
ffmpeg -r 25 -s 352x288 -i Foreman.yuv -b 400k -vcodec mjpeg foreman.avi
But what value should I use for -vcodec if we want to use MJPEG2000 instead of MJPEG? I tried "-vcodec mj2" but I got this error : "Unknown encoder: 'mj2' "
Thanks!
slavickas
12th May 2009, 02:00
http://forum.doom9.org/forum-rules.htm:
3) Keep the focus: Questions outside the scope of a certain forum will either be moved, locked or simply be deleted.
http://www.ffmpeg.org/general.html#SEC6
But what value should I use for -vcodec if we want to use MJPEG2000 instead of MJPEG? I tried "-vcodec mj2" but I got this error : "Unknown encoder: 'mj2' "
FFmpeg doesn't have a (M)JPEG2000 codec yet; it's work in progress (http://wiki.multimedia.cx/index.php?title=FFmpeg_Summer_Of_Code#JPEG2000_decoder_and_encoder).
You could try the 2007 SoC patch (svn co svn://svn.mplayerhq.hu/soc/jpeg2000), but it probably needs some changes to fit to the current FFmpeg versions. I don't know how complete the code is, but I'm pretty sure it's not up to the performance of the best JPEG2000 encoders.
shark37
16th May 2009, 01:03
FFmpeg doesn't have a (M)JPEG2000 codec yet; it's work in progress (http://wiki.multimedia.cx/index.php?title=FFmpeg_Summer_Of_Code#JPEG2000_decoder_and_encoder).
In meantime you can try another wavelet codec presented in FFMPEG -- snow -- in intra only mode with command line like that:
ffmpeg -r 25 -s 352x288 -i Foreman.yuv -vcodec snow -strict -2 -intra -qscale 0.5 -vstats -psnr foreman.avi
Vary -qscale to adjust rate/distortion.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.