ismdrobiul489 commited on
Commit
59cf51d
·
1 Parent(s): c060ff8

Use working ImageMagick fix, TheBoldFont, 70% caption position, add captions to story_reels

Browse files
Dockerfile CHANGED
@@ -12,9 +12,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
12
  fonts-dejavu-core \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
- # Fix ImageMagick security policy for MoviePy TextClip
16
- RUN sed -i 's/rights="none" pattern="@\*"/rights="read|write" pattern="@*"/' /etc/ImageMagick-6/policy.xml || true
17
- RUN sed -i 's/<policy domain="path" rights="none" pattern="@\*"/<policy domain="path" rights="read|write" pattern="@*"/' /etc/ImageMagick-6/policy.xml || true
18
 
19
  RUN useradd -m -u 1000 user
20
  USER user
 
12
  fonts-dejavu-core \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
+ # Fix ImageMagick policy to allow text rendering
16
+ # Use find to locate policy.xml as the path varies by version
17
+ RUN find /etc -name "policy.xml" -exec sed -i 's/none/read,write/g' {} +
18
 
19
  RUN useradd -m -u 1000 user
20
  USER user
modules/story_reels/services/story_creator.py CHANGED
@@ -582,7 +582,7 @@ class StoryCreator:
582
  font_name = "DejaVu-Sans-Bold"
583
 
584
  caption_clips = []
585
- y_pos = TARGET_HEIGHT * 0.75 # 75% down (bottom area)
586
 
587
  for cap in captions:
588
  start_time = cap.get("startMs", 0) / 1000
 
582
  font_name = "DejaVu-Sans-Bold"
583
 
584
  caption_clips = []
585
+ y_pos = TARGET_HEIGHT * 0.70 # 70% down (bottom area)
586
 
587
  for cap in captions:
588
  start_time = cap.get("startMs", 0) / 1000