[vtk-developers] vtkFFMPEGWriter - bitrate and bitrate tolerance

Nicolas Rannou nicolas_rannou at hms.harvard.edu
Tue Aug 17 14:30:35 EDT 2010


Hi all,

Please let me recontact you to know if it is ok to update the vtk master
with the changes I requested?

Github:
http://github.com/NicolasRannou/VTK/tree/ffmpeg

Dashboard:
http://www.cdash.org/CDash/viewTest.php?onlypassed&buildid=683835

The writer would still work with the old ffmpeg version but also with
the new one (it is currently not working with the recent versions of
ffmpeg)!

I submitted a push request on Github a few days ago but it seems that it
has not been updated.

Thanks!

    Nicolas

On Thu, 2010-07-29 at 19:49 -0400, Nicolas Rannou wrote:
> something like that might be enough:
> GIT repository: git at github.com:NicolasRannou/VTK.git
> 
> 
> I just added 2 variables BitRate and BitRateTolerance in the
> vtkFFMPEGWriter.cxx.
> They are initialized to 0.
> 
> 
> If they they are not modified( i.e. equal 0), the vtkFFMPEGWriter
> would work exactly in the same way as before.
> If we modifify one of the value, we would use the modified values:
> 
> 
> c->bit_rate = BitRate  rather than
> c->bit_rate = preset value
> 
> 
> and
> 
> 
> c->bit_rate_tolerance = BitRateTolerance  rather than
> c->bit_rate_tolerance = c->bit_rate/this->FrameRate;
> 
> 
> Let me know if it is enough.
> It worked fine for me but more modification might have to be done (not
> sure since I am not a FFMPEG expert).
> 
> 
>     Nicolas
> 
> 
> On Jul 29, 2010, at 4:41 PM, Dave Partyka wrote:
> 
> > In the past there were no versions of FFMPEG (until just recently)
> > other than svn revisions. So we just picked an arbitrary revision
> > that worked on all of our platforms and stuck with it. Also, we use
> > one of the most basic and mature codecs (mjpeg) which I don't think
> > has changed much? Anyway, keep us posted.
> > 
> > On Thu, Jul 29, 2010 at 4:37 PM, Nicolas Rannou
> > <Nicolas_Rannou at hms.harvard.edu> wrote:
> >         I think that if the ancient FFMPEG is working with the
> >         current VTK git master it should still work after.
> >         I'm currently using the FFMPEG deb package provided with
> >         ubuntu 10.04.
> >         
> >         I'll fork the VTK git master, commit the changes and let you
> >         know as soon as it is done then we can give it a try with
> >         Paraview.
> >         
> >         
> >         Is there any reason about using the ancient FFMPEG in
> >         Paraview?
> >         
> >         
> >             Nicolas
> >         
> >         
> >         On Jul 29, 2010, at 3:38 PM, Dave Partyka wrote:
> >         
> >         > I don't have any objections but would like to know if that
> >         > change is compatible with the ancient FFMPEG we typically
> >         > release ParaView with.
> >         > 
> >         > 
> >         > http://www.vtk.org/files/support/ffmpeg_source.tar.gz
> >         > 
> >         > 
> >         > On Thu, Jul 29, 2010 at 3:21 PM, Nicolas Rannou
> >         > <nicolas_rannou at hms.harvard.edu> wrote:
> >         >         Hi all,
> >         >         
> >         >         We are experimenting issues regarding the usage of
> >         >         vtkFFMPEGWriter.cxx.
> >         >         It occurs at least on Mac and Ubuntu 10.04.
> >         >         You can reproduce the error turning VTK_USE_FFMPEG
> >         >         ON and running the
> >         >         associated test. (ctest -R FFMPEG)
> >         >         
> >         >         ERROR:
> >         >         [mjpeg @ 0x2db2f30]bitrate tolerance too small for
> >         >         bitrate
> >         >         Generic Warning:
> >         >         In /home/nr52/GITROOT/VTK/IO/vtkFFMPEGWriter.cxx,
> >         >         line 197
> >         >         Could not open codec.
> >         >         
> >         >         The problem is located
> >         >         at /VTK/IO/vtkFFMPEGWriter.cxx:179, where the
> >         >         bit_rate_tolerance is defined as:
> >         >         c->bit_rate_tolerance =
> >         >         c->bit_rate/this->FrameRate;
> >         >         
> >         >         Then, this error ("bitrate tolerance too small for
> >         >         bit-rate") can easily be solved decreasing the
> >         >         FrameRate.
> >         >         
> >         >         Moreover, there is no convenient method to set the
> >         >         bit-rate.
> >         >         So far, can only choose between 3 predefined
> >         >         bit-rates, which is quite restrictive.
> >         >         
> >         >         So here is my question: Is there any reason for
> >         >         not creating variables BitRate and
> >         >         BitRateTolerance?
> >         >         If there is no objection, I can take care of it.
> >         >         
> >         >         Thanks
> >         >         
> >         >         
> >         >            Nicolas
> >         >         
> >         >         
> >         >         _______________________________________________
> >         >         Powered by www.kitware.com
> >         >         
> >         >         Visit other Kitware open-source projects at
> >         >         http://www.kitware.com/opensource/opensource.html
> >         >         
> >         >         Follow this link to subscribe/unsubscribe:
> >         >         http://www.vtk.org/mailman/listinfo/vtk-developers
> >         >         
> >         > 
> >         > 
> >         
> >         
> > 
> 
> 





More information about the vtk-developers mailing list