Comments (6)
Hey @rhefner1;
One last update for you, I managed to integrate calling mkvmerge into the latest version of PySceneDetect (v0.4), so now when the -o
option is specified, the input video will be split into individual scenes (albeit as .mkv format).
from pyscenedetect.
Hi @rhefner1;
I've been meaning to add this to PySceneDetect for a while, but the OpenCV video encoding options are rather limited (only letting you select a codec, and nothing else, not even bitrate).
One quick tool you can use for this is mkvmerge (or mkvtoolnix-gui), and copy/paste the comma-separated timecodes into the file splitting section. This doesn't reencode the video, just re-muxes it. The section of the mkvmerge docs is here that covers using the --split
flag:
mkvmerge -o output_scene.mkv --split timecodes:00:45:00.000,01:20:00.250,[...] input_file.avi
For ffmpeg, there's command line flags to set the start/end/duration of the input, copying the video container. This should achieve the same results as using mkvtoolnix, although I think you would have to make a call to ffmpeg for each scene you wanted to extract from the input file.
I'll look into adding support for integrated clip splitting by calling mkvmerge/ffmpeg directly from PySceneDetect, and I'll also work on a short tutorial/guide on splitting a video via timecodes to that page you pointed out.
Thanks for the comment & feedback, let me know what method you find works the best.
from pyscenedetect.
@Breakthrough: I just did a test with both mkvmerge with the command you provided and mkvtoolnix-gui and both worked perfectly!
I'm splitting up some home movies and a few years ago had tried doing it manually but gave up. All I have to do here is write a little Bash script and it's done. Thanks for the help and the great tool!
from pyscenedetect.
@rhefner1 glad you're finding it useful, that reminds me I have some older home video footage I need to apply this to myself.
Thanks again for your feedback, I've updated that particular section of the documentation (if you think this should be mentioned anywhere else, feel free to let me know).
from pyscenedetect.
👍 thanks!
from pyscenedetect.
@Breakthrough that's fantastic. Thanks for your work!
from pyscenedetect.
Related Issues (20)
- Inconsistent error handling when start time exceeds video length
- url input ,1080p video much slower HOT 8
- Use csv as input for scene splitting HOT 1
- No output to list-scenes HOT 3
- horizontal wipe cuts
- ffmpeg segment_times options HOT 4
- QP file output HOT 6
- Can't get save_images to work HOT 1
- 'Error splitting video (ffmpeg returned 1) ' occurs while using 'split_video_ffmpeg' HOT 11
- Define minimum and maximum number of splits in split-video HOT 1
- Extend image_name_template to allow timestamp HOT 1
- Add Project Gallery to Website
- CITATION.cff file for citing repository HOT 1
- Return SyntaxWarning errors HOT 2
- Remove downscaling for perceptual hash
- Support histograms/hashes with AdaptiveDetector
- Group similar scenes together HOT 3
- The speed at which different backends run. HOT 2
- Two-Phase Command Architecture
- `min_scene_len` parameter isn't respected with AdaptiveDetector HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyscenedetect.