Godot MP3 loop: begin point only, so loop a Sume track as wav
Godot gives MP3 and Ogg only a loop begin point, no loop end. For a Sume BGM loop, cut a sample-exact wav with timeline audio split and set the loop on import.

Godot imports WAV, Ogg Vorbis and MP3, but for MP3 and Ogg Vorbis it supports only a loop begin point, not a loop end. A loop that must end before the last sample therefore needs a file whose end is the loop end. Cut your Sume track to that length with Timeline audio split, which returns a sample-exact wav by default, then set the loop in Godot's import dock.
What Godot documents
The importer page compares the three formats.
| Topic | Godot documents |
|---|---|
| Supported formats | WAV, Ogg Vorbis, MP3 |
| MP3 and Ogg loops | Loop begin point only; no loop end |
| Advice for short SFX | WAV |
| Advice for music | Ogg Vorbis |
Cut the loop
A Music Router track has no guaranteed length because the router has no duration field; ask for a loop in the prompt, for example a 30-second loopable ambient bed, and treat the result as a take. Pick the bar boundary you like and use operation: "split" with a single range. The default output.format is wav (pcm_s16le, sample-exact); Sume notes that mp3 adds priming padding at every edge, which would put a gap into a loop.
curl -X POST https://api.sume.com/v1/timeline-1.0/audio \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: godot-bgm-loop-001" \
-d '{
"operation": "split",
"url": "https://media.sume.com/artifacts/artf_demo/bgm.mp3",
"ranges": [{ "start": 4.0, "end": 28.0 }]
}'In the engine
Import the wav, open the Import dock, and turn on Loop. Leave the loop offset at 0 if the file starts on the first beat. A wav loop keeps both ends in the file, which is why this route works where an mp3 would not give you a loop end. The split costs a flat $0.01 per job and the range count is capped at 20, so you can cut several variants at once.
Limits
Wav files are large; Godot's own advice is Ogg Vorbis for music, so you may convert the final loop with your own tool once the boundaries are right. A cut is only seamless if the music itself repeats cleanly at the two points, and that depends on the take you chose, not on the split.
Before you ship
Keep the original mp3 as well. If you later change the loop points, you can re-cut from the source and the old take is not lost.
- Set the loop in the import dock, not in the prompt.
- Test the loop for a click at the seam.
- Keep the Sume job id with the asset for provenance.
- Prefer Ogg Vorbis for finished music if size matters, as Godot advises.
Sources
Related posts
More in Media tools
- Graduation video music: a 2-minute anthem with a build
Brief a 2-minute graduation video bed with a build to a triumphant moment at 1:20 for the diploma reel: one generation and a render, $0.325 on Sume.
- Grayscale value check for AI product images: does it read at a glance?
Convert a Sume image to grayscale, measure the contrast between product and background with ImageStat, and flag low-value-contrast images before they ship.
- H3 Max Recast: 1-4 person photos, 768p default, 1080p opt-in
H3 Max Recast swaps the people in one 5-30 s video using 1-4 reference photos, one per new person. Output is 768p by default; 1080p is opt-in.
- Hailuo 3.0 clips in a Sume timeline: set output.fps or omit it
Cutting 24 fps AI clips into a timeline at the wrong frame rate causes judder. Sume's Timeline output.fps accepts 24, 25, 30 or 60, or matches your sources.
Written by Sume