Others Video editing help. Videos do not seamlessly loop to beginning

Deleted member 1017199

Well-Known Member
Nov 17, 2018
1,384
1,353
I've been using kdenlive to add sounds to animations but the rendered videos do not loop seamlessly even if the original video does. Looking for tips or recommendations please anything would help.
 

mickydoo

Fudged it again.
Game Developer
Jan 5, 2018
2,446
3,547
Are you putting the videos in renpy and they are not looping, is that what you mean?
 

Deleted member 1017199

Well-Known Member
Nov 17, 2018
1,384
1,353
Are you putting the videos in renpy and they are not looping, is that what you mean?
No they are just videos for viewing. Normally I get videos or animations from sites like rule34.xxx and I just add sounds to them. When I play them with loop turned on in vlc some of them loop seamlessly and some don't. I'm trying to make it so my output files loop seamlessly.
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,561
2,183
The answer to seamless looping is that the very last frame of the video be identical to the very first frame of the video... and then remove that 1 frame from the end (to avoid seeing effectively the same frame twice when it loops).

If you can't find identical (or near identical) frames - then it's never going to look convincing.

Some video authors will create video intended to loop. Some won't. If you want to make the "some won't" video loop, you'll need to try to find two points within the video that are "close enough" to look okay (better still, if the two frames are identical).

If you're doing that for videos you yourself didn't create... then I wish you luck. I can imagine it being very time consuming and requiring a lot of patience and attention to detail. I personally don't know of any tools that would do it for you... though perhaps google .

You mentioned VLC. It definitely has a "step frame by frame" button. Though you would need to add it your VLC UI using "Tools -> Customize Interface". The button is called "Frame by Frame". That would help you see each individual frame and so if you had two copies of the same video open, one paused and one not - you could try to eyeball it as best you can.

From that you might be able to figure out the frame number of the appropriate bit of the video where it repeats (In theory multiply the time of the video in seconds by the FPS [Frames per second] number to find the rough frame number). VLC doesn't seem to show the frame number, but a quick search on google did suggest a couple of workarounds.

After that, it's a case of editing the video file to be exactly the right length so when it loops around, that "first/last" frame thing is correct (or close enough). That could be Adobe Premier I guess or some other Adobe product. Any feature rich video editing software should be capable of it though.

Personally, I would use a non-visual editing tool called " ", which is primarily aimed at recoding video files from one format to another - but also includes a "Range" feature which lets you select a specific part of the video rather than the whole thing. I would probably try setting the Range from "Frame 0" to "Frame <whatever>". There is a "Range Time to Time" option too - but I have my doubts whether that would be accurate enough for a looping video. But that's just because I like Handbrake - I'm sure other tools exist.

But mainly, it's about finding those "first" and "last" matching video frames.

Note that VLC also has a "Loop from A -> B" button too. Where you set a position "A" and then a position "B" and VLC loops the video between those two bookmarks until you switch it off. Doesn't sound what you are looking for, but maybe work as a rough starting point.
 
Last edited:
  • Like
Reactions: anne O'nymous

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,263
15,073
Some video authors will create video intended to loop. Some won't.
Be noted that sometimes it's voluntarily that the video can't loop seamlessly ; by doing so their author limits drastically the possibility to use them without their consent.