dthpham / sminterpolate

Make motion interpolated and fluid slow motion videos from the command line.
MIT License
1.38k stars 91 forks source link

Unexpected write ratio #122

Closed GodloveD closed 4 years ago

GodloveD commented 4 years ago

I've taken a bunch of photos and stitched them together in Matlab to create a stop motion video. I've created an avi that runs at 8 FPS. I'm trying to use something like butterflow for frame interpolation to see if I can get smoother animation with fewer frames.

Anyway, my input video should only have 62 frames. When I run the following I get the copied error.

$ butterflow -r 2x input.avi
[butterflow:WARNING]: Unexpected write ratio
[butterflow:WARNING]: Write ratio: 125/124, (100.81%)
Segmentation fault (core dumped)

What does that mean?

pseudosavant commented 4 years ago

I'm seeing the same 'unexepected write ratio' error with a simple 30 second clip that I remuxed (mp4 -> mp4) with ffmpeg just to be sure it wasn't the container. Here is the verbose output:

butterflow:INFO: Version 0.2.4a4 butterflow:INFO: Cache directory: c:\users\paul\appdata\local\temp\butterflow-0.2.4a4 butterflow:INFO: At least one compatible OpenCL device was detected butterflow:INFO: Using device: GeForce RTX 2070 SUPER (autoselected) butterflow:INFO: Hardware acceleration is enabled

butterflow:INFO: Sequence: Duration=0:00:22.923000 (22.92s), Frames=687, Rate=29.9700298309 butterflow:INFO: Subregion (0): Time=0:00:00-0:00:22.923000 Frames=0-686 Speed=1.0,Duration=?,Fps=? butterflow:INFO: Rendering to: kobe vs lebron.remux.21560.mp4 butterflow:INFO: Final destination: output\kvl.mp4 butterflow:INFO: [Subprocess] Opening a pipe to the video writer butterflow:INFO: Rendering progress: 0.00% butterflow:INFO: Start working on Subregion (0): Time=0:00:00-0:00:22.923000 Frames=0-686 Speed=1.0,Duration=?,Fps=? butterflow:INFO: Frames in region: 0-686 butterflow:INFO: Region length: 687 butterflow:INFO: Region duration: 22.923000s butterflow:INFO: Number of frame pairs: 686 butterflow:INFO: Interpolation rate: 2 butterflow:INFO: Time stepping: 0.333,0.667 butterflow:INFO: Frames to write: 1374 butterflow:INFO: Will interpolate: 2058 butterflow:INFO: Extra frames (to discard): 684 butterflow:INFO: Drop every: 3 butterflow:INFO: Dupe every: 0 butterflow:INFO: Ready to run: 687 times butterflow:INFO: Showing a sample of the first and last 15 runs: butterflow:INFO: To write: S0 I1,1 0.15% butterflow:INFO: To write: S1 I1,1 0.29% butterflow:INFO: To write: S2 I1,1 0.44% butterflow:INFO: To write: S3 I1,1 0.58% butterflow:INFO: To write: S4 I1,1 0.73% butterflow:INFO: To write: S5 I1,1 0.87% butterflow:INFO: To write: S6 I1,1 1.02% butterflow:INFO: To write: S7 I1,1 1.16% butterflow:INFO: To write: S8 I1,1 1.31% butterflow:INFO: To write: S9 I1,1 1.46% butterflow:INFO: To write: S10 I1,1 1.60% butterflow:INFO: To write: S11 I1,1 1.75% butterflow:INFO: To write: S12 I1,1 1.89% butterflow:INFO: To write: S13 I1,1 2.04% butterflow:INFO: To write: S14 I1,1 2.18% butterflow:INFO: To write: S15 I1,1 2.33% butterflow:INFO: <Snipping 657 runs from the console, but will update progress periodically every 65 frames rendered> butterflow:INFO: <Rendering progress: 9.46%> butterflow:INFO: <Rendering progress: 18.92%> butterflow:INFO: <Rendering progress: 28.46%> butterflow:INFO: <Rendering progress: 37.92%> butterflow:INFO: <Rendering progress: 47.38%> butterflow:INFO: <Rendering progress: 56.91%> butterflow:INFO: <Rendering progress: 66.38%> butterflow:INFO: <Rendering progress: 75.91%> butterflow:INFO: <Rendering progress: 85.37%> butterflow:INFO: <Rendering progress: 94.83%> butterflow:INFO: To write: S673 I1,1 98.33% butterflow:INFO: To write: S674 I1,1 98.47% butterflow:INFO: To write: S675 I1,1 98.62% butterflow:INFO: To write: S676 I1,1 98.76% butterflow:INFO: To write: S677 I1,1 98.91% butterflow:INFO: To write: S678 I1,1 99.05% butterflow:INFO: To write: S679 I1,1 99.20% butterflow:INFO: To write: S680 I1,1 99.34% butterflow:INFO: To write: S681 I1,1 99.49% butterflow:INFO: To write: S682 I1,1 99.64% butterflow:INFO: To write: S683 I1,1 99.78% butterflow:INFO: To write: S684 I1,1 99.93% butterflow:INFO: To write: S685 I2,0 100.15% butterflow:INFO: Run 686 (this is the final run): butterflow:INFO: To write: S686 butterflow:INFO: Done rendering Subregion (0) butterflow:INFO: [Subprocess] Closing pipe to the video writer butterflow:INFO: Rendering is finished butterflow:INFO: Moving: kobe vs lebron.remux.21560.mp4 -> output\kvl.mp4 [butterflow:WARNING]: Unexpected write ratio [butterflow:WARNING]: Write ratio: 1376/1374, (100.15%) butterflow:INFO: Final output frames: 686 source, +690 interpolated, +0 duped, -0 dropped butterflow:INFO: Output file size: 7829.78 kB (4420.24 kB) butterflow:INFO: Rendering took 1.8 mins, done.

dthpham commented 4 years ago

Unexpected write ratios happen when pre-calculated estimate of frames don't match up with the final amount, for reasons that I still have to look into. It's usually off by one or two frames so it can be safely ignored.