Re: [osg-users] Problem compiling latest trunk, ffmpeg problem
Hi A., On Sun, Mar 1, 2009 at 3:14 AM, Alejandro Aguilar Sierra algsie...@gmail.com wrote: I updated ffmpeg a month and a half ago in order to be able to encode videos to h264, so I need that version, I can't downgrade it. It is SVN-r17646. I agree on not using deprecated functions. I'll have a bash at integrating J.P's suggested changes to the use the new scale functions, if that works with last stable svn version of ffmpeg (the one that Tanguy's based his work on) then I'll move on to trying the latest svn version of ffmpeg to double check that it works. I should get a fix checked into today. You're welcome to beat me to it :-) Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem compiling latest trunk, ffmpeg problem
Hi J.P, I'm currently looking at introducing using of sws_scale, but don't find these methods in the ffmpeg I built. Looking at the links to the mailing list thread you provided I could quite work out whether these methods require the sws library to be built, or whether there would be sws_ functions in other ffmpeg libs, and if so then would have to guess that they are only in an svn rev later/earlier than the one I have. Could you provide any more clarity on which rev of ffmpeg I'd need + and what build options. My aim is to be able to use off the self versions of ffmpeg from linux repositories as well svn versions of ffmpeg. Robert. On Sat, Feb 28, 2009 at 10:38 AM, J.P. Delport jpdelp...@csir.co.za wrote: Hi, I'll send some references and code later. See e.g. here: http://lists.mplayerhq.hu/pipermail/libav-user/2008-November/001618.html and http://lists.mplayerhq.hu/pipermail/libav-user/2008-June/000683.html e.g. img_convert vs swscale ---8--- #if defined IPF_USE_SWSCALE int err = sws_scale(ConvertToSaveCtx_, InputFrame_-data, InputFrame_-linesize, 0, cc-height, SaveFrame_-data, SaveFrame_-linesize); #else img_convert((AVPicture *)SaveFrame_, cc-pix_fmt, (AVPicture *)InputFrame_, InputFrameFormat_, cc-width, cc-height); #endif You have to create the swscale context earlier, e.g. ConvertToSaveCtx_ = sws_getContext(ImageFormat_.getWidth(), ImageFormat_.getHeight(), InputFrameFormat_, ImageFormat_.getWidth(), ImageFormat_.getHeight(), SaveFrameFormat_, SWS_BILINEAR, NULL, NULL, NULL); ---8--- One other thing that changed at some stage was this. The version might have to be tuned: #if LIBAVFORMAT_VERSION_INT ((5216) + (18) + 0) url_fclose(FormatContext_-pb); #else url_fclose(FormatContext_-pb); #endif ---8--- jp -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem compiling latest trunk, ffmpeg problem
Hi, Robert Osfield wrote: Hi J.P, I'm currently looking at introducing using of sws_scale, but don't find these methods in the ffmpeg I built. Looking at the links to the mailing list thread you provided I could quite work out whether these methods require the sws library to be built, or whether there would be sws_ functions in other ffmpeg libs, and if so then would have to guess that they are only in an svn rev later/earlier than the one I have. Could you provide any more clarity on which rev of ffmpeg I'd need + and what build options. The one I compiled with LGPL only, has the sws functions in libavcodec.so. nm ./libavcodec/libavcodec.so | grep sws 0008c1b0 T sws_freeContext 0008d1f0 T sws_getCachedContext 0008d0f0 T sws_getContext 0008caf0 T sws_scale I compiled it using the debian source from: http://www.debian-multimedia.org/ So I recompiled the debian package (not straight from svn). The source package was called ffmpegcvs-20090128. I don't think it differs too much from the svn repo. I disabled the following in the debian rules file: swscaler, gpl, postproc, x264, faad I also paste my instructions I saved for myself at the bottom. My aim is to be able to use off the self versions of ffmpeg from linux repositories as well svn versions of ffmpeg. This is going to depend a lot on what the repositories compile by default. I know the debian ones from http://www.debian-multimedia.org/ has swscaler compiled in by default. So has the ubuntu packages if I remember correctly. A guy here that uses gentoo does not have swscale, but has the lgpl version. To cover everything we would need to check: if (img_resample available) { use it (Tanguys code) do not link to swscale } else { use swscale if (swscale in libavcodec) { do not link to swscale } else { link to swscale } } The img_resample check can prob be made by using ffmpeg version info from the headers. I'm not certain how to check for where swscale lives. jp ---8--- compile lgpl only version set sources: deb-src http://www.debian-multimedia.org/ sid main mkdir ffmpeg-lgpl cd ffmpeg-lgpl sudo apt-get source ffmpeg cd ffmpegcvs-20090128/debian edit 'rules' and remove --enable-swscaler and --enable-gpl and --enable-postproc and x264 and faad edit 'control' and remove libswscale packages $ cd .. get build deps $ sudo apt-get build-dep ffmpeg build $ sudo dpkg-buildpackage -uc -b One gotcha, we need the swscale header to be installed even in libswscale is not installed. The header is LGPL tho. ---8--- Robert. -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem compiling latest trunk, ffmpeg problem
Hi J.P, On Mon, Mar 2, 2009 at 12:34 PM, J.P. Delport jpdelp...@csir.co.za wrote: The one I compiled with LGPL only, has the sws functions in libavcodec.so. nm ./libavcodec/libavcodec.so | grep sws 0008c1b0 T sws_freeContext 0008d1f0 T sws_getCachedContext 0008d0f0 T sws_getContext 0008caf0 T sws_scale I just updated my ffmpeg to latest in svn and it defines the above methods, but doesn't declare them in the headers. This is going to depend a lot on what the repositories compile by default. I know the debian ones from http://www.debian-multimedia.org/ has swscaler compiled in by default. So has the ubuntu packages if I remember correctly. A guy here that uses gentoo does not have swscale, but has the lgpl version. To cover everything we would need to check: if (img_resample available) { use it (Tanguys code) do not link to swscale } else { use swscale if (swscale in libavcodec) { do not link to swscale } else { link to swscale } } Ack... a pretty horrible matrix to test/build against. One gotcha, we need the swscale header to be installed even in libswscale is not installed. The header is LGPL tho. I tried to compile ffmpeg with libswscale but it wouldn't build it without it --enable-gpl, and without this when I do an install the libswscale headers are not installed. I could copy the header across by hand but this really isn't a viable solution for end users of the OSG. I guess we could declare the missing functions on the OSG side - if the ffmpeg has these functions built into it, this is rather asking for a build break though. I'm tempted to just go implement the conversion colour conversion ourselves, and provide a simple CPU based conversion that is relatively inefficient but at least works on all ffmpeg versions Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem compiling latest trunk, ffmpeg problem
Hi, Robert Osfield wrote: Hi J.P, On Mon, Mar 2, 2009 at 12:34 PM, J.P. Delport jpdelp...@csir.co.za wrote: The one I compiled with LGPL only, has the sws functions in libavcodec.so. nm ./libavcodec/libavcodec.so | grep sws 0008c1b0 T sws_freeContext 0008d1f0 T sws_getCachedContext 0008d0f0 T sws_getContext 0008caf0 T sws_scale I just updated my ffmpeg to latest in svn and it defines the above methods, but doesn't declare them in the headers. Yes, it seems they still want you to use swscale.h (which is LGPL), but it seems it is not installed by the build process. This is going to depend a lot on what the repositories compile by default. I know the debian ones from http://www.debian-multimedia.org/ has swscaler compiled in by default. So has the ubuntu packages if I remember correctly. A guy here that uses gentoo does not have swscale, but has the lgpl version. To cover everything we would need to check: if (img_resample available) { use it (Tanguys code) do not link to swscale } else { use swscale if (swscale in libavcodec) { do not link to swscale } else { link to swscale } } Ack... a pretty horrible matrix to test/build against. Welcome to the wonderful world of ffmpeg :) After working with it for a while, I do understand the suggestion made at one point to just include a copy of their code in one's own repository. One gotcha, we need the swscale header to be installed even in libswscale is not installed. The header is LGPL tho. I tried to compile ffmpeg with libswscale but it wouldn't build it without it --enable-gpl, and without this when I do an install the libswscale headers are not installed. I could copy the header across by hand but this really isn't a viable solution for end users of the OSG. Yes, I'm not sure how to work around this. It seems to be a problem with their build system. I'm not sure how the distros that distrib the lgpl versions cope with this. Maybe they add the file manually? I guess we could declare the missing functions on the OSG side - if the ffmpeg has these functions built into it, this is rather asking for a build break though. Yes, I don't think this would be a good option. I'm tempted to just go implement the conversion colour conversion ourselves, The colour conversion just cries for a shader yes :), but beware that even though there are a few normal cases e.g. yuv420 - rgb, there are a myriad of other less used cases. and provide a simple CPU based conversion that is relatively inefficient but at least works on all ffmpeg versions Would you restrict all versions to all distributed (packaged by distro) versions? I'm not sure how many people would compile ffmpeg themselves? jp Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem compiling latest trunk, ffmpeg problem
Hi, Robert Osfield wrote: Hi J.P, On Mon, Mar 2, 2009 at 12:34 PM, J.P. Delport jpdelp...@csir.co.za wrote: The one I compiled with LGPL only, has the sws functions in libavcodec.so. nm ./libavcodec/libavcodec.so | grep sws 0008c1b0 T sws_freeContext 0008d1f0 T sws_getCachedContext 0008d0f0 T sws_getContext 0008caf0 T sws_scale I just updated my ffmpeg to latest in svn and it defines the above methods, but doesn't declare them in the headers. I have just checked my lgpl libs and it does contain img_resample. Maybe we can use that? Just double check your latest libs. The matrix would then become: if (img_resample available) { use it (Tanguys code) do not link to swscale } else { use swscale link to swscale } jp -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem compiling latest trunk, ffmpeg problem
Hi J.P, On Mon, Mar 2, 2009 at 1:43 PM, J.P. Delport jpdelp...@csir.co.za wrote: I have just checked my lgpl libs and it does contain img_resample. Maybe we can use that? Just double check your latest libs. The present ffmpeg plugin using the deprecated img_convert method, and this is in the libavcodec.sp of svn version of ffmpeg, as are the sws_scale and associated methods: nm ./libavcodec/libavcodec.so | grep img_convert 0008bd00 T img_convert rob...@harris:~/3rdParty/ffmpeg$ nm ./libavcodec/libavcodec.so | grep sws 0009ae20 T sws_freeContext 0009bed0 T sws_getCachedContext 0009bdb0 T sws_getContext 0009b8a0 T sws_scale But... the installed headers don't included any of them. So it looks like if your app is compiled against these methods say from an older rev of ffmpeg it will work when linking against a new rev. But... you can't compile against these functions without adding the headers in some way. The matrix would then become: if (img_resample available) { use it (Tanguys code) do not link to swscale } else { use swscale link to swscale } Perhaps another way would be to move the implementation of img_convert directly into our plugin. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem compiling latest trunk, ffmpeg problem
Hi J.P and A. As a crude hack to get me svn/trunk version of ffmpeg compiling against our ffmpeg plugin I've added to FFmpegDecorderVideo.cpp the extern definition of the img_convert. extern C { int img_convert(AVPicture *dst, int dst_pix_fmt, const AVPicture *src, int src_pix_fmt, int src_width, int src_height); }; This allows the plugin to compile and link properly, it's certainly not an ideal solution, but might give us a bit more breathing space till we work out a final solution. I've tried this with ffmpeg svn/trunk and r15261 the last stable svn tag, so I've gone ahead an check it into OSG svn/tunk. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem compiling latest trunk, ffmpeg problem
HI Alejandro, Which version of ffmpeg do you have installed? As J.P. mentioned ffmpeg is a bit of moving target and were' only just getting into learning about FFmpeg foibles. We'll probably need to add version checking into our FindFFmpeg.cmake to avoid these issue. Also migrating the code across from not using deprecated functions will be a possible solution. Adopting use ffmpeg suggest use of swscale isn't though as it's GPL'd, so we may have to create our own local equivalents for colour conversion. Robert. On Sat, Feb 28, 2009 at 5:43 AM, Alejandro Aguilar Sierra algsie...@gmail.com wrote: Hi, I just updated both ffmpeg and osg/trunk, compiled and instaled ffmpeg but osg can't compile because these errors: [ 98%] Building CXX object src/osgPlugins/ffmpeg/CMakeFiles/osgdb_ffmpeg.dir/FFmpegDecoderVideo.o /home/ale/src/osg/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp: In member function 'void osgFFmpeg::FFmpegDecoderVideo::publishFrame(double)': /home/ale/src/osg/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:228: error: 'img_convert' was not declared in this scope /home/ale/src/osg/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp: In member function 'void osgFFmpeg::FFmpegDecoderVideo::yuva420pToRgba(AVPicture*, const AVPicture*, int, int)': /home/ale/src/osg/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:264: error: 'img_convert' was not declared in this scope make[2]: *** [src/osgPlugins/ffmpeg/CMakeFiles/osgdb_ffmpeg.dir/FFmpegDecoderVideo.o] Error 1 make[1]: *** [src/osgPlugins/ffmpeg/CMakeFiles/osgdb_ffmpeg.dir/all] Error 2 make: *** [all] Error 2 Before updating ffmpeg, I got other ffmpeg related compilation errors. Any hint? My system is GNU/Linux 2.6.26-1-686 Debian Sid, gcc 4.3.1. Regards, -- A. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem compiling latest trunk, ffmpeg problem
Hi Robert, if you compile newer ffmpeg without GPL functions, it still has its own versions of the swscale functions implemented. You then just do not link to the (maybe faster) GPL swscale library. I've tested this on Debian and it worked for our app. I'll send some references and code later. jp Robert Osfield wrote: HI Alejandro, Which version of ffmpeg do you have installed? As J.P. mentioned ffmpeg is a bit of moving target and were' only just getting into learning about FFmpeg foibles. We'll probably need to add version checking into our FindFFmpeg.cmake to avoid these issue. Also migrating the code across from not using deprecated functions will be a possible solution. Adopting use ffmpeg suggest use of swscale isn't though as it's GPL'd, so we may have to create our own local equivalents for colour conversion. Robert. On Sat, Feb 28, 2009 at 5:43 AM, Alejandro Aguilar Sierra algsie...@gmail.com wrote: Hi, I just updated both ffmpeg and osg/trunk, compiled and instaled ffmpeg but osg can't compile because these errors: [ 98%] Building CXX object src/osgPlugins/ffmpeg/CMakeFiles/osgdb_ffmpeg.dir/FFmpegDecoderVideo.o /home/ale/src/osg/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp: In member function 'void osgFFmpeg::FFmpegDecoderVideo::publishFrame(double)': /home/ale/src/osg/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:228: error: 'img_convert' was not declared in this scope /home/ale/src/osg/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp: In member function 'void osgFFmpeg::FFmpegDecoderVideo::yuva420pToRgba(AVPicture*, const AVPicture*, int, int)': /home/ale/src/osg/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:264: error: 'img_convert' was not declared in this scope make[2]: *** [src/osgPlugins/ffmpeg/CMakeFiles/osgdb_ffmpeg.dir/FFmpegDecoderVideo.o] Error 1 make[1]: *** [src/osgPlugins/ffmpeg/CMakeFiles/osgdb_ffmpeg.dir/all] Error 2 make: *** [all] Error 2 Before updating ffmpeg, I got other ffmpeg related compilation errors. Any hint? My system is GNU/Linux 2.6.26-1-686 Debian Sid, gcc 4.3.1. Regards, -- A. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem compiling latest trunk, ffmpeg problem
Hi, J.P. Delport wrote: Hi Robert, if you compile newer ffmpeg without GPL functions, it still has its own versions of the swscale functions implemented. You then just do not link to the (maybe faster) GPL swscale library. I've tested this on Debian and it worked for our app. I'll send some references and code later. See e.g. here: http://lists.mplayerhq.hu/pipermail/libav-user/2008-November/001618.html and http://lists.mplayerhq.hu/pipermail/libav-user/2008-June/000683.html jp jp Robert Osfield wrote: HI Alejandro, Which version of ffmpeg do you have installed? As J.P. mentioned ffmpeg is a bit of moving target and were' only just getting into learning about FFmpeg foibles. We'll probably need to add version checking into our FindFFmpeg.cmake to avoid these issue. Also migrating the code across from not using deprecated functions will be a possible solution. Adopting use ffmpeg suggest use of swscale isn't though as it's GPL'd, so we may have to create our own local equivalents for colour conversion. Robert. On Sat, Feb 28, 2009 at 5:43 AM, Alejandro Aguilar Sierra algsie...@gmail.com wrote: Hi, I just updated both ffmpeg and osg/trunk, compiled and instaled ffmpeg but osg can't compile because these errors: [ 98%] Building CXX object src/osgPlugins/ffmpeg/CMakeFiles/osgdb_ffmpeg.dir/FFmpegDecoderVideo.o /home/ale/src/osg/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp: In member function 'void osgFFmpeg::FFmpegDecoderVideo::publishFrame(double)': /home/ale/src/osg/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:228: error: 'img_convert' was not declared in this scope /home/ale/src/osg/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp: In member function 'void osgFFmpeg::FFmpegDecoderVideo::yuva420pToRgba(AVPicture*, const AVPicture*, int, int)': /home/ale/src/osg/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:264: error: 'img_convert' was not declared in this scope make[2]: *** [src/osgPlugins/ffmpeg/CMakeFiles/osgdb_ffmpeg.dir/FFmpegDecoderVideo.o] Error 1 make[1]: *** [src/osgPlugins/ffmpeg/CMakeFiles/osgdb_ffmpeg.dir/all] Error 2 make: *** [all] Error 2 Before updating ffmpeg, I got other ffmpeg related compilation errors. Any hint? My system is GNU/Linux 2.6.26-1-686 Debian Sid, gcc 4.3.1. Regards, -- A. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem compiling latest trunk, ffmpeg problem
Hi, I'll send some references and code later. See e.g. here: http://lists.mplayerhq.hu/pipermail/libav-user/2008-November/001618.html and http://lists.mplayerhq.hu/pipermail/libav-user/2008-June/000683.html e.g. img_convert vs swscale ---8--- #if defined IPF_USE_SWSCALE int err = sws_scale(ConvertToSaveCtx_, InputFrame_-data, InputFrame_-linesize, 0, cc-height, SaveFrame_-data, SaveFrame_-linesize); #else img_convert((AVPicture *)SaveFrame_, cc-pix_fmt, (AVPicture *)InputFrame_, InputFrameFormat_, cc-width, cc-height); #endif You have to create the swscale context earlier, e.g. ConvertToSaveCtx_ = sws_getContext(ImageFormat_.getWidth(), ImageFormat_.getHeight(), InputFrameFormat_, ImageFormat_.getWidth(), ImageFormat_.getHeight(), SaveFrameFormat_, SWS_BILINEAR, NULL, NULL, NULL); ---8--- One other thing that changed at some stage was this. The version might have to be tuned: #if LIBAVFORMAT_VERSION_INT ((5216) + (18) + 0) url_fclose(FormatContext_-pb); #else url_fclose(FormatContext_-pb); #endif ---8--- jp -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem compiling latest trunk, ffmpeg problem
HI J.P, Thanks for the links and pointers. When I get back to coding I'll have a look at making the changes to swscale. The other route would be to do the colour conversion down on the GPU, but this would have to be just an option. Robert. On Sat, Feb 28, 2009 at 10:38 AM, J.P. Delport jpdelp...@csir.co.za wrote: Hi, I'll send some references and code later. See e.g. here: http://lists.mplayerhq.hu/pipermail/libav-user/2008-November/001618.html and http://lists.mplayerhq.hu/pipermail/libav-user/2008-June/000683.html e.g. img_convert vs swscale ---8--- #if defined IPF_USE_SWSCALE int err = sws_scale(ConvertToSaveCtx_, InputFrame_-data, InputFrame_-linesize, 0, cc-height, SaveFrame_-data, SaveFrame_-linesize); #else img_convert((AVPicture *)SaveFrame_, cc-pix_fmt, (AVPicture *)InputFrame_, InputFrameFormat_, cc-width, cc-height); #endif You have to create the swscale context earlier, e.g. ConvertToSaveCtx_ = sws_getContext(ImageFormat_.getWidth(), ImageFormat_.getHeight(), InputFrameFormat_, ImageFormat_.getWidth(), ImageFormat_.getHeight(), SaveFrameFormat_, SWS_BILINEAR, NULL, NULL, NULL); ---8--- One other thing that changed at some stage was this. The version might have to be tuned: #if LIBAVFORMAT_VERSION_INT ((5216) + (18) + 0) url_fclose(FormatContext_-pb); #else url_fclose(FormatContext_-pb); #endif ---8--- jp -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem compiling latest trunk, ffmpeg problem
Hi Robert, I updated ffmpeg a month and a half ago in order to be able to encode videos to h264, so I need that version, I can't downgrade it. It is SVN-r17646. I agree on not using deprecated functions. Best regards, -- A. On Sat, Feb 28, 2009 at 3:33 AM, Robert Osfield robert.osfi...@gmail.com wrote: HI Alejandro, Which version of ffmpeg do you have installed? As J.P. mentioned ffmpeg is a bit of moving target and were' only just getting into learning about FFmpeg foibles. We'll probably need to add version checking into our FindFFmpeg.cmake to avoid these issue. Also migrating the code across from not using deprecated functions will be a possible solution. Adopting use ffmpeg suggest use of swscale isn't though as it's GPL'd, so we may have to create our own local equivalents for colour conversion. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Problem compiling latest trunk, ffmpeg problem
Hi, I just updated both ffmpeg and osg/trunk, compiled and instaled ffmpeg but osg can't compile because these errors: [ 98%] Building CXX object src/osgPlugins/ffmpeg/CMakeFiles/osgdb_ffmpeg.dir/FFmpegDecoderVideo.o /home/ale/src/osg/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp: In member function 'void osgFFmpeg::FFmpegDecoderVideo::publishFrame(double)': /home/ale/src/osg/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:228: error: 'img_convert' was not declared in this scope /home/ale/src/osg/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp: In member function 'void osgFFmpeg::FFmpegDecoderVideo::yuva420pToRgba(AVPicture*, const AVPicture*, int, int)': /home/ale/src/osg/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:264: error: 'img_convert' was not declared in this scope make[2]: *** [src/osgPlugins/ffmpeg/CMakeFiles/osgdb_ffmpeg.dir/FFmpegDecoderVideo.o] Error 1 make[1]: *** [src/osgPlugins/ffmpeg/CMakeFiles/osgdb_ffmpeg.dir/all] Error 2 make: *** [all] Error 2 Before updating ffmpeg, I got other ffmpeg related compilation errors. Any hint? My system is GNU/Linux 2.6.26-1-686 Debian Sid, gcc 4.3.1. Regards, -- A. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem compiling latest trunk, ffmpeg problem
Hi, Alejandro Aguilar Sierra wrote: Hi, I just updated both ffmpeg and osg/trunk, compiled and instaled ffmpeg but osg can't compile because these errors: [ 98%] Building CXX object src/osgPlugins/ffmpeg/CMakeFiles/osgdb_ffmpeg.dir/FFmpegDecoderVideo.o /home/ale/src/osg/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp: In member function 'void osgFFmpeg::FFmpegDecoderVideo::publishFrame(double)': /home/ale/src/osg/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:228: error: 'img_convert' was not declared in this scope /home/ale/src/osg/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp: In member function 'void osgFFmpeg::FFmpegDecoderVideo::yuva420pToRgba(AVPicture*, const AVPicture*, int, int)': /home/ale/src/osg/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:264: error: 'img_convert' was not declared in this scope make[2]: *** [src/osgPlugins/ffmpeg/CMakeFiles/osgdb_ffmpeg.dir/FFmpegDecoderVideo.o] Error 1 make[1]: *** [src/osgPlugins/ffmpeg/CMakeFiles/osgdb_ffmpeg.dir/all] Error 2 make: *** [all] Error 2 Before updating ffmpeg, I got other ffmpeg related compilation errors. Any hint? I think your ffmpeg is too new, img_convert has been deprecated in the newer versions. Search the ffmpeg threads on osg-users, I think you need a specific version of ffmpeg for the plugin to work, tho I can be wrong... I know in our code we have checks for the ffmpeg version and switch between using img_convert and swscale. jp My system is GNU/Linux 2.6.26-1-686 Debian Sid, gcc 4.3.1. Regards, -- A. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org