[FFmpeg-user] Problem in v360?
Michael Koch
astroelectronic at t-online.de
Sun Oct 25 11:49:32 EET 2020
Am 25.10.2020 um 09:05 schrieb Michael Koch:
> Am 25.10.2020 um 03:02 schrieb Edward Park:
>> Hi,
>>
>>> After a deeper look into the quaternion multiplication, it seems to
>>> be correct. The terms are only written in a different order in the
>>> Wikipedia article.
>>>
>>> But it's a fact that the v360 rotations are broken, as can be shown
>>> by this simple test:
>>> You can use any equirectangular input image.
>>> First make a combined rotation yaw=90 and pitch=45 in the default
>>> rotation order (ypr),
>>> then rotate back pitch = -45,
>>> then rotate back yaw = -90.
>>> The output image should be the same as the input image. But it isn't.
>>
>> It seems to me it assumes a 45° vertical fov and 90° horizontal fov
>> on both input and output, does that affect the behavior at all? (Or
>> am I not understanding right)
>
> If the input and output images are specified as "equirectangular"
> (V360=e:e:...) then the field of view is always 360° x 180°. There are
> options for for input and output field of view, but these aren't used
> in the case of equirectangular images. Something seems to be wrong
> with the quaternions that were added October 7th.
> This is difficult stuff. A wild guess that might be worth testing:
> Swap the order of quaternion multiplication, 2nd and 3rd argument of
> multiply_quaternion()
In this FFmpeg version from October 1th the v360 rotations are working
correctly:
C:\Users\astro\Desktop>c:\ffmpeg\ffmpeg -i equirectangular_test.png -vf
v360=e:e:yaw=90:pitch=45,v360=e:e:pitch=-45,v360=e:e:yaw=-90 -y out.png
ffmpeg version 4.3.1-2020-10-01-essentials_build-www.gyan.dev Copyright
(c) 2000-2020 the FFmpeg developers
built with gcc 10.2.0 (Rev3, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static
--disable-w32threads --disable-autodetect --enable-fontconfig
--enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp
--enable-lzma --enable-zlib --enable-libsrt --enable-libssh
--enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom
--enable-libopenjpeg --enable-libvpx --enable-libass
--enable-libfreetype --enable-libfribidi --enable-libvidstab
--enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm
--enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc
--enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme
--enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame
--enable-libtheora --enable-libvo-amrwbenc --enable-libgsm
--enable-libopencore-amrnb --enable-libopus --enable-libspeex
--enable-libvorbis --enable-librubberband
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Input #0, png_pipe, from 'equirectangular_test.png':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: png, rgb24(pc), 2400x1200, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (png (native) -> png (native))
Press [q] to stop, [?] for help
Output #0, image2, to 'out.png':
Metadata:
encoder : Lavf58.45.100
Stream #0:0: Video: png, rgb24, 2400x1200, q=2-31, 200 kb/s, 25
fps, 25 tbn, 25 tbc
Metadata:
encoder : Lavc58.91.100 png
frame= 1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A
speed=0.0459x
video:1851kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
More information about the ffmpeg-user
mailing list