:: [Frei0r] Defish0r plugin
Top Pagina
Delete this message
Reply to this message
Auteur: Sibi Antony
Datum:  
Aan: frei0r
Onderwerp: [Frei0r] Defish0r plugin
Hello all,

First off, thank you for this wonderful plugins collection. I was using
frei0r defish0r plugin with ffmpeg for distorting videos for a dome
projection, and I love the plugin.

Right now, I wish to report a possible problem. For some video aspect
ratios, the plugin is not working as expected and results in badly
distorted videos. For ease of comparing, I'm using some jpeg images as
input. The results are more or less the same using mpeg encoded videos.

Some of the parameters I used are (amount=0.7 on a scale of 0 to 1 in
ffmpeg, conversion from rectilinear to fisheye, type - any, scaling = fit,
interpolator - any, aspect - any)
If the image size is 500x500 or say, 499x499 - a square or near square
aspect, the plugin doesn't work as expected. However, it works perfectly
fine with a size of 1000x1000 (whereas 10001x1001 is not !). There are
also problems with 500x400, 500x300 while a 600x400 image works perfectly.
The results are the same with an mpeg video with similar aspect ratios.

Please see the attachments for the differences. I wish to know if this is a
known problem, or am I doing something wrong with the parameters. I checked
with a range of parameters using an automated script, and I feel the
problem is with the plugin algorithm, when input with some ranges of aspect
ratio.

Thank you for any help!

Regards,
Sibi.
/usr/local/bin/ffmpeg -i bucks.jpg -vf frei0r=defish0r:0.7:n:0.76:0.51:0.0:0.29:0.0:0.0 -sameq -an out/bucks_0.7_ster_fit_bic_sm_sqr.jpg
ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
  built on Aug  3 2012 11:11:41 with gcc 4.7.0 20120507 (Red Hat 4.7.0-5)
  configuration: --enable-frei0r --enable-libx264 --enable-gpl
  libavutil      51. 54.100 / 51. 54.100
  libavcodec     54. 23.100 / 54. 23.100
  libavformat    54.  6.100 / 54.  6.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     2. 77.100 /  2. 77.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, image2, from 'bucks.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: mjpeg, yuvj444p, 500x500 [SAR 300:300 DAR 1:1], 25 tbr, 25 tbn, 25 tbc
[buffer @ 0x32ae060] w:500 h:500 pixfmt:yuvj444p tb:1/25 sar:300/300 sws_param:flags=2
[buffersink @ 0x32ae540] No opaque field provided
[frei0r @ 0x32b5820] name:Defish0r author:'Marko Cebokli' explanation:'Non rectilinear lens mappings' color_model:rgba8888 frei0r_version:1 version:0.2 num_params:8
[format @ 0x32adfa0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_frei0r_0' and the filter 'format'
[frei0r @ 0x32b5820] auto-inserting filter 'auto-inserted scaler 1' between the filter 'src' and the filter 'Parsed_frei0r_0'
[scale @ 0x32b7140] w:500 h:500 fmt:yuvj444p sar:300/300 -> w:500 h:500 fmt:rgba sar:1/1 flags:0x4
[frei0r @ 0x32b5820] idx:0 name:'Amount' type:double explanation:'Focal Ratio' 
[frei0r @ 0x32b5820] idx:1 name:'DeFish' type:bool explanation:'Fish or Defish' 
[frei0r @ 0x32b5820] idx:2 name:'Type' type:double explanation:'Mapping function' 
[frei0r @ 0x32b5820] idx:3 name:'Scaling' type:double explanation:'Scaling method' 
[frei0r @ 0x32b5820] idx:4 name:'Manual Scale' type:double explanation:'Manual Scale' 
[frei0r @ 0x32b5820] idx:5 name:'Interpolator' type:double explanation:'Quality of interpolation' 
[frei0r @ 0x32b5820] idx:6 name:'Aspect type' type:double explanation:'Pixel aspect ratio presets' 
[frei0r @ 0x32b5820] idx:7 name:'Manual Aspect' type:double explanation:'Manual Pixel Aspect ratio' 
[scale @ 0x32add00] w:500 h:500 fmt:rgba sar:1/1 -> w:500 h:500 fmt:yuvj420p sar:1/1 flags:0x4
Output #0, image2, to 'out/bucks_0.7_ster_fit_bic_sm_sqr.jpg':
  Metadata:
    encoder         : Lavf54.6.100
    Stream #0:0: Video: mjpeg, yuvj420p, 500x500 [SAR 1:1 DAR 1:1], q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg -> mjpeg)
Press [q] to stop, [?] for help
frame=    1 fps=0.0 q=1.0 Lsize=       0kB time=00:00:00.04 bitrate=   0.0kbits/s    
video:100kB audio:0kB global headers:0kB muxing overhead -100.000000%