Enabling JPEG 2000 support in ffmpeg

.mov files can contain JPEG 2000 data. When Asset Bank attempts to use ffmpeg to process such files and ffmpeg has not been built with JPEG 2000 support then ffmpeg exits with an error and outputs something similar to the following:

[bright@test ~]$ ffmpeg -i OUTRO_3DS_SOLIDWORKS.mov -y out.pam
ffmpeg version 0.8.12, Copyright (c) 2000-2011 the FFmpeg developers
built on Oct 8 2012 09:57:12 with gcc 4.1.2 20080704 (Red Hat 4.1.2-50)
configuration: --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libx264 --enable-libspeex --enable-shared --enable-pthreads
libavutil 51. 9. 1 / 51. 9. 1
libavcodec 53. 8. 0 / 53. 8. 0
libavformat 53. 5. 0 / 53. 5. 0
libavdevice 53. 1. 1 / 53. 1. 1
libavfilter 2. 23. 0 / 2. 23. 0
libswscale 2. 0. 0 / 2. 0. 0
libpostproc 51. 2. 0 / 51. 2. 0
[j2k @ 0x1c5af320] SOC marker not present
Last message repeated 3 times
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'OUTRO_3DS_SOLIDWORKS.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2012-07-30 09:14:19
Duration: 00:00:08.16, start: 0.000000, bitrate: 279995 kb/s
Stream #0.0(eng): Video: j2k, 1920x1080, 279984 kb/s, PAR 1920:1920 DAR 16:9, 25 fps, 25 tbr, 25 tbn, 25 tbc
Metadata:
creation_time : 2012-07-30 09:14:19
Stream #0.1(eng): Data: tmcd / 0x64636D74, 0 kb/s
Metadata:
creation_time : 2012-07-30 09:15:55
[buffer @ 0x1c5b48e0] Invalid pixel format string '-1'
Error opening filters!
[bright@test ~]$

To fix this error you can rebuild ffmpeg with JPEG 2000 support. To do so download and install openjpeg and then rebuild ffmpeg by following the usual procedure but adding "--enable-libopenjpeg --extra-cflags=-I/usr/local/include/openjpeg-1.5" to the configure arguments.


Was this article helpful?

Yes No

Thanks for your feedback!