Commit 29ef564
Fix playback speed by using ffmpeg setpts filter for proper speed adjustment
- Use ffmpeg's setpts filter to actually change video speed before frame extraction
- Formula: setpts=(1/playbackSpeed)*PTS adjusts video presentation timestamps
- This properly speeds up/slows down video by dropping/duplicating frames
- File sizes now correctly differ based on speed (fewer frames for speedup, more for slowdown)
- Simplified delay calculation since speed is handled by ffmpeg
Co-authored-by: SwaggyMacro <38845682+SwaggyMacro@users.noreply.github.com>1 parent c5594da commit 29ef564
1 file changed
Lines changed: 11 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
559 | 559 | | |
560 | 560 | | |
561 | 561 | | |
562 | | - | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
563 | 568 | | |
564 | 569 | | |
565 | 570 | | |
566 | 571 | | |
567 | | - | |
| 572 | + | |
568 | 573 | | |
569 | 574 | | |
570 | 575 | | |
| |||
578 | 583 | | |
579 | 584 | | |
580 | 585 | | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
585 | 589 | | |
586 | 590 | | |
587 | | - | |
| 591 | + | |
588 | 592 | | |
589 | 593 | | |
590 | 594 | | |
| |||
0 commit comments