RaceControl icon indicating copy to clipboard operation
RaceControl copied to clipboard

Ability to Increase the Playback Speed of Videos

Open zRo-ToLeRaNcE opened this issue 2 years ago • 18 comments

Is your feature request related to a problem? Please describe. When watching playbacks or videos, it would be great to able to increase the speed of the playback. Playback speeds for the internal player - 1.25x, 1.5x, 1.75x, and 2x - very popular in video playback software.

Describe the solution you'd like It can be either by right clicking OR just a button on the interface.

Describe alternatives you've considered Can't think of an alternative. I am actually shocked that I couldn't find anybody else making this request. Obviously - this would not be needed for Live videos.

Additional context None.

zRo-ToLeRaNcE avatar Mar 10 '22 15:03 zRo-ToLeRaNcE

I just added a basic implementation for this, but there's a limitation in Flyleaf in that it only supports 1x, 2x, 3x etc. and nothing in between. Hopefully @SuRGeoNix can improve that.

robvdpol avatar Mar 10 '22 19:03 robvdpol

I just added a basic implementation for this, but there's a limitation in Flyleaf in that it only supports 1x, 2x, 3x etc. and nothing in between. Hopefully @SuRGeoNix can improve that.

Ok thanks - Great to know it's being worked on. 2x and higher are a little too fast. That's basically fast forwarding. You can't really watch something and it be useful on 2x or greater unless you're an robot of sorts.

@SuRGeoNix - what say you?

zRo-ToLeRaNcE avatar Mar 10 '22 22:03 zRo-ToLeRaNcE

@zRo-ToLeRaNcE, @robvdpol Sure. When I added this feature I had in mind only the performance (x2, x3, x4 just skip post-processing frames). I just worry that with the new implementation it will not skip frames at all and it will be really heavy -performance wise- on speeds x4, x8, x16 (users asked for higher speed, mainly for cameras). Ideally, I should mix both techniques but it will require more time effort.

SuRGeoNix avatar Mar 11 '22 08:03 SuRGeoNix

@zRo-ToLeRaNcE, @robvdpol Sure. When I added this feature I had in mind only the performance (x2, x3, x4 just skip post-processing frames). I just worry that with the new implementation it will not skip frames at all and it will be really heavy -performance wise- on speeds x4, x8, x16 (users asked for higher speed, mainly for cameras). Ideally, I should mix both techniques but it will require more time effort.

Ok thanks for the info!

I tried to donate to your FlyLeaf project but I notice you don't take contributions.

zRo-ToLeRaNcE avatar Mar 11 '22 12:03 zRo-ToLeRaNcE

Thanks for that @zRo-ToLeRaNcE, I guess I will feel responsibility with the contributions when now is just a hobby.

SuRGeoNix avatar Mar 11 '22 13:03 SuRGeoNix

Hi @robvdpol @SuRGeoNix, thanks for implementing the video speed adjust options. I agree with @zRo-ToLeRaNcE that 2x, 3x are great for fast-forwarding, but not so much for watching it at the same time.

With other videos I regularly use a slightly increased speed, to be able to see it all in less time. I hope you can find some time to implement 1.25 - 1.5 - 1.75 speed adjust options somehow.

Thanks! Ruud

6th-avenue avatar Mar 17 '22 08:03 6th-avenue

Hi @6th-avenue, make sense, I will try to include it next week!

SuRGeoNix avatar Mar 18 '22 19:03 SuRGeoNix

@robvdpol I've included it this to v3.4.10

SuRGeoNix avatar Mar 21 '22 19:03 SuRGeoNix

@SuRGeoNix Great!

robvdpol avatar Mar 21 '22 19:03 robvdpol

Thanks for that @zRo-ToLeRaNcE, I guess I will feel responsibility with the contributions when now is just a hobby.

Oh yes... that's why I try to contribute to excellent projects like these. I have no idea why F1 haven't approached you to buy this yet. It's amazing!

zRo-ToLeRaNcE avatar Mar 21 '22 19:03 zRo-ToLeRaNcE

