Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- start this script at the same time as you playback the movie and dump the movie.
- when finished, be sure to hit "stop" in the lua script window to ensure that the created file gets flushed
- you'll have an "skip.avs" that will contain a set of Trim() commands that will create a cutsceneless encode
- ]]
- local pigf = -1
- local skipping = true
- local startframe = 0
- local outfile = io.open ("skip.avs", "w")
- local firstsegment = true
- -- remember to hit "stop" to ensure that the io file gets cleaned up correctly!
- while true do
- local istop = memory.readbyte(0x000009)
- local dstop = memory.readbyte(0x0005F5)
- local estop = memory.readbyte(0x000E18)
- if istop+dstop+estop == 0 or istop+dstop+estop == 0x6F then -- display this frame
- if skipping then -- end skipping, so record start of new unskipped segment
- startframe = emu.framecount()
- skipping = false
- end
- else -- skip this frame
- if not skipping then -- start skipping, so record finish of last unskipped segment
- if emu.framecount () > 1 then -- avoid 1 frame edge case that causes avs problems
- if firstsegment then
- outfile:write (string.format ("c0 = last\n c0.Trim (%i, %i)\n", startframe, emu.framecount () - 1))
- firstsegment = false
- else
- outfile:write (string.format ("last + c0.Trim (%i, %i)\n", startframe, emu.framecount () - 1))
- end
- skipping = true
- end
- end
- end
- emu.frameadvance()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement