I have a simple setup:
chopexec dat reffing an info chop that reffs moviefilein.
on the chopexec I’m printing the name of each channel that change it’s value (filtering the cook channels for convience) I don’t see the name of the “open, opening, open_failed” channels being printed while changing the file on the moviefilein top.
Actually the only channel that gives me indication that opening went well is “fully_pre_read”
There is currently no 100% good way of checking if a file is open and ready to play except infering that state from different values in combination, namely the File-Par and the open channel of the infoChop.
Idealy we could get a callback for the movieFileInTOP with onReady(), onLoad() etc.
@ItayGal When reducing the FileOpenTimeout to 0 and making sure that you set the file-par to “” before loading a new file should work.
Thanks for the quick response.
Here’s a simple toe to replicate the issue.
The thing I’m trying to acheive is a reliable way of knowing when a new video file is opened and when it’s ready to play.
The best member to inspect in the Movie File In TOP to determine if it’s ready to play is the isFullyPreRead member of the Movie File In TOP, or the ‘fully_pre_read’ Info CHOP channel. This will tell you if the pre-read cache has been filled, so that you are less likely to drop frames due to frames not being decoded.
The issue here is that this will ping pong between 0 and 1 during playback as it will sometimes not be quick enough with fetching the new frames before the next frame starts.
The only solution here would be to do a shadow-state that we set and adjust based on the change of the infoChannels which is extremly tedious and error prone.