You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be very useful to have an on_end event handler on video.add_text to intercept when text goes out of the screen (with speed >0).
This is useful in particular when cycle=false so we can programmatically change text when one line of text ends.
Note that we can't achieve the same result with very long text and cycle=true because liquidsoap throws exception when it has to deal with text bigger than 1k chars (more or less).
The exception thrown is the following:
22/09/14 20:37:13 [clock.main:4] Source output.url failed while streaming: Failure("FT_Load_Char")!
2022/09/14 20:37:13 [clock.main:4] Raised by primitive operation at Ftlow.render_char in file "freetype/ftlow.ml", line 144, characters 2-60
2022/09/14 20:37:13 [clock.main:4] Called from Freetype.render_char in file "freetype/freetype.ml", line 108, characters 4-56
2022/09/14 20:37:13 [clock.main:4] Called from OFreetype.draw_gen in file "freetype/oFreetype.ml", line 71, characters 21-59
2022/09/14 20:37:13 [clock.main:4] Called from Video_text_camlimages.render_text in file "decoder/text/video_text_camlimages.ml", line 49, characters 4-215
2022/09/14 20:37:13 [clock.main:4] Called from Video_text.text#render_text in file "sources/video_text.ml", line 36, characters 33-74
2022/09/14 20:37:13 [clock.main:4] Called from Video_text.text#synthesize in file "sources/video_text.ml", line 61, characters 8-33
2022/09/14 20:37:13 [clock.main:4] Called from Synthesized.source#get_frame in file "sources/synthesized.ml", line 59, characters 8-37
2022/09/14 20:37:13 [clock.main:4] Called from Source.operator#instrumented_get_frame in file "source.ml", line 589, characters 6-24
2022/09/14 20:37:13 [clock.main:4] Called from Source.operator#get in file "source.ml", line 660, characters 10-41
2022/09/14 20:37:13 [clock.main:4] Called from VFrame.get_content in file "stream/vFrame.ml", line 45, characters 4-20
2022/09/14 20:37:13 [clock.main:4] Called from Video_effects.base#get_frame in file "operators/video_effects.ml", line 37, characters 12-41
2022/09/14 20:37:13 [clock.main:4] Called from Source.operator#instrumented_get_frame in file "source.ml", line 589, characters 6-24
2022/09/14 20:37:13 [clock.main:4] Called from Source.operator#get in file "source.ml", line 660, characters 10-41
2022/09/14 20:37:13 [clock.main:4] Called from Available.available#get_frame in file "operators/available.ml", line 40, characters 6-20
2022/09/14 20:37:13 [clock.main:4] Called from Source.operator#instrumented_get_frame in file "source.ml", line 589, characters 6-24
2022/09/14 20:37:13 [clock.main:4] Called from Source.operator#get in file "source.ml", line 660, characters 10-41
2022/09/14 20:37:13 [clock.main:4] Called from Add.add#get_frame.(fun) in file "operators/add.ml", line 119, characters 12-24
2022/09/14 20:37:13 [clock.main:4] Called from Stdlib__List.fold_left in file "list.ml", line 121, characters 24-34
2022/09/14 20:37:13 [clock.main:4] Called from Add.add#get_frame in file "operators/add.ml", line 108, characters 8-1023
2022/09/14 20:37:13 [clock.main:4] Called from Source.operator#instrumented_get_frame in file "source.ml", line 589, characters 6-24
2022/09/14 20:37:13 [clock.main:4] Called from Source.operator#get in file "source.ml", line 660, characters 10-41
2022/09/14 20:37:13 [clock.main:4] Called from Add.add#get_frame.(fun) in file "operators/add.ml", line 119, characters 12-24
2022/09/14 20:37:13 [clock.main:4] Called from Stdlib__List.fold_left in file "list.ml", line 121, characters 24-34
2022/09/14 20:37:13 [clock.main:4] Called from Add.add#get_frame in file "operators/add.ml", line 108, characters 8-1023
2022/09/14 20:37:13 [clock.main:4] Called from Source.operator#instrumented_get_frame in file "source.ml", line 589, characters 6-24
2022/09/14 20:37:13 [clock.main:4] Called from Source.operator#get in file "source.ml", line 660, characters 10-41
2022/09/14 20:37:13 [clock.main:4] Called from Add.add#get_frame.(fun) in file "operators/add.ml", line 119, characters 12-24
2022/09/14 20:37:13 [clock.main:4] Called from Stdlib__List.fold_left in file "list.ml", line 121, characters 24-34
2022/09/14 20:37:13 [clock.main:4] Called from Add.add#get_frame in file "operators/add.ml", line 108, characters 8-1023
2022/09/14 20:37:13 [clock.main:4] Called from Source.operator#instrumented_get_frame in file "source.ml", line 589, characters 6-24
2022/09/14 20:37:13 [clock.main:4] Called from Source.operator#get in file "source.ml", line 660, characters 10-41
2022/09/14 20:37:13 [clock.main:4] Called from Switch.switch#get_frame in file "operators/switch.ml", line 254, characters 14-39
2022/09/14 20:37:13 [clock.main:4] Called from Source.operator#instrumented_get_frame in file "source.ml", line 589, characters 6-24
2022/09/14 20:37:13 [clock.main:4] Called from Source.operator#get in file "source.ml", line 660, characters 10-41
2022/09/14 20:37:13 [clock.main:4] Called from Output.output#output in file "outputs/output.ml", line 166, characters 10-30
But in my opinion this is correct and this is type of issue shouldn't be solved increase text buffer but using different strategies such as on_end event handler.
Alternatively we could have an on_scroll event (where x is passed) to use to change things when a particular x value is reached.
The text was updated successfully, but these errors were encountered:
I have just added an on_cycle option to register a handler when cycling. However it will only work when cycle=true is activated. When this is not the case, see my answer to #2622.
It would be very useful to have an
on_end
event handler onvideo.add_text
to intercept when text goes out of the screen (withspeed
>0).This is useful in particular when
cycle=false
so we can programmatically change text when one line of text ends.Note that we can't achieve the same result with very long text and
cycle=true
because liquidsoap throws exception when it has to deal with text bigger than 1k chars (more or less).The exception thrown is the following:
But in my opinion this is correct and this is type of issue shouldn't be solved increase text buffer but using different strategies such as on_end event handler.
Alternatively we could have an on_scroll event (where x is passed) to use to change things when a particular x value is reached.
The text was updated successfully, but these errors were encountered: