Skip to content

Commit e235d87

Browse files
committed
Remove target MB smear
1 parent 891dfc8 commit e235d87

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

clip.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,7 @@ VIDEO_RAW_OUTPUT=clip_raw.mkv
346346
VIDEO_OUTPUT=$_arg_output
347347
# Target an appropiate bitrate of filesize of 8MB for the video length
348348
TARGET_MB=$_arg_target_mb
349-
# Subtract a few megabyte to give some leeway for uploader limits
350-
TARGET_BYTES=$((($TARGET_MB - 5) * 1024 * 1024))
349+
TARGET_BYTES=$((($TARGET_MB) * 1024 * 1024))
351350
TARGET_BITRATE=$(($TARGET_BYTES * 8 / $RECORDING_LENGTH))
352351
TARGET_BITRATE_PLUS_SMEAR=$(($TARGET_BYTES * 8 / $RECORDING_LENGTH_PLUS_SMEAR))
353352
VNC_PORT=$_arg_vnc

ffmpeg_clip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def make_ffmpeg_clip(
4242
route_date = re.sub(r"^[^|]+\|", "", route)
4343

4444
# Target bitrate in bits per second (bps). Try to get close to the target file size.
45-
target_bps = (target_mb - 5) * 8 * 1024 * 1024 // length_seconds
45+
target_bps = (target_mb) * 8 * 1024 * 1024 // length_seconds
4646
# Start seconds relative to the start of the concatenated video
4747
start_seconds_relative = start_seconds % 60
4848

0 commit comments

Comments
 (0)