Skip to content
    Open navbar menu
    Sign UpLog In
    Back to all Bounties

    Earn 4,500 ($45.00)

    Time Remainingdue 12 months ago
    Canceled

    fix ffmpeg concat clips with different codecs

    luquitared
    luquitared
    Posted 12 months ago

    Bounty Description

    I am joining clips like this:

    def concatenate_clips(clip_names, video_filename):
    print(clip_names)
    video_streams = []
     
    for name in clip_names:
    input_clip = ffmpeg.input(name)
    video_streams.append(input_clip)
     
    # Concatenate video without audio
    concat_video = ffmpeg.concat(*video_streams, v=1, a=0)
     
    # Save the result (video without audio)
    output = ffmpeg.output(
    concat_video, video_filename,
    pix_fmt='yuv420p', vcodec='libx264'
    )
    output.run()
    return video_filename

    However, when I join clips that have been created from GIFs with other .MP4s, I get an infinite frame duplication error:

    More than 1000 frames duplicated 0kB time=00:00:00.00 bitrate=N/A speed= 0x

    After accepting the bounty, I will share with you the entire source that shows how I am encoding all clips. I believe they need to be encoded in the same way to prevent this error.

    Copyright © 2024 Replit, Inc. All rights reserved.
    • twitter
    • tiktok
    • instagram
    • facebook

    Replit

    Programming languages

    • Python
    • JavaScript
    • TypeScript
    • Node.js
    • Nix
    • HTML, CSS, JS
    • C++
    • Golang