lettier / gifcurry

😎 The open-source, Haskell-built video editor for GIF makers.
https://lettier.github.io/gifcurry
BSD 3-Clause "New" or "Revised" License
1.34k stars 54 forks source link

Subtitles not showing #64

Closed Forage closed 3 years ago

Forage commented 3 years ago

Hi,

With the prebuild 6.0.1.0 release subtitles do not appear to be working. I tried a YAML as well as a SRT file, with no success.

abo@ABO-TP:~/Downloads/Linux/gifcurry-linux-6.0.1.0/bin$ ./gifcurry_cli -i ~/Videos/videoplayback.webm -t ~/Videos/subtitles2.yaml -o test -s 183 -e 194 -w 800

         ▄▄▄▄▄▄▄▄                                                                             
     ▄▄████    ▀▀███▄                                                                         
      ████▀   ▄    ▀███           ▄     ▐██▌   ▄███▄                                          
  ▄   ▐███   ████   ▀███      ▄███▀▀██        ███                                             
 ▐█▌   ██   ▐███     ████    ███        ▐██  █████▌ ▄█████ ▐██▌  ██▌  ██▄██▌ ██▄██▌ ██▌   ███ 
 ███   ▐▌   ███      ▐███▌   ███  ████▌ ▐██   ██▌  ███     ▐██▌  ██▌  ███▀   ███▀   ▐██  ███  
 ████      ███▀  ▐█   ███▌   ███    ██▌ ▐██   ██▌  ███     ▐██▌  ██▌  ██▌    ██▌     ██▌▐██   
 ▐███▄    ▐██▌   ██    ██     ███▄▄▄██▌ ▐██   ██▌   ███▄▄█  ███▄███▌  ██▌    ██▌      ████▌   
  ▀███   ▀███   ▐███   ▀        ▀▀▀▀▀    ▀▀   ▀▀      ▀▀▀     ▀▀▀     ▀▀     ▀▀        ███    
    ███▄   ▀    ████▌                                                                ███▀     
      ▀███▄▄   █████▀                                                                         
          ▀▀▀▀▀▀▀                                                                             

Gifcurry 6.0.1.0
(C) 2016 David Lettier
https://lettier.com

Wanna help out Gifcurry? Star it on GitHub! ☺  Thanks for helping out—you rock!
https://github.com/lettier/gifcurry/stargazers

[INFO] Here are your settings.

  - FILE IO:
    - Input File:    /home/abo/Videos/videoplayback.webm
    - Output File:   test.gif
    - Save As Video: No
  - TIME:
    - Start Second: 183.000
    - End   Second: 194.000
  - OUTPUT FILE SIZE:
    - Width:       800px
    - FPS:         24
    - Color Count: 256
    - Dither:      False
  - TEXT:
    - Text: Ha!
      - Font:
        - Family:  Sans
        - Size:    10
        - Style:   Oblique
        - Stretch: Normal
        - Weight:  30
      - Time:
        - Start Second: 5.000
        - End   Second: 6.000
      - Translation:
        - Origin: Center
        - X:      0.0
        - Y:      0.0
      - Rotation:
        - Degrees: 20
      - Outline:
        - Size:  7
        - Color: rgba(1,100,10,1.0)
      - Fill:
        - Color: rgba(255,255,0,0.0)
    - Text: Ha!
      - Font:
        - Family:  Sans
        - Size:    10
        - Style:   Normal
        - Stretch: Normal
        - Weight:  400
      - Time:
        - Start Second: 7.000
        - End   Second: 8.000
      - Translation:
        - Origin: South
        - X:      0.0
        - Y:      0.0
      - Rotation:
        - Degrees: 0
      - Outline:
        - Size:  10
        - Color: rgba(0,0,0,1.0)
      - Fill:
        - Color: rgba(255,255,255,1.0)
    - Text: Ha!
      - Font:
        - Family:  Sans
        - Size:    10
        - Style:   Normal
        - Stretch: Normal
        - Weight:  400
      - Time:
        - Start Second: 9.000
        - End   Second: 10.000
      - Translation:
        - Origin: South
        - X:      0.0
        - Y:      0.0
      - Rotation:
        - Degrees: 0
      - Outline:
        - Size:  10
        - Color: rgba(0,0,0,1.0)
      - Fill:
        - Color: rgba(255,255,255,1.0)
  - CROP:
    - Left:   0.000
    - Right:  0.000
    - Top:    0.000
    - Bottom: 0.000

[INFO] Writing the temporary frames to: /home/abo/.cache/gifcurry/gifcurry-frames347581
[INFO] Adding text.
[INFO] Saving your GIF to: test.gif
[INFO] All done.

There's simply no text showing in the output GIF.

When using a SRT file I also noticed the Y text translation defaulting to "-5.0e-2", is that really correct?

Using gifcurry 6.0.1.0 on Ubuntu 20.10.

Forage commented 3 years ago

Problem found. The timing of the subtitles is relative to the input file, not the output file. Not what I expected. So if you cut your input file from 5 to 10 seconds and you want to see a subtitle on the third second of the output file you need it to start showing on 8. Should this really be the case?