-
Notifications
You must be signed in to change notification settings - Fork 414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't parse CSV file based on detect-threshold when splitting video. #211
Comments
Hey @jeremymeyers; Indeed, the scene CSVs generated by The The statsfile format was updated in the latest release, but should include backwards compatibility, so that error you're seeing may be an issue. Lastly, note that Thanks! |
So my current workflow is based around large files (1-2gb usually) with collections of around 5-6 short-ish mini-movies that end in cuts to black (usually). I am using scenedect to split the one large file into 5-6 individual files. I'm not using it to split out at a more granular level. How i have been doing it is to do a detect-threshold list-scenes to determine whether scenedetect has accurately identified the number of scenes and therefore will split correctly (ive found that detect-content lands me with a much longer list of shorter clips, as by design). If it has the correct number (plus or minus a few extra blips in between where it found title sequences or whatever) then i will run it again with split-video. As you can imagine, I would really love a way to not have to scan through the whole movie twice every time, so I though that i might be able to use the scenes.csv that it generates to split it accordingly. I suppose i could feed it into ffmpeg/mkvmerge directly, but it just seemed like there should be a workflow that accounted for this. In terms of the documentation i think it would be useful to just note that using the -s flag and using stats files generally only applies when detect-content is used. I will add the file info shortly. |
Indeed the first row of the file outputted from That being said, you are correct, this use case is definitely supposed to work with PySceneDetect. This will be supported properly when #178 is closed. I'll see if I can squeeze that in for the v0.5.6 release, but in the meantime, hopefully the workaround by using the .csv from |
Awesome, thank you Brandon! |
This should be resolved now in the v0.5.6 branch, will be available in the next official release. I also removed the Thanks for the report! |
What is the syntax for this? |
As in your original post, this should now just work:
|
Trying to figure out why i can't use the csv file generated to splti video without having to re-scan. Are scene csv files different from stats csv files? The documentation is unclear.
Procedure:
scenedetect --input "file.mp4" detect-threshold list-scenes
(this works fine)
scenedetect --input "file.mp4" -s file-stats.csv" detect-threshold split-scenes
error:
[PySceneDetect] PySceneDetect v0.5.5
[PySceneDetect] Loaded 1 video, framerate: 29.97 FPS, resolution: 1920 x 1080
[PySceneDetect] Downscale factor set to 6, effective resolution: 320 x 180
[PySceneDetect] Loading frame metrics from stats file: scenes.csv
[PySceneDetect] Could not load stats file.
Failed to parse stats file:
Could not load frame metrics from stats file - file is corrupt or not a valid PySceneDetect stats file. If the file exists, ensure that it is a valid stats file CSV, otherwise delete it and run PySceneDetect again to re-generate the stats file.
[PySceneDetect] Could not parse CLI options.:
Could not load given stats file, see above output for details.
The text was updated successfully, but these errors were encountered: