Loop bug
Posted: 02 Feb 2011 22:46
Hello,
I am experiencing a problem when looping video's.
I experienced this first using LibVLC 1.1.5 or 1.1.6, where I implemented a very simple way to loop video's, namely when the video had a status of ended, I would stop and start the mediaplayer in order to repeat the file. When the playing speed was very low, I noticed that it skipped the second frame.
Then I tried to check if this behaviour was the same in VLC player, and since it forgets the playing speed, it was impossible to tell. But, when I added 2 loop points, one at the first frame, and one at the tenth frame or something, I could adjust the playing speed, and I saw the same behaviour.
What I saw was, that after seeking (I thought it would jump to frame 0 but actually it jumped to frame 1, that's the first strange thing, but not what this post is about), it would skip the second frame. So actually it was displaying frames 1, 3, 4, 5, 6, 7, 8 ,9, 10, 1, 3, ...
I would have expected 0, 1, 2, 3, 4, ..., 10, 0, 1, 2, 3, 4, ..., 10
And when I tried the same thing in Fri Jan 21's nightly build I got
2, 3, 4, 5, 6, 7, 8, 9, 9, 2, 3, 4 ...
Different, but still wrong. Don't know if the same thing happens at speed 1.0. (Since the playing speed was about 1/10 of normal, I don't think it can have anything to do with a frame being decoded too late and thus being dropped.)
Since I don't know how to post files here, here is the avisynth script I used to generate a very short test-file (same length as the audio I added).
I am experiencing a problem when looping video's.
I experienced this first using LibVLC 1.1.5 or 1.1.6, where I implemented a very simple way to loop video's, namely when the video had a status of ended, I would stop and start the mediaplayer in order to repeat the file. When the playing speed was very low, I noticed that it skipped the second frame.
Then I tried to check if this behaviour was the same in VLC player, and since it forgets the playing speed, it was impossible to tell. But, when I added 2 loop points, one at the first frame, and one at the tenth frame or something, I could adjust the playing speed, and I saw the same behaviour.
What I saw was, that after seeking (I thought it would jump to frame 0 but actually it jumped to frame 1, that's the first strange thing, but not what this post is about), it would skip the second frame. So actually it was displaying frames 1, 3, 4, 5, 6, 7, 8 ,9, 10, 1, 3, ...
I would have expected 0, 1, 2, 3, 4, ..., 10, 0, 1, 2, 3, 4, ..., 10
And when I tried the same thing in Fri Jan 21's nightly build I got
2, 3, 4, 5, 6, 7, 8, 9, 9, 2, 3, 4 ...
Different, but still wrong. Don't know if the same thing happens at speed 1.0. (Since the playing speed was about 1/10 of normal, I don't think it can have anything to do with a frame being decoded too late and thus being dropped.)
Since I don't know how to post files here, here is the avisynth script I used to generate a very short test-file (same length as the audio I added).
Code: Select all
videolength = 37
videocolor = $0000FF
a = directshowsource("click.wav").loop(99)
v = BlankClip(width = 80, height = 60, color=videocolor, fps=25, length=videolength).audiodub( a )
v.showframenumber()
last.Trim(0,-0)
return last