-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 10d391f
Showing
7 changed files
with
598 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[submodule "ffmpeg-sys"] | ||
path = ffmpeg-sys | ||
url = https://github.com/the8472/rust-ffmpeg-sys.git | ||
branch = motion-fix |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[package] | ||
name = "stitch-animation" | ||
version = "0.1.0" | ||
authors = ["The8472 <[email protected]>"] | ||
|
||
[dependencies] | ||
ffmpeg = {version = "0.2.0-alpha.2", git = "https://github.com/meh/rust-ffmpeg.git" } | ||
|
||
[replace] | ||
"ffmpeg-sys:3.2.1" = {path = "../rust-ffmpeg-sys"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# stitch-animation | ||
|
||
Linear panning detection and scene extraction using motion vectors already present in video codecs. | ||
|
||
For the moment the tool only extracts image sequences and does not align or blend them. | ||
Microsoft ICE, Gimp, Photoshop or similar are recommended to merge them. | ||
|
||
 | ||
|
||
## Dependencies | ||
|
||
* ffmpeg 1.3.x | ||
* rustc + cargo (build) | ||
|
||
## Build | ||
|
||
```sh | ||
git clone --recursive | ||
cd stitch-animation | ||
cargo build --release | ||
cp target/release/stitch-animation ~/bin | ||
## alternative, depending on your $PATH | ||
# cargo install | ||
``` | ||
|
||
## run | ||
|
||
`stitch-animation path/video name.mkv` | ||
|
||
creates image sequences in the current working directory matching the pattern `./video name.seq/*.png` | ||
|
||
|
||
|
||
## Current limitations | ||
|
||
* requires libavcodec support for exporting motion vectors (e.g. the mpeg family) | ||
* I-frames in the middle of a scene currently | ||
* any kind of non-linear motion is not actively supported. they just may happen to work anyway. this includes | ||
zoom, rotations, stops during the pan, sharp turns in the path taken by the camera. | ||
* can not be considered fully automated until it spits out decent composites with minimal artifacts | ||
|
||
|
||
## Future work | ||
|
||
* fast planar stitching (opencv? hugin?) | ||
* remove foreground objects and logos (trimmed mean over multiple layers, gradient blending, smarter frame selection) | ||
* multi-threaded PNG encoding | ||
* estimate affine transforms for global motion instead of dominant vector | ||
* detect still frames by diffing random samples | ||
* use ffmpeg's `mestimate` filter to construct vectors if none are present (would help with I-frames too) | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Submodule ffmpeg-sys
added at
90bc01
Oops, something went wrong.