I’m looking for a video player that would support speed change dynamically.
The only one I found actually is the ofxHapPlayer but it compiles only in 32 bits.
ofxHapAVPlayer works well in 64bit but doesn’t support continuous speed changes.
(Continuous speed change meaning changing the speed without frame dropping and sound muting)
Any suggestions ?
(I’m on macOS 10.11.6, El Capitan with Xcode 8.2)
edit : Just tried the ofxVLCPlayer with no more success. My video file are recorded with ffmpeg from HLS stream in H264 at 25fps with AAC 44100 for the audio encoding.
Thanks Kashim for answering.
Maybe I wasn’t quite clear, the “setSpeed” method works but not “continuously”, this mean that I have frame dropping and the sound stops a short instant each time it is used.
Thanks for the trick, it does work well for the frames but not for the sound which is still chopped and not “scrubbed”, do you have a particular calculation for the position?
I did it like this with the ofxHapAVPlayer :
I have a few things to add, Avfoundation does not permit that much freedom in speed changes, it is a built in limitation at the moment. Quicktime was actually better at this but is depreciated by apple.
Secondly your choice of codec will be really important for this. H264 is not a good choice for speed changes, go for a codec that does not use interpolation or i-frames. Higher end proress will be better, 422 is fine. Same with audio, less compression will help, so straight PCM. I would check out using windows instead and this addon https://github.com/secondstory/ofxDSHapVideoPlayer
Image sequences and audio may be a good way to go as well, but I think sync will be hard in that case.
for a cross-platform 64bit video-only solution you might wanna check my addon ofxHPVPlayer that allows dynamic speed changing and fast scrubbing of frames. You can query the current position of the video file to sync an external audio file to it (or vice-versa)
Thanks all for responding.
The video files are recorded from HLS stream on the fly with a bash script and ffmpeg and I don’t want to deal with double files and a second encoding by splitting the audio from the video.
I tried the Apple Pro Res format with ofxVLCplayer, ofAVFoundationPlayer and ofxGStreamer but none of it works either. (I tried the 4 different profile, proxy, LT, SQ and HQ).
Also I did considered the ofxHPVPlayer before to post here but I can’t pre-encode the video since it is for an art installation that is supposed to play video freshly recorded from the web.
And from what I understand I can’t encode HPV video with ffmpeg.
So I guess I will do a second headless 32bit app that play HAP video and share the texture via Syphon; a few OSC messages should do the remote to control the speed and switch from a file to another.