Urgent.News

What's breaking now, across thousands of outlets.

Tech

Making seamless video loops with ffmpeg: repeat, ping-pong, crossfade and a generated bridge

Disclosure: I build LoopVideo , a browser-based tool for making video loops. The ffmpeg techniques below work on their own, with or without it. This post was written with the help of AI tools. A looping video usually "jumps" at one place: where the last frame is followed by the first frame again. If those two frames don't match, viewers notice the cut on every cycle. This post walks through four…

Creating seamless video loops can be achieved using ffmpeg with various techniques. The main challenge lies in the seam between the last frame and the first frame, which can be noticeable if those frames do not match. This article outlines four ways to address this issue using plain ffmpeg, from the simplest method to the most complex.

First, normalize your video clips by ensuring they have consistent frame rates, sizes, and pixel formats. This step is crucial to prevent further issues when concatenating clips.

The simplest method is to repeat the clip using the -stream_loop flag. This method is lossless and fast but does not hide any visible seams.

For a more sophisticated approach, consider the ping-pong technique. This method involves playing the clip forward and then backward, creating a boomerang effect where the end of the forward pass merges seamlessly with the start of the reverse pass. However, this technique requires buffering the entire clip in memory, making it suitable for short clips only.

Another option is crossfading the end of the clip into the start. This method involves trimming the first second from the clip and fading the end of the remaining clip into that first second. The output starts at the 1-second mark and ends at the same point, making the loop point appear seamless. This works well for textures and ambient footage but may cause ghosting in moving subjects due to the fade.

In cases where the start and end frames differ significantly, generating a bridge transition using an image-to-video model can help. Extract the last and first frames from the normalized clip, feed them into an image-to-video model that supports specifying start and end frames, and obtain a short bridge clip. Then, concatenate the bridge with the original clip.

Ensure the bridge is scaled to match the size of the original clip and watch the result carefully for any warping or speed changes around the join. Note that using this method in the browser via ffmpeg.wasm requires a signed-in, verified account and uses one credit or the free daily attempt per run.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

CVE-2026-96362 and the Limits of Version-Based Drupal Scanning

CVE-2026-96362 and the Limits of Version-Based Drupal Scanning Vulnerability overview CERT-BUND advisory WID-SEC-2026-3554 covers a batch of vulnerabilities in contributed Drupal projects, published…

  • 36 contributed Drupal projects affected by CVE-2026-96362
  • High risk rating assigned to batch of vulnerabilities
  • External scanning tools may miss affected sites

How to Automate Job Outreach Without Landing in Spam

You wrote a script that finds hiring managers and emails them about your candidacy. It worked for a week. Then the replies stopped, and you assumed nobody was interested. Nobody was reading.

  • Implement SPF, DKIM, and DMARC for email authentication
  • Gradually warm-up email sending volume and monitor engagement
  • Randomize sending behavior, personalize emails, and verify addresses

TanStack npm supply-chain attack: how a Dependabot bump spread a worm

On May 11, 2026, a worm published 84 malicious versions of 42 TanStack packages to npm, with valid provenance, from TanStack's own release pipeline. Two and a half hours later a Dependabot pull request pulled two of those versions into a small aviation-data project, and a single merge turned its maintainer's publish token into 110 more…

  • Malicious worm infiltrated 84 TanStack npm packages on May 11, 2026
  • Dependabot pull request introduced compromised versions into aviation project
  • Worm used publish token to create 110 malicious versions within 95 minutes

More from Thursday 1 October →