Commit 4c8d117
committed
This is a much faster way to grab frames from a video. Seeking aftering the -i flag causes the video to load all frames right up to $frameTime. In a large movie file this is extremely slow. Instead, you can seek quickly before the input file is loaded with -i, but this isn't quite as accurate as having the -ss after the -i. But, there's a fast & accurate way to seek ahead, which is to quick-seek to a point close to $frameTime, and then accurately seek from there to $frameTime using a second -ss option. See http://ffmpeg.org/trac/ffmpeg/wiki/Seeking%20with%20FFmpeg for a thorough explanation. This makes grabbing frames more than a minute or two into a large movie 100x (or more) faster as it gets progressively slower the further into the video the frame is with -i before -ss.
1 parent 94f6fb5 commit 4c8d117
1 file changed
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
675 | 675 | | |
676 | 676 | | |
677 | 677 | | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
678 | 690 | | |
679 | 691 | | |
| 692 | + | |
680 | 693 | | |
681 | 694 | | |
682 | | - | |
| 695 | + | |
683 | 696 | | |
684 | 697 | | |
685 | 698 | | |
| |||
745 | 758 | | |
746 | 759 | | |
747 | 760 | | |
748 | | - | |
| 761 | + | |
0 commit comments