Skip to content

Commit

Permalink
Add more logging to debug video crop issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
Layoric committed Nov 21, 2024
1 parent 9557d77 commit a6dafe9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions comfy/ai-agent-extension/ffmpeg_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,20 @@ async def transform(request):
if input_path:
files[file_type] = input_path
else:
logging.error(f'Invalid file type for {file_type}')
return web.json_response({'error': f'Invalid file type for {file_type}'}, status=400)
else:
# It's form data
form_data[part.name] = await part.text()

if not files:
logging.error('No valid files provided')
return web.json_response({'error': 'No valid files provided'}, status=400)

# Determine the base filename for output
base_filename = next((files[ft] for ft in ['video', 'audio', 'image', 'watermark'] if ft in files), None)
if not base_filename:
logging.error('No valid input file found')
return web.json_response({'error': 'No valid input file found'}, status=400)

output_filename = f"output_{os.path.basename(base_filename)}"
Expand Down

0 comments on commit a6dafe9

Please sign in to comment.