transitive-bullshit / ffmpeg-gl-transition

FFmpeg filter for applying GLSL transitions between video streams.
647 stars 125 forks source link

problem with gltransition with 480p #40

Open yukesh0505 opened 5 years ago

yukesh0505 commented 5 years ago

hello, I have a problem with GL Transition while rendering video at 480p, GL EFFECT applies but not as it was but it works fine for 1080P and 720P, here is my command:

ffmpeg -y -loop 1 -t 5 -i /srv/sample/text_images/textimage_bRq4E_1560330312.png -loop 1 -t 8 -i /srv/sample/text_images/textimage_mZPFr_1560330318.png -loop 1 -t 16 -i 'https://pixabay.com/get/52e3d14a4b5ab114a6df8c7ece2a3e7f083edbe35352704f742779.jpg' -loop 1 -t 18 -i 'https://pixabay.com/get/55e6d7424f52b114a6df8c7ece2a3e7f083edbe35352704f742779.jpg' -t 8 -i '/srv/sample/img/image.png' -filter_complex "[2:v]scale=w=2556:h=1440,zoompan=z='zoom+0.001':x='if(gte(zoom,1.5),x,x-1)':y='y':s=852x480:d=180,setsar=1,drawbox=color=black@0:width=iw:height=ih:t=fill[v2];[v2][0:v]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2[v2];[4:v]fps=25,scale=25:25,setsar=1:1[v4];[v2][v4]overlay=x=10:y=(main_h-overlay_h)-10[v2];[3:v]scale=w=2556:h=1440,zoompan=z='zoom+0.001':x='if(gte(zoom,1.5),x,x-1)':y='y':s=852x480:d=240,setsar=1,drawsamplev/sample/fonts/Catamaran/Catamaran-Regular.ttf:text=pixabay.com:fontcolor=white:fontsize=20:x=60:y=(h-text_h)-10,drawbox=color=black@0:width=iw:height=ih:t=fill[v3];[v3][1:v]overlay=x=(main_w-overlay_w)/2:y=(main_h-overlay_h)/2[v3];[4:v]fps=25,scale=25:25,setsar=1:1[v4];[v3][v4]overlay=x=10:y=(main_h-overlay_h)-10[v3];[v2]split[s12][s22];[s12]trim=0:5:start=0:duration=5[s12];[s12]setpts=PTS-STARTPTS[s12];[s22]trim=5:6[s22];[s22]setpts=PTS-STARTPTS[s22];[v3]split[s13][s23];[s13]trim=0:7:start=0:duration=7[s13];[s13]setpts=PTS-STARTPTS[s13];[s23]trim=7:8[s23];[s23]setpts=PTS-STARTPTS[s23];[s22][s13]gltransition=duration=1:source=/filters/CircleCrop.glsl[vt0];[s12][vt0][s23]concat=n=3:v=1:a=0[tmp]" -map '[tmp]' -pix_fmt yuvj444p /srv/sample/rendered/video_h5DjO_1560330312.mp4

what makes to fail, please let me to understand.

i also attach the image, please give me some suggestions

screencapture-test-multimedia5-producedvideo-2019-06-12-14_48_17 (1)

mylyu commented 4 years ago

Hi, I got similar problems when using a chain of filters such as crop, scale, crop before the gltransition filter. A solution would be generating temp videos with all the filters before gltransition, and feed them to gltransition filter in a new command.

wnpllrzodiac commented 3 years ago

pay attention to linesize and pedding at every video data line end which means video->width != video->linesize[0] (e.g. 736 vs. 720) add a scale filter before gltransition will fix the probelm filter_complex scale=640x480,gltransition=balalalaallaxxxx