Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well... you can do that with only ffmpeg.

ffmpeg -i zelda_720p.mp4 -vf perspective=60:90:589:147:50:415:582:418 output.mp4

Edit: BTW on your picture it's not (50,145) but (50,415) for the bottom left corner.

Edit: if quvi supports still works, you can ffplay "https://www.youtube.com/watch?v=rMXD5DxbXog" -vf perspective=60:90:589:147:50:415:582:418 (otherwise something similar should be doable with youtube-dl)

Edit: you can also do better and enable the perspective only in the part where it matters. Typically with something like -vf "perspective=60:90:589:147:50:415:582:418:enable='not(between(t,0,5))'"



Wow, impressive, I think I now more about ffmpeg now. And I fixed the (50,415), thanks.


ffmpeg is the ImageMagick of video.

(GraphicsMagick is the ImageMagick of pictures, for me. IM has a few more features, but GM is more stable and usually much faster.)


GraphicsMagick also has fewer dependencies, I imagine because it does less things, but none is something I ever needed. I.e. within macports

$ port deps imagemagick Full Name: ImageMagick @6.8.9-8_0 Extract Dependencies: xz Build Dependencies: autoconf, automake, libtool Library Dependencies: bzip2, djvulibre, xz, jbigkit, jpeg, lcms2, libpng, tiff, webp, zlib, fftw-3, freetype, fontconfig, ghostscript, libiconv, libtool, openjpeg, openexr, expat, libxml2, pkgconfig Runtime Dependencies: urw-fonts

$ sudo deps graphicsmagick Full Name: GraphicsMagick @1.3.20_0+q8 Extract Dependencies: xz Library Dependencies: libxml2, bzip2, xz, zlib, libpng, tiff, freetype, libiconv, libtool, lcms2, jasper, jpeg


Completely unrelated, but what do you think about vips (http://www.vips.ecs.soton.ac.uk/)? I recently discovered the difference in performance between im and gm and that let me to investigate vips, which is presumably (a lot) faster than both.


In principle, it looks promising (in particular, using ORC to compile image manipulation kernels to SIMD), but it is a different thing to im or gm. It's a library and a GUI. The library is slightly too low-level for most things I'd use gm for, but a GUI is too laborious.

Perhaps it could be integrated into GM or something similar, and used as a back end for certain operations.


yeah, was going to say something similar, but with a simple openGL program...




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: