transitive-bullshit / ffmpeg-gl-transition

FFmpeg filter for applying GLSL transitions between video streams.
650 stars 126 forks source link

[bug] error when applying the patch #2

Closed mashabelyi closed 6 years ago

mashabelyi commented 6 years ago

I am getting an error when applying the patch:

error: patch failed: Makefile:352
error: Makefile: patch does not apply
error: allfilters.c: No such file or directory

Here is the verbose output

Checking patch Makefile...
error: while searching for:
OBJS-$(CONFIG_ZMQ_FILTER)                    += f_zmq.o
OBJS-$(CONFIG_ZOOMPAN_FILTER)                += vf_zoompan.o
OBJS-$(CONFIG_ZSCALE_FILTER)                 += vf_zscale.o

OBJS-$(CONFIG_ALLRGB_FILTER)                 += vsrc_testsrc.o
OBJS-$(CONFIG_ALLYUV_FILTER)                 += vsrc_testsrc.o

error: patch failed: Makefile:352
error: Makefile: patch does not apply
Checking patch allfilters.c...
error: allfilters.c: No such file or directory

The libavfilter/allfilters.c is there, so I am not sure what the problem is here. I am new to patching with git... any advice?

transitive-bullshit commented 6 years ago

Hey @mashabelyi, this was my fault as I had exported the git diff in the wrong format. I just pushed an update and tested that it works for me locally.

Please let me know if this fixes your issue.

mashabelyi commented 6 years ago

Thanks! It works for me now.

Quick question: when I input two 5 second files, it outputs a 5s file with the transition somewhere in the middle. Is there a way to actually concatenate the files? Fade in video 2 and the end of video 1?So, with transition duration=1s, the output file duration would =9s.

transitive-bullshit commented 6 years ago

Yes, although it's not as simple as it should be at the moment.

This should do exactly what you want for concatenating two, 5-second mp4s with a 1s fade inbetween:

./ffmpeg \
  -i 0.mp4 \
  -i 1.mp4 \
  -filter_complex " \
    [0:v]split[v000][v010]; \
    [v000]trim=0:4[v001]; \
    [v010]trim=4:5[v011t]; \
    [v011t]setpts=PTS-STARTPTS[v011]; \
    [v011][1:v]gltransition=duration=1:source=./crosswarp.glsl[vt0]; \
    [v001][vt0]concat=n=2[outv]" \
  -map "[outv]" \
  -c:v libx264 -profile:v baseline -preset slow -movflags faststart -pix_fmt yuv420p \
  -y out.mp4

See concat.sh for an example of a similar concat with 3 inputs. The filter syntax gets a bit tricky but it's pretty easy to script together with a wrapper for n inputs.

mashabelyi commented 6 years ago

this is great! Exactly what I wanted. Thanks so much for your help and for this library.

transitive-bullshit commented 6 years ago

great to hear 👍

Aravindraj92 commented 6 years ago

iam getting error

error: patch failed: libavfilter/Makefile:367 error: libavfilter/Makefile: patch does not apply error: patch failed: libavfilter/allfilters.c:357 error: libavfilter/allfilters.c: patch does not apply

transitive-bullshit commented 6 years ago

It's quite likely that something may have changed in upstream ffmpeg master. Looking into it now..

transitive-bullshit commented 6 years ago

@Aravindraj92 the patch applies correctly against ffmpeg master HEAD, as I just tested it locally.

Please make sure you're using the latest source of ffmpeg.

Trway commented 1 year ago

it not works

shui-hai commented 1 year ago

iam getting error

error: patch failed: libavfilter/Makefile:367 error: libavfilter/Makefile: patch does not apply error: patch failed: libavfilter/allfilters.c:357 error: libavfilter/allfilters.c: patch does not apply

I had the same problem. How did you fix it