0

Here is the code in question:

for comment in thread['comments']:
        commentClips += fragmentConcat(comment, filePrefix)
        
        staticClip = ffmpeg.input('assets/static.mp4')
        commentClips.append(staticClip
                                .filter('setsar', 1, 1)
                                .filter('scale', 1920, 1080)
                           )
        commentClips.append(staticClip.audio)

This code generates the following error:

ValueError: Encountered scale(1920, 1080) <6adb028f8ef5> with multiple outgoing edges with same upstream label None; a `split` filter is probably required

I have tried using only the video part of the input for the first call (e.g. staticClip['v'].filter...), and I have tried using the split call as suggested (e.g. ffmpeg.input(...).split(). Nothing has worked. What is the issue, and how can I rememdy it? Thanks.

Lysander Cox
  • 285
  • 1
  • 2
  • 11
  • Did you found out the solution for this? – kup Jul 31 '21 at 03:17
  • @kup So, this issue got resolved a while back, and I'm struggling to remember exactly what I did to fix it. IIRC, it involved having different parameters from the clip in question `assets/static.mp4` and the clips I was merging it with. I ended up using `ffprobe` to go through those parameters one by one and then used `ffmpeg` to modify `assets/static.mp4` to make sure that the parameters matched in all cases. Other than that, I also switched from using the ffmpeg library to just calling `ffmpeg` directly via `subprocess.run`. – Lysander Cox Aug 01 '21 at 06:31
  • @kup Reviewed my SO history, and found the advice that solved the issue: https://stackoverflow.com/questions/67303052/mp4box-concatenating-track-id-1-even-though-sample-descriptions-do-not-match – Lysander Cox Aug 06 '21 at 17:06

0 Answers0