Skip to content

Commit 9772aba

Browse files
committed
Partially reverted "Fixed high resolution video messages not being converted to video notes"
Partially reverted from commit da153e7.
1 parent b9606be commit 9772aba

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/constants.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818
AUDIO_CODEC_NAMES = ['aac', 'mp3']
1919

2020
VIDEO_CODEC_NAMES = ['h264', 'hevc', 'mpeg4', 'vp6', 'vp8']
21-
VIDEO_NOTE_CROP_HORIZONTAL_OFFSET_PARAMS = 'abs(in_w - min(min(in_w, in_h), {})) / 2'.format(MAX_VIDEO_NOTE_SIZE)
22-
VIDEO_NOTE_CROP_VERTICAL_OFFSET_PARAMS = 'abs(in_h - min(min(in_w, in_h), {})) / 2'.format(MAX_VIDEO_NOTE_SIZE)
23-
VIDEO_NOTE_CROP_SIZE_PARAMS = 'min(min(in_w, in_h), {})'.format(MAX_VIDEO_NOTE_SIZE)
21+
VIDEO_NOTE_CROP_OFFSET_PARAMS = 'abs(in_w - in_h) / 2'
22+
VIDEO_NOTE_CROP_SIZE_PARAMS = 'min(in_w, in_h)'
2423

2524

2625
class OutputType:

src/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ def convert(output_type: str, input_video_url: typing.Optional[str] = None, inpu
171171
ffmpeg_input
172172
.video
173173
.crop(
174-
constants.VIDEO_NOTE_CROP_HORIZONTAL_OFFSET_PARAMS,
175-
constants.VIDEO_NOTE_CROP_VERTICAL_OFFSET_PARAMS,
174+
constants.VIDEO_NOTE_CROP_OFFSET_PARAMS,
175+
constants.VIDEO_NOTE_CROP_OFFSET_PARAMS,
176176
constants.VIDEO_NOTE_CROP_SIZE_PARAMS,
177177
constants.VIDEO_NOTE_CROP_SIZE_PARAMS
178178
)

0 commit comments

Comments
 (0)