-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* working move to class * class and script changes * simplify script. class updates. * Dockerfile update. MR comments. * scipt improvements and comments twopass class handles streams better and returns a file size * comments and timestamp work * changes for config file timestamps * readme update
- Loading branch information
Showing
9 changed files
with
361 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"target_filesize": 8.0, | ||
"audio_br": 96, | ||
"crop": "", | ||
"resolution": "", | ||
"codec": "libx264", | ||
"times": { | ||
"from": "00:00:00", | ||
"to": "00:00:40" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
@echo off | ||
Set filename=%1 | ||
python "C:/path/to/discord.py" %filename% -o "C:/output/folder/" | ||
python "C:/path/to/ffmpeg4discord.py" %filename% -o "C:/output/folder/" | ||
DEL "ffmpeg2*" | ||
PAUSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import os | ||
from utils.arguments import get_args | ||
from twopass import TwoPass | ||
|
||
# get args from the command line | ||
args = get_args() | ||
|
||
# instantiate the TwoPass class and save our target file size for comparison in the loop | ||
twopass = TwoPass(**args) | ||
end_fs = args["target_filesize"] | ||
|
||
while twopass.run() >= end_fs: | ||
print( | ||
f"\nThe output file size ({round(twopass.output_filesize, 2)}MB) is still above the target of {end_fs}MB.\nRestarting...\n" | ||
) | ||
os.remove(twopass.output_filename) | ||
|
||
# adjust the class's target file size to set a lower bitrate for the next run | ||
twopass.target_filesize -= 0.2 | ||
|
||
print(f"\nSUCCESS!!\nThe smaller file ({round(twopass.output_filesize, 2)}MB) is located at {twopass.output_filename}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .twopass import TwoPass |
Oops, something went wrong.