Skip to content

Commit

Permalink
confirmed constant rate factor and preset options work with unset value.
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue committed May 18, 2021
1 parent 07bebcb commit a983b8b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion auto_editor/levels.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def levels(inputs: list, track, outfile, ffmpeg, ffprobe, temp, log):
ffmpeg.run(['-i', file, '-ac', '2', '-map', f'0:a:{t}',
os.path.join(temp, f'{t}.wav')])

sampleRate, audioData = read(os.path.join(temp, f'0.wav'))
sampleRate, audioData = read(os.path.join(temp, '0.wav'))
audioSampleCount = audioData.shape[0]

def getMaxVolume(s: np.ndarray) -> float:
Expand Down
6 changes: 3 additions & 3 deletions auto_editor/testAutoEditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def testAutoEditor():
[ffprobe.getSampleRate, '48000'],
)

runTest(['example.mp4', 'exportMediaOps', '-vcodec', 'uncompressed', '--show_ffmpeg_debug'])
runTest(['example.mp4', '--video_codec', 'uncompressed', '--show_ffmpeg_debug'])
fullInspect(
'example_ALTERED.mp4',
[ffprobe.getFrameRate, 30.0],
Expand Down Expand Up @@ -290,8 +290,8 @@ def testAutoEditor():
runTest([item, '--export_as_clip_sequence'])
runTest([item, '--preview'])

runTest(['example.mp4', 'exportMediaOps', '-vcodec', 'h264', '--preset', 'faster'])
runTest(['example.mp4', 'exportMediaOps', '--audio_codec', 'ac3'])
runTest(['example.mp4', '--video_codec', 'h264', '--preset', 'faster'])
runTest(['example.mp4', '--audio_codec', 'ac3'])
runTest(['resources/newCommentary.mp3', 'exportMediaOps', '-acodec', 'pcm_s16le'])

runTest(['example.mp4', '--mark_as_silent', '0,171', '-o', 'hmm.mp4'])
Expand Down
4 changes: 1 addition & 3 deletions auto_editor/usefulFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,11 @@ def __init__(self, total, title='Please wait', machineReadable=False, hide=False
except FileNotFoundError:
pass

newTime = prettyTime(self.beginTime, self.ampm)
termsize = get_terminal_size().columns

self.allow_unicode = True
try:
self.tick(0)
except UnicodeEncodeError:
newTime = prettyTime(self.beginTime, self.ampm)
print(f' 0% done ETA {newTime}')
self.allow_unicode = False

Expand Down

0 comments on commit a983b8b

Please sign in to comment.