Comments (6)
I'm not sure about the inconsistency but I know that on version 0.4 this was changed but the documentations are still.
"•specifying -o OUTPUT_FILE.mkv will now automatically split the input video, generating a new video clip for each detected scene in sequence, starting with OUTPUT_FILE-001.mkv
•CSV file output is now specified with the -co / --csv-output option (note, used to be -o in versions of PySceneDetect < 0.4)"
source: https://github.com/Breakthrough/PySceneDetect/releases
from pyscenedetect.
Oh okay, I didn't notice that, thank you. Now the .csv file is correct but still the number of scenes if I try to use -o scene.mkv is different
from pyscenedetect.
That part works for me just fine. so I will leave it for the experts as I'm very new to all this. :) sorry
from pyscenedetect.
Hmm interesting... Using the new command-line options (-o
for the video output, -co
for the CSV output), could you provide the full output you get now? Of the scenes that are written to disk, are they cut at the appropriate place (near where the timecode in the CSV output is)?
from pyscenedetect.
Sorry for being this late, I was quite busy. Try with this video with the default configuration:
scenedetect -i video.mp4 -c scenes.csv -o out.mp4
the number of scenes is correct but their duration is different from the one described in the csv
from pyscenedetect.
Hello all;
This has been fixed in the most recent version of PySceneDetect (v0.5-beta). The stable v0.5 release should be out sometime this month.
The issue is that when just splitting videos without re-encoding, they can only be split in certain cases on keyframe boundaries. This also means that sometimes, when several scenes are very small and close together, they may be concatenated together, or not generated properly.
To fix this, I have integrated PySceneDetect v0.5 with ffmpeg
to allow re-encoding the output video. To accomplish this in v0.5, you would use the split-video
command with the -p/--precise
option:
scenedetect -i input_video.mp4 -o output_dir detect-content split-video -p
By default, split-video
will use ffmpeg
in stream copy mode, similar to how mkvmerge
works (e.g. how PySceneDetect v0.4 output scenes). If ffmpeg
is not available, PySceneDetect will then attempt to use mkvmerge
if possible; you can force the use of mkvmerge
using the -m/--mkvmerge
option with the split-video
command.
Note that you can also save thumbnail images now via the save-images
command.
scenedetect -i input_video.mp4 -o output_dir detect-content split-video -p save-images
I have just tested this on v0.5, and indeed, some output files were unreadable without either the -p
(precise/re-encode) or -m
(use mkvmerge) flags. Obviously using the -p
flag is much slower than just copying the streams, but it is significantly more accurate in terms of where the output cuts are placed. You can also override the codec options, e.g.:
scenedetect -i input_video.mp4 -o output_dir detect-content split-video -f "-c:v libx264 -c:a aac"
Feel free to test the v0.5-beta if you have a chance and provide some feedback. If you find any issues in the new version using the -p
flag, by all means, please bring it to my attention by opening a new issue.
Thank you for reporting this, and the feedback you both (@alegaballo @mohannad57) provided; feel free to share your thoughts on the new command line interface in the v0.5-beta as well.
from pyscenedetect.
Related Issues (20)
- 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
- Find start and end of black frame sequences HOT 1
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.