samiamwork / Movist

Movie Player for Mac OS X based on QuickTime & FFmpeg. (Fork of original project on Google Code as it seems to have died)
GNU General Public License v3.0
206 stars 54 forks source link

Forward/backward 10 sec skips whole movie #37

Open gradha opened 10 years ago

gradha commented 10 years ago

This feature works for movies like mov or mp4, but files like ts will just skip to the next file in the playlist. I understand these files don't have a frame index, so maybe the forward option could instead of skipping the movie advance decoding through the frames as fast as it can. Playback of such movies could also generate on the fly a frame position log so that jumping back could work.

samiamwork commented 10 years ago

I don't like the idea of overloading "skip" to "fast-forward" but FFMPEG/libav, if I remember right, has a way to skip by bytes that, in theory, could provide a way around this. Building a frame index is not a bad idea also. Movist already does something similar for broken AVI videos although I can't say I've looked much at it (FFIndexer.m).

In fact, taking a brief look, it looks like perhaps FFIndexer could be used for this. Just extend isIndexComplete to check for a frame and index count of 0 to also indicate an incomplete index and remove the AVI specific check in MMovie_FFMPEG. Just a shot in the dark but it looks promising.