Video Player audio
Posted: Sun Jan 24, 2021 10:21 pm
I am attempting to desync a video and it's audio, and seek each part as I please. the method I've chosen to do this is to load two of the video, mute one, and don't draw the other. the problem though is when I try to change the seek on the audio-only one, then the video stops. if you change the seek with the video, then the audio stops. I've tried copying the video file (OGV) so it was loading two different files, but it still happens. any help highly appreciated!
this is all the code, in main.lua:
(right click to seek)
this is all the code, in main.lua:
(right click to seek)
Code: Select all
function love.load()
path = "video.ogv"
vid = love.graphics.newVideo(path)
aud = love.graphics.newVideo(path)
love.window.setMode(vid.getWidth(vid),vid.getHeight(vid))
vid:play()
aud:play()
vid:getSource().setVolume(vid:getSource(),0)--mute video
end
function love.update(dt)
if love.mouse.isDown(2) then
vid:seek(440)
end
print(vid:tell())
end
function love.draw()
love.graphics.draw(vid)
end