On Sat, Jul 16, 2022 at 11:22 AM Denis Połeć <[email protected]> wrote:
> Hello, > I wouldn't call myself a beginner, but I still need a little bit to become > a pro. :) > I have a question that might be easy to answer. > > I am working on a script to bring multiple flat videos into a > equirectangular projection by using v360 filter. > I have the problem that the edges of the input are very jagged. > > This did not lead to a good result when I play the equirectangular > projection in a 360 player. I have also already tried different > interpolation modes, which does not lead to a better result. > Does anyone have an idea how I can avoid that? Is there a better way to do > this task? > > > Here is an example code with the result. The video in the example has a > resolution of 1080p: > > > ffmpeg -i BRAIN.mp4 -lavfi "\ > > [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw='0':alpha_mask=1[fg1];\ > > [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=90:alpha_mask=1[fg2];[fg2][fg1]overlay[a];\ > > [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=-90:alpha_mask=1[fg3];[fg3][a]overlay[b];\ > > [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=180:alpha_mask=1[fg4];[fg4][b]overlay[c];\ > \ > > [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=0:pitch=45:alpha_mask=1[fg5];[fg5][c]overlay[d];\ > > [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=90:roll=45:alpha_mask=1[fg6];[fg6][d]overlay[e];\ > > [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=-90:roll=-45:alpha_mask=1[fg7];[fg7][e]overlay[f];\ > > [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=180:pitch=-45:alpha_mask=1[fg8];[fg8][f]overlay[g];\ > \ > > [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=0:pitch=-45:alpha_mask=1[fg9];[fg9][g]overlay[h];\ > > [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=90:roll=-45:alpha_mask=1[fg10];[fg10][h]overlay[i];\ > > [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=-90:roll=45:alpha_mask=1[fg11];[fg11][i]overlay[j];\ > > [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=180:pitch=45:alpha_mask=1[fg12];[fg12][j]overlay[k];\ > \ > > [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=0:pitch=90:alpha_mask=1[fg13];[fg13][k]overlay[l];\ > [0]drawbox=w=1:h=1:color=black,v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=0:pitch=-90:alpha_mask=1[fg14];[fg14][l]overlay" > -q:v 4 -vframes 1 -y test11.jpg > > Your filtergraph is extremely inefficient with that many cascaded overlays and gives poor results. For proper stitching borders need to have small transition from full opacity to no opacity. To add small transitions with opacity on borders could use blurring filters for example on alpha plane only. Did not tried yet as I never needed to do stitching. > output: > https://nextcloud.denispolec.de/index.php/s/8yF7rKdnB9HdJsa < > https://nextcloud.denispolec.de/index.php/s/8yF7rKdnB9HdJsa> > zoomed: > https://nextcloud.denispolec.de/index.php/s/fwdapyA8aGBdC2M < > https://nextcloud.denispolec.de/index.php/s/fwdapyA8aGBdC2M> > > Thanks! > > All the best, > denis > _______________________________________________ > ffmpeg-user mailing list > [email protected] > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > [email protected] with subject "unsubscribe". > _______________________________________________ ffmpeg-user mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
