mirror of
https://github.com/pacnpal/Pac-cogs.git
synced 2025-12-20 10:51:05 -05:00
refactor: Clean up encoder_params module
- Improved parameter organization - Better error handling and logging - More consistent code style - Added detailed comments for parameter choices
This commit is contained in:
@@ -95,7 +95,7 @@ class EncoderParams:
|
|||||||
params = {}
|
params = {}
|
||||||
try:
|
try:
|
||||||
duration = video_info.get("duration", 0)
|
duration = video_info.get("duration", 0)
|
||||||
input_size = video_info.get("bitrate", 0) * duration / 8 # Estimate from bitrate if size not available
|
input_size = video_info.get("bitrate", 0) * duration / 8 # Estimate from bitrate
|
||||||
|
|
||||||
if duration > 0 and input_size > target_size_bytes:
|
if duration > 0 and input_size > target_size_bytes:
|
||||||
video_size_target = int(target_size_bytes * 0.95)
|
video_size_target = int(target_size_bytes * 0.95)
|
||||||
|
|||||||
Reference in New Issue
Block a user