[FFmpeg-user] Using local lensfun files in Ffmpeg

Jonathan Colledge jonathancolledge at hotmail.com
Sun Jun 20 21:16:36 EEST 2021

Hi all,

I’m trying to correct some distortion with Ffmpeg and have made a lensfun profile for distortion only, but I can’t really submit it to the lensfun database as it is for an action camera (Insta360 One R One Inch Edition) that has stabilisation applied so it is really dependent on the parameters used for the video export from the Insta360 application and may even be specific for the setup I have – it works well for the videos as I use it, but is not appropriate for the photos the camera takes – I would have to do another profile for that.

Is there a way to use a local lensfun file or use the parameters from within a file to correct distortion with Ffmpeg? At the moment, I am extracting PNGs with Ffmpeg, then running imagemagick (-distort barrel "0.01472 -0.06928 -0.07258" ) to correct the distortion, then running Ffmpeg again to make the video. I’d rather just do it all in Ffmpeg (though I have to figure out perspective correction too as at the moment I’m using Photoshop image processor!).

Here is the ImageMagick script Here is the content of my lensfun file:

<lensdatabase version="1">

        <name>Insta360 One R</name>

        <model>Insta360 One R 14 mm F/3.2</model>
        <mount>Insta360 One R</mount>
<!-- The crop factor is adjusted for the Flowstate reduction in field of view, it would be 2.6 -->
        <focal value="5.3" />
        <aperture min="3.2" max="3.2" />
            <distortion model="ptlens" focal="5.3" a="0.01472" b="-0.06928" c="-0.07258" />

        <maker>Arashi Vision</maker>
        <model>Insta360 OneR</model>
        <mount>Insta360 One R</mount>


Is anyone available to help advise how to do this in Ffmpeg please?



Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

More information about the ffmpeg-user mailing list