Hi @SuRGeoNix , thanks for the fast turn-around, much appreciated 👍

6th-avenue avatar Mar 22 '22 09:03 6th-avenue

Flyleaf had added support for more common playback speeds in the latest release

https://github.com/SuRGeoNix/Flyleaf/releases/tag/v3.4.10

Edit:

Nevermind.

Note to self: Read the entire issue thread

imnotnoa avatar Mar 23 '22 12:03 imnotnoa

Kind of fixed in 92ad45fa41001ea0948f3392aeb60885a12220f0

However there seems to be an issue, whenever I speed up or slow down the playback speed my sound is crackly. Only at 1x speed the sound is ok.

@SuRGeoNix thoughts?

robvdpol avatar Mar 25 '22 16:03 robvdpol

@robvdpol Yes, that's a different issue though. Currently, it drops audio samples based on speed when ideally should use a pitch filter. I don't think that will affect the performance so I will plan to add it as well.

Update: Well, just tried quickly to use XAudio2 pitch and sounds really bad. It's not the pitch that needs to change but the time scale which makes it a really complicated algorithm which is not includes in the XAudio2 as I can see. Probably I will have to use ffmpeg filter but that will take time :(

SuRGeoNix avatar Mar 25 '22 20:03 SuRGeoNix

@robvdpol Yes, that's a different issue though. Currently, it drops audio samples based on speed when ideally should use a pitch filter. I don't think that will affect the performance so I will plan to add it as well.

Update: Well, just tried quickly to use XAudio2 pitch and sounds really bad. It's not the pitch that needs to change but the time scale which makes it a really complicated algorithm which is not includes in the XAudio2 as I can see. Probably I will have to use ffmpeg filter but that will take time :(

Thanks for your work so far - amazing!!!

zRo-ToLeRaNcE avatar Mar 26 '22 14:03 zRo-ToLeRaNcE

Tried to add also the ffmpeg filter (atempo) but it will require to include avfilter.dll which is a large size ffmpeg library and I'm not sure yet if I want to make it as a requirement just for that to be honest. I mean is it that important to have 'perfect' sound on slow/fast speeds?

SuRGeoNix avatar Mar 26 '22 18:03 SuRGeoNix

Hi John! Thanks for attempting to get the audio fixed on slow/fast speeds.

mean is it that important to have 'perfect' sound on slow/fast speeds?

I like to share my thoughts on that question;

  • Slow speeds ( < 1x ): if a user wants to play the video at slower than 1x speed, the most likely scenario is the user is interested in something in the video in a particular scene that goes too fast to follow. I do not believe sound is important then.

  • Fast speeds ( > 1.5x ): if a user speeds up the video this much, it is likely just attempting to fast forward to a scene up ahead in a visual way, so again, no sound would be preferred over the really bad sound

  • Speeds > 1x < 1.5x : If a user is playing the video at a relatively small increase, the likely scenario is that the user is watching the video and listening to the audio in a faster way but still following along with both the video and audio. With Audio Podcasts this is exactly what many people do too.

So you are right, the sound is for sure not of interest in several use-cases, but of interest in some. Does it need to be 'perfect' in the > 1x, < 1.5x range, not at all, but it should be OK-ish.

Is there a way to make the sound more uniform? maybe apply a static/noise filter? or filter away any sudden volume boost or high frequencies?

Thanks! Ruud

6th-avenue avatar Mar 27 '22 13:03 6th-avenue

@6th-avenue Well Ruud, that was an impressive analysis :) Even If I've developed the internal player I'm not much of a user to be able to understand the needs.

I've already tried to just change the sample rate but it does not sound good at all. I'm not sure if you heard it how it sounds currently, I think it's very clear (you can understand what they say) but crackly as it drops some audio samples. I think the right algorithm is too complicated to implement it by myself and I will not be able to avoid including the ffmpeg's filter library. I will review this in the upcoming versions.

SuRGeoNix avatar Mar 27 '22 15:03 SuRGeoNix