[FFmpeg-user] Straightening out image from GoPro - what is a good approach?

Jesper Taxbøl jesper at taxboel.dk
Wed Jun 17 15:51:46 CEST 2015


I ended up using the AVLinux distro, which has Kdenlive with Defish0r
plugin. I could manually reach a somewhat acceptable result there.

I translated it into the ffmpeg filter like this:

frei0r=defish0r:0.734|y|0.0|0.0|0.0|0.143|1.0|0.247,scale=960:-1

And in my ffmpeg script it looks like this

/usr/local/bin/ffmpeg -y -ss 0.113403353664 -r 80 -i ./kamp_1/1.MP4  -t 3
-ss 0.0 -r 80 -i ./kamp_1/2.MP4  -t 3 -ss 0.0532033667281 -r 80 -i
./kamp_1/3.MP4  -t 3 -ss 0.0776444068048 -r 80 -i ./kamp_1/4.MP4  -t 3
-filter_complex
"[0:v:0]frei0r=defish0r:0.734|y|0.0|0.0|0.0|0.143|1.0|0.247,scale=960:-1[V1];[1:v:0]frei0r=defish0r:0.734|y|0.0|0.0|0.0|0.143|1.0|0.247,scale=960:-1[V2];[2:v:0]frei0r=defish0r:0.734|y|0.0|0.0|0.0|0.143|1.0|0.247,scale=960:-1[V3];[3:v:0]frei0r=defish0r:0.734|y|0.0|0.0|0.0|0.143|1.0|0.247,scale=960:-1[V4];[V1]pad=iw*2:ih*2:0:0[BG1];[BG1][V2]overlay=960:0[BG2];[BG2][V3]overlay=0:540[BG3];[BG3][V4]overlay=960:540[OUT]"
-c:v libx264 -pix_fmt yuv420p -preset ultrafast -tune fastdecode -tune
zerolatency -map [OUT] -r 80 ./kamp_1/out.mp4

Jesper



2015-06-15 19:33 GMT+02:00 Jesper Taxbøl <jesper at taxboel.dk>:

> I am working on straightening out a video from a GoPro4 shot with the
> stock lens at 1080S setting.
>
> Example images uploaded here:
> http://imgur.com/KYcZGTf,ILHUWBj,lserDt3,ruWKGhs,NVxtBv0,q3c6xpt,nieBLBX,QuwoMQp,1Uvzcbq,3DqczbP,jaxAQNF
>
>
> I have made a python program where I try to tweak the lenscorrection
> filter parameters, but with little luck so far.
>
> I have also tried finding the parameters using opencv via openframeworks,
> but that does not work well either. I guess the method is more suited for
> cameras with less distortion?
>
> I am currently looking at the frei0r filter extension defish0r. I have
> made a small python script where i adjust parameters, but with little luck
> so far as the tweak domain seams enormous.
>
> What is a practical approach to finding a good filter configuration? Is
> there a killer tool that use the frei0r plugins so I can adjust the
> parameters more easily.
>
> Kind regards
>
> Jesper
>



-- 
Jesper Taxbøl
+45 61627501


More information about the ffmpeg-user mailing list