| No edit summary | No edit summary | ||
| Line 3: | Line 3: | ||
| # Pick and download a video with a lot of edits. New coverage is good. | # Pick and download a video with a lot of edits. New coverage is good. | ||
| # use the PySceneDetect tool (link on main page) to detect the scenes and extract them. (You need to install Python and ffmpeg) <code>scenedetect -i goldeneye.mp4 -o output_dir detect-content -t 27 list-scenes split-video</code> | # use the PySceneDetect tool (link on main page) to detect the scenes and extract them. (You need to install Python and ffmpeg) <code>scenedetect -i goldeneye.mp4 -o output_dir detect-content -t 27 list-scenes split-video</code> | ||
| # reattach the clips in a different order with ffmpeg <code>ffmpeg -i  | # reattach the clips in a different order with ffmpeg   | ||
| ## make a playlist file  | |||
|     # concatenate the following clips together | |||
|     file 'goldeneye-Scene-008.mp4' | |||
|     file 'goldeneye-Scene-005.mp4' | |||
|     file 'goldeneye-Scene-018.mp4'</code> | |||
| ## run ffmpeg <code>ffmpeg -f concat -safe 0 -i playlist.txt -c copy output.mp4</code> | |||
| Bonus learn some python to further automate the process | Bonus learn some python to further automate the process | ||
Revision as of 09:38, 18 November 2019
Let's get started with python and ffmpeg
- Pick and download a video with a lot of edits. New coverage is good.
- use the PySceneDetect tool (link on main page) to detect the scenes and extract them. (You need to install Python and ffmpeg) scenedetect -i goldeneye.mp4 -o output_dir detect-content -t 27 list-scenes split-video
- reattach the clips in a different order with ffmpeg
- make a playlist file
 
# concatenate the following clips together file 'goldeneye-Scene-008.mp4' file 'goldeneye-Scene-005.mp4' file 'goldeneye-Scene-018.mp4'
- run ffmpeg ffmpeg -f concat -safe 0 -i playlist.txt -c copy output.mp4
 
- run ffmpeg 
Bonus learn some python to further automate the process
Keno
Code
Result
