Skip to content
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

Made ReadMe more noob friendly #196

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,8 @@ ENV/
.idea
*.iml
out
gen
gen

#Extra Gitnore for jumpcutter
*.mp4
.vscode
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

43 changes: 43 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
MIT License

Copyright (c) 2020 Emanvidmaker / Emanuel Acosta

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-----------------------------------------------------------------------------
MIT License

Copyright (c) 2019 carykh

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# jumpcutter
# jumpcutter
Automatically edits videos. Explanation here: https://www.youtube.com/watch?v=DQ8orIurGxw
Go here for a more polished version of this software that my friends and I have been working on for the last year or so: https://jumpcutter.com/

Expand All @@ -10,13 +10,32 @@ It works on Ubuntu 16.04 and Windows 10. (It might work on other OSs too, we jus

This program relies heavily on ffmpeg. It will start subprocesses that call ffmpeg, so be aware of that!

As the program runs, it saves every frame of the video as an image file in a
**⚠ As the program runs, it saves every frame of the video as an image file in a
temporary folder. If your video is long, this could take a LOT of space.
I have processed 17-minute videos completely fine, but be wary if you're gonna go longer.
I have processed 17-minute videos completely fine, but be wary if you're gonna go longer.**

I want to use pyinstaller to turn this into an executable, so non-techy people

I wanted to use pyinstaller to turn this into an executable, so non-techy people
can use it EVEN IF they don't have Python and all those libraries. Jabrils
recommended this to me. However, my pyinstaller build did not work. :( HELP

## Install prerequisites
Do `pip install scipy, numpy, pillow, audiotsm, pytube` to get all the dependencies.

**Make sure to install [ffmpeg codex](https://ffmpeg.org/download.html)** and to put the exe on `C:\Windows` folder (you will need admin rights to do so)

## instant jumpcut
`instantjumpcut.py` is a more user friendly version. It makes so you can run it without writing the command every time, just run it. Just remember to have the url or file name in hand.

## Example command

`python jumpcutter.py --input_file input_video.mp4 --output_file output_video.mp4 --sounded_speed 1 --silent_speed 999999 --frame_margin 2 `
This takes the file `input_video.mp4` and gives it a jumpcut effect on silent parts then saves it as output_video.mp4

Heres a fun one `python jumpcutter.py --url https://www.youtube.com/watch?v=DQ8orIurGxw --output_file output2_video.mp4 --sounded_speed 999999 --silent_speed 1 --frame_margin 2 `
it takes carykh's video about this code and keeps only the silent parts in the video

**Remember that if you need help use `python jumpcutter.py -h` it shows a more information about what each argument does.**

## Building with nix
`nix-build` to get a script with all the libraries and ffmpeg, `nix-build -A bundle` to get a single binary.
11 changes: 11 additions & 0 deletions Todo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## To Do
- [x] make pull request for the updated ReadMe
- [x] Make a py file so it can run easily without opening terminal
- [ ] Make a How long it took timer.
- [x] make it presets compatible like Jumpcut or silence only
- [x] Make An output folder
- [ ] Comment carykh's code

## Future
- [ ] make an audio separator script (pretty sure FFMpeg can do this by default)
- [ ] Make it a frontend app? (php perhaps)
32 changes: 32 additions & 0 deletions instantjumpcut.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import subprocess
loop = True
while (loop):
loop = False
mode = str(input("Pick a modes: \n\t 0) JumpCut \n\t 1) only the silence \n\t 2) Procastinator \nMode: "))
if (mode == "0"):
mode = "--sounded_speed 1 --silent_speed 999999"
elif (mode == "1"):
mode = "--sounded_speed 999999 --silent_speed 1"
elif (mode == "2"):
mode = "--sounded_speed 2 --silent_speed 8"
else:
loop = True


input_file = str(input("Input: "))

if ((input_file[0]+input_file[1]+input_file[2]+input_file[3]).lower() == 'http'):
input_file = "--url " + input_file
else:
input_file = "--input_file " + input_file


hd = str(input("HD? y/n: "))
if (hd[0].lower() == "y") or (hd[0].lower() == "0"):
hd = "1"
else:
hd = "3"

command = "python jumpcutter.py "+ input_file +" "+ mode +" --frame_margin 2 --frame_quality "+hd

subprocess.call(command, shell=True)
8 changes: 5 additions & 3 deletions jumpcutter.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import os
import argparse
from pytube import YouTube

def downloadFile(url):
name = YouTube(url).streams.first().download()
newname = name.replace(' ','_')
Expand Down Expand Up @@ -77,7 +76,10 @@ def deletePath(s): # Dangerous! Watch out!
INPUT_FILE = downloadFile(args.url)
else:
INPUT_FILE = args.input_file
URL = args.url



# URL = args.url
FRAME_QUALITY = args.frame_quality

assert INPUT_FILE != None , "why u put no input file, that dum"
Expand Down Expand Up @@ -197,7 +199,7 @@ def deletePath(s): # Dangerous! Watch out!
copyFrame(int(audioSampleCount/samplesPerFrame)-1,endGap)
'''

command = "ffmpeg -framerate "+str(frameRate)+" -i "+TEMP_FOLDER+"/newFrame%06d.jpg -i "+TEMP_FOLDER+"/audioNew.wav -strict -2 "+OUTPUT_FILE
command = "ffmpeg -framerate "+str(frameRate)+" -i "+TEMP_FOLDER+"/newFrame%06d.jpg -i "+TEMP_FOLDER+"/audioNew.wav -strict -2 Output/"+OUTPUT_FILE
subprocess.call(command, shell=True)

deletePath(TEMP_FOLDER)
Expand Down