cleanup and fixes
All checks were successful
Build Images and Deploy / Update-PROD-Stack (push) Successful in 1m15s
All checks were successful
Build Images and Deploy / Update-PROD-Stack (push) Successful in 1m15s
This commit is contained in:
14
app.py
14
app.py
@@ -114,6 +114,15 @@ def process_video():
|
||||
# Build filter complex for crop and scale
|
||||
filters = []
|
||||
|
||||
# Add rotation filter if specified
|
||||
rotation = data.get('rotation', 0)
|
||||
if rotation == 90:
|
||||
filters.append('transpose=1')
|
||||
elif rotation == 180:
|
||||
filters.append('transpose=2,transpose=2')
|
||||
elif rotation == 270:
|
||||
filters.append('transpose=2')
|
||||
|
||||
# Add crop filter if specified
|
||||
crop = data.get('crop')
|
||||
if crop:
|
||||
@@ -136,6 +145,11 @@ def process_video():
|
||||
if filters:
|
||||
cmd.extend(['-vf', ','.join(filters)])
|
||||
|
||||
# Handle audio
|
||||
mute_audio = data.get('mute_audio', False)
|
||||
if mute_audio:
|
||||
cmd.extend(['-an']) # Remove audio
|
||||
|
||||
# Output settings for H.264 MP4
|
||||
cmd.extend([
|
||||
'-c:v', 'libx264',
|
||||
|
||||
Reference in New Issue
Block a user