GMU:Procedural Cut/Assignment Sequence: Difference between revisions

From Medien Wiki
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 2: Line 2:


# 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. (You need to install Python)
# 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 ffmpeg to extract all the scenes as individual clips <code>ffmpeg -i goldeneye.mp4 -ss 00:00:00.000 -t 00:00:03.754 -c copy part1.mp4</code>
# reattach the clips in a different order with ffmpeg:
# reattach the clips in a different order with ffmpeg <code>ffmpeg -i "concat:part3.mp4|part1.mp4|part2.mp4" -c copy output.mp4</code>
# make a playlist file with the content:
    # concatenate the following clips together
    file 'goldeneye-Scene-008.mp4'
    file 'goldeneye-Scene-005.mp4'
    file 'goldeneye-Scene-018.mp4'
5. 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
Line 14: Line 19:


=== Result ===
=== Result ===
* [[File:mDoinap.mp4]]
[[File:mDoinap.mp4]]

Latest revision as of 09:40, 18 November 2019

Let's get started with python and ffmpeg

  1. Pick and download a video with a lot of edits. New coverage is good.
  2. 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
  3. reattach the clips in a different order with ffmpeg:
  4. make a playlist file with the content:
   # concatenate the following clips together
   file 'goldeneye-Scene-008.mp4'
   file 'goldeneye-Scene-005.mp4'
   file 'goldeneye-Scene-018.mp4'

5. run ffmpeg ffmpeg -f concat -safe 0 -i playlist.txt -c copy output.mp4

Bonus learn some python to further automate the process

Keno

Code

Result