Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTL text gets reversed in video #4295

Open
gAlleb opened this issue Jan 2, 2025 · 10 comments
Open

RTL text gets reversed in video #4295

gAlleb opened this issue Jan 2, 2025 · 10 comments
Labels

Comments

@gAlleb
Copy link
Contributor

gAlleb commented Jan 2, 2025

Description

RTL text gets reversed in video

e.g. Input: "מוּסִיקָה". Video result: הקָיסִוּמ

Steps to reproduce

radio = sine()
# https://fonts.google.com/specimen/Heebo
rtl_font = "./Heebo/static/Heebo-Light.ttf"

show_text = "מוּסִיקָה"

# Printed txt shows correctly
print(show_text)

videostream = single("./Loop.mp4")

videostream = video.add_text(color=0xFFFFFF, font=rtl_font, speed=0, x=340, y=340, size=50, show_text, videostream)

videostream = source.mux.video(video=videostream, radio)

# Output to YouTube
enc = %ffmpeg(
    format="mpegts", 
    %video(codec="libx264", pixel_format="yuv420p", b="300k", preset="superfast", r=5, g=10),
    %audio(
        codec="aac",
        samplerate=44100,
        channels=2,
        b="96k",
        profile="aac_low"
    )
)

output.icecast(fallible=true, videostream)

or

radio = sine()
# https://fonts.google.com/specimen/Heebo
rtl_font = "./Heebo/static/Heebo-Light.ttf"

# file with text: מוּסִיקָה
nowplaying_txt = "./nowplaying.txt"

videostream = single("./Loop.mp4")

def add_nowplaying_text(s) =
  def mkfilter(graph)
    let {video = video_track} = source.tracks(s)
    video_track = ffmpeg.filter.video.input(graph, video_track)
    video_track = ffmpeg.filter.drawtext(fontfile=rtl_font,fontsize="50",x= "340",y="340",fontcolor="white",textfile=nowplaying_txt,reload=5,graph,video_track)
    video_track = ffmpeg.filter.video.output(graph, video_track)
    source({
      video = video_track
    })
  end

  ffmpeg.filter.create(mkfilter)
end

videostream = add_nowplaying_text(videostream)

videostream = source.mux.video(video=videostream, radio)

# Output to YouTube
enc = %ffmpeg(
    format="mpegts", 
    %video.raw(codec="libx264", pixel_format="yuv420p", b="300k", preset="superfast", r=5, g=10),
    %audio(
        codec="aac",
        samplerate=44100,
        channels=2,
        b="96k",
        profile="aac_low"
    )
)

output.icecast(fallible=true, videostream)

Expected behavior

Liquidsoap version

Liquidsoap 2.3.x every build

Liquidsoap build config

* Liquidsoap version  : rolling-release-v2.3.x-48-g5cb4ad6+dev

 * Compilation options
   - Release build       : false
   - Git SHA             : (none)
   - OCaml version       : 4.14.2
   - OS type             : Unix
   - Libs versions       : angstrom=0.16.1 ao=0.2.4 base=v0.16.3 base.base_internalhash_types=v0.16.3 base.caml=v0.16.3 base.shadow_stdlib=v0.16.3 bigarray=[distributed with Ocaml] bigarray-compat=1.1.0 bigstringaf=0.10.0 bytes=[distributed with OCaml 4.02 or above] camlp-streams camomile.lib=2.0 cry=1.0.3 ctypes=0.23.0 ctypes-foreign=0.23.0 curl=0.9.2 domain_shims dtools=0.4.5 dune-build-info=3.17.0 dune-private-libs.dune-section=3.17.0 dune-site=3.17.0 dune-site.private=3.17.0 duppy=0.9.4 ffmpeg-av=1.2.1 ffmpeg-avcodec=1.2.1 ffmpeg-avdevice=1.2.1 ffmpeg-avfilter=1.2.1 ffmpeg-avutil=1.2.1 ffmpeg-swresample=1.2.1 ffmpeg-swscale=1.2.1 fileutils=0.6.4 gen=1.1 integers lame=0.3.7 liquidsoap-lang=rolling-release-v2.3.x-48-g5cb4ad6 liquidsoap-lang.console=rolling-release-v2.3.x-48-g5cb4ad6 liquidsoap_ao=rolling-release-v2.3.x-48-g5cb4ad6-dirty liquidsoap_builtins=rolling-release-v2.3.x-48-g5cb4ad6-dirty liquidsoap_core=rolling-release-v2.3.x-48-g5cb4ad6-dirty liquidsoap_ffmpeg=rolling-release-v2.3.x-48-g5cb4ad6-dirty liquidsoap_lame=rolling-release-v2.3.x-48-g5cb4ad6-dirty liquidsoap_ndi=rolling-release-v2.3.x-48-g5cb4ad6-dirty liquidsoap_optionals=rolling-release-v2.3.x-48-g5cb4ad6-dirty liquidsoap_portaudio=rolling-release-v2.3.x-48-g5cb4ad6-dirty liquidsoap_runtime=rolling-release-v2.3.x-48-g5cb4ad6-dirty liquidsoap_sdl=rolling-release-v2.3.x-48-g5cb4ad6-dirty liquidsoap_sdl_log_level=rolling-release-v2.3.x-48-g5cb4ad6-dirty liquidsoap_stereotool=rolling-release-v2.3.x-48-g5cb4ad6-dirty liquidsoap_xmlplaylist=rolling-release-v2.3.x-48-g5cb4ad6-dirty magic-mime=1.3.1 mem_usage=0.1.1 menhirLib=20240715 metadata=0.3.0 mm=0.8.6 mm.audio=0.8.6 mm.base=0.8.6 mm.image=0.8.6 mm.midi=0.8.6 mm.video=0.8.6 ndi=rolling-release-v2.3.x-48-g5cb4ad6-dirty portaudio=0.2.3 ppx_compare.runtime-lib=v0.16.0 ppx_hash.runtime-lib=v0.16.0 ppx_sexp_conv.runtime-lib=v0.16.0 re=1.12.0 saturn_lockfree=0.4.1 sedlex=3.3 seq=[distributed with OCaml 4.07 or above] sexplib0=v0.16.0 stdlib-shims=0.3.0 stereotool=rolling-release-v2.3.x-48-g5cb4ad6-dirty str=[distributed with Ocaml] stringext=1.6.0 threads=[distributed with Ocaml] threads.posix=[internal] tsdl=v1.1.0 tsdl-image=0.5 tsdl-ttf=0.6 unix=[distributed with Ocaml] uri=4.4.0 xml-light=2.5 xmlm=1.4.0 xmlplaylist=0.1.5
   - architecture        : amd64
   - host                : x86_64-apple-darwin22.6.0
   - target              : x86_64-apple-darwin22.6.0
   - system              : macosx
   - ocamlopt_cflags     : -O2 -fno-strict-aliasing -fwrapv -pthread
   - native_c_compiler   : cc -O2 -fno-strict-aliasing -fwrapv -pthread -D_FILE_OFFSET_BITS=64
   - native_c_libraries  : -lm

 * Configured paths
   - mode              : default
   - standard library  : (set by dune-site)
   - scripted binaries : (set by dune-site)
   - rundir            : (set by dune-site)
   - logdir            : (set by dune-site)
   - user cache        : $HOME/.cache/liquidsoap (override with $LIQ_CACHE_USER_DIR)
   - system cache      : (set by dune-site) (override with $LIQ_CACHE_SYSTEM_DIR)
   - camomile files    : (set by dune-site)

 * Supported input formats
   - MP3               : no (requires mad)
   - AAC               : no (requires faad)
   - Ffmpeg            : yes
   - Flac (native)     : no (requires flac)
   - Flac (ogg)        : no (requires ogg)
   - Opus              : no (requires opus)
   - Speex             : no (requires speex)
   - Theora            : no (requires theora)
   - Vorbis            : no (requires vorbis)
   - WAV/AIFF          : yes (native)

 * Supported output formats
   - FDK-AAC           : no (requires fdkaac)
   - FFmpeg            : yes
   - MP3               : yes
   - MP3 (fixed-point) : no (requires shine)
   - Flac (native)     : no (requires flac)
   - Flac (ogg)        : no (requires ogg)
   - Opus              : no (requires opus)
   - Speex             : no (requires speex)
   - Theora            : no (requires theora)
   - Vorbis            : no (requires vorbis)
   - WAV/AIFF          : yes (native)

 * Tags
   - AAC               : no (requires faad)
   - FFmpeg            : yes
   - FLAC (native)     : no (requires flac)
   - Flac (ogg)        : no (requires ogg)
   - Native decoder    : yes
   - Vorbis            : no (requires vorbis)

 * Input / output
   - ALSA              : no (requires alsa)
   - AO                : yes
   - FFmpeg            : yes
   - JACK              : no (requires bjack)
   - NDI               : yes
   - OSS               : no (requires oss)
   - Portaudio         : yes
   - Pulseaudio        : no (requires pulseaudio)
   - SRT               : no (requires srt)

 * Audio manipulation
   - FFmpeg            : yes
   - LADSPA            : no (requires ladspa)
   - Lilv              : no (requires lilv)
   - Samplerate        : no (requires samplerate)
   - SoundTouch        : no (requires soundtouch)
   - StereoTool        : yes

 * Video manipulation
   - camlimages        : no (requires camlimages)
   - FFmpeg            : yes
   - frei0r            : no (requires frei0r)
   - ImageLib          : no (requires imagelib)
   - SDL               : yes

 * MIDI manipulation
   - DSSI              : no (requires dssi)

 * Visualization
   - GD                : no (requires gd)
   - Graphics          : no (requires graphics)
   - SDL               : yes

 * Additional libraries
   - FFmpeg filters    : yes
   - FFmpeg devices    : yes
   - inotify           : no (requires inotify)
   - irc               : no (requires irc-client-unix)
   - jemalloc          : no (requires jemalloc)
   - lo                : no (requires lo)
   - memtrace          : no (requires memtrace)
   - osc               : no (requires osc-unix)
   - ssl               : no (requires ssl)
   - sqlite3           : no (requires sqlite3)
   - tls               : no (requires tls-liquidsoap)
   - posix-time2       : no (requires posix)
   - windows service   : no (requires winsvc)
   - YAML support      : no (requires yaml)
   - XML playlists     : yes

 * Monitoring
   - Prometheus        : no (requires prometheus)

Installation method

From official container image

Additional Info

No response

@gAlleb gAlleb added the bug label Jan 2, 2025
@toots
Copy link
Member

toots commented Jan 2, 2025

Thanks for the report!

Do you have some logs? There are several implementation of video.add_text, that would help narrowing down which one is responsible.

@gAlleb
Copy link
Contributor Author

gAlleb commented Jan 2, 2025

liquidsoap rtl.liq
מוּסִיקָה
2025/01/02 17:21:21 >>> LOG START
2025/01/02 17:21:18 [ffmpeg.filter.bitstream:3] No valid mode found for filter pgs_frame_merge!
2025/01/02 17:21:18 [main:3] Liquidsoap rolling-release-v2.3.x-48-g5cb4ad6+dev
2025/01/02 17:21:18 [main:3] Using: angstrom=0.16.1 ao=0.2.4 base=v0.16.3 base.base_internalhash_types=v0.16.3 base.caml=v0.16.3 base.shadow_stdlib=v0.16.3 bigarray=[distributed with Ocaml] bigarray-compat=1.1.0 bigstringaf=0.10.0 bytes=[distributed with OCaml 4.02 or above] camlp-streams camomile.lib=2.0 cry=1.0.3 ctypes=0.23.0 ctypes-foreign=0.23.0 curl=0.9.2 domain_shims dtools=0.4.5 dune-build-info=3.17.0 dune-private-libs.dune-section=3.17.0 dune-site=3.17.0 dune-site.private=3.17.0 duppy=0.9.4 ffmpeg-av=1.2.1 ffmpeg-avcodec=1.2.1 ffmpeg-avdevice=1.2.1 ffmpeg-avfilter=1.2.1 ffmpeg-avutil=1.2.1 ffmpeg-swresample=1.2.1 ffmpeg-swscale=1.2.1 fileutils=0.6.4 gen=1.1 integers lame=0.3.7 liquidsoap-lang=rolling-release-v2.3.x-48-g5cb4ad6 liquidsoap-lang.console=rolling-release-v2.3.x-48-g5cb4ad6 liquidsoap_ao=rolling-release-v2.3.x-48-g5cb4ad6-dirty liquidsoap_builtins=rolling-release-v2.3.x-48-g5cb4ad6-dirty liquidsoap_core=rolling-release-v2.3.x-48-g5cb4ad6-dirty liquidsoap_ffmpeg=rolling-release-v2.3.x-48-g5cb4ad6-dirty liquidsoap_lame=rolling-release-v2.3.x-48-g5cb4ad6-dirty liquidsoap_ndi=rolling-release-v2.3.x-48-g5cb4ad6-dirty liquidsoap_optionals=rolling-release-v2.3.x-48-g5cb4ad6-dirty liquidsoap_portaudio=rolling-release-v2.3.x-48-g5cb4ad6-dirty liquidsoap_runtime=rolling-release-v2.3.x-48-g5cb4ad6-dirty liquidsoap_sdl=rolling-release-v2.3.x-48-g5cb4ad6-dirty liquidsoap_sdl_log_level=rolling-release-v2.3.x-48-g5cb4ad6-dirty liquidsoap_stereotool=rolling-release-v2.3.x-48-g5cb4ad6-dirty liquidsoap_xmlplaylist=rolling-release-v2.3.x-48-g5cb4ad6-dirty magic-mime=1.3.1 mem_usage=0.1.1 menhirLib=20240715 metadata=0.3.0 mm=0.8.6 mm.audio=0.8.6 mm.base=0.8.6 mm.image=0.8.6 mm.midi=0.8.6 mm.video=0.8.6 ndi=rolling-release-v2.3.x-48-g5cb4ad6-dirty portaudio=0.2.3 ppx_compare.runtime-lib=v0.16.0 ppx_hash.runtime-lib=v0.16.0 ppx_sexp_conv.runtime-lib=v0.16.0 re=1.12.0 saturn_lockfree=0.4.1 sedlex=3.3 seq=[distributed with OCaml 4.07 or above] sexplib0=v0.16.0 stdlib-shims=0.3.0 stereotool=rolling-release-v2.3.x-48-g5cb4ad6-dirty str=[distributed with Ocaml] stringext=1.6.0 threads=[distributed with Ocaml] threads.posix=[internal] tsdl=v1.1.0 tsdl-image=0.5 tsdl-ttf=0.6 unix=[distributed with Ocaml] uri=4.4.0 xml-light=2.5 xmlm=1.4.0 xmlplaylist=0.1.5
2025/01/02 17:21:18 [clock:3] Using builtin (low-precision) implementation for latency control
2025/01/02 17:21:21 [frame:4] frame.audio.samplerate set to: 44100
2025/01/02 17:21:21 [request.0:4] Pushed ["/Users/stef/liquidsoap/video/blank.png";...].
2025/01/02 17:21:21 [main:3] User script loaded in 2.36 seconds.
2025/01/02 17:21:21 [frame:4] frame.audio.channels set to: 2
2025/01/02 17:21:21 [frame:4] frame.video.default set to: false
2025/01/02 17:21:21 [frame:4] frame.midi.channels set to: 0
2025/01/02 17:21:21 [frame:4] frame.video.width set to: 1280
2025/01/02 17:21:21 [frame:4] frame.video.height set to: 720
2025/01/02 17:21:21 [frame:4] frame.video.framerate set to: 25
2025/01/02 17:21:21 [frame:4] frame.audio.samplerate set to: 44100
2025/01/02 17:21:21 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz main.
2025/01/02 17:21:21 [frame:3] Video frame size set to: 1280x720
2025/01/02 17:21:21 [frame:3] Targeting 'frame.duration': 0.02s = 882 ticks.
2025/01/02 17:21:21 [sandbox:3] Could not find binary bwrap, disabling sandboxing.
2025/01/02 17:21:21 [startup:3] FFmpeg filters registration: 0.04s
2025/01/02 17:21:21 [startup:3] FFmpeg bitstream filters registration: 0.00s
2025/01/02 17:21:21 [startup:3] main script hash computation: 0.05s
2025/01/02 17:21:21 [startup:3] main script cache retrieval: 0.05s
2025/01/02 17:21:21 [startup:3] stdlib hash computation: 0.05s
2025/01/02 17:21:21 [startup:3] Loading stdlib from cache!
2025/01/02 17:21:21 [startup:3] stdlib cache retrieval: 0.36s
2025/01/02 17:21:21 [startup:3] Typechecking main script: 1.33s
2025/01/02 17:21:21 [startup:3] Evaluating main script: 0.05s
2025/01/02 17:21:21 [clock:3] Starting clock generic with 11 source(s) and sync: auto
2025/01/02 17:21:21 [threads:4] Created thread "Clock generic" (1 total).
2025/01/02 17:21:21 [threads:4] Created thread "generic queue #1" (1 total).
2025/01/02 17:21:21 [threads:4] Created thread "generic queue #2" (2 total).
2025/01/02 17:21:21 [threads:4] Created thread "generic queue #3" (3 total).
2025/01/02 17:21:21 [threads:4] Created thread "generic queue #4" (4 total).
2025/01/02 17:21:21 [threads:4] Created thread "generic queue #5" (5 total).
2025/01/02 17:21:21 [threads:4] Created thread "non-blocking queue #1" (6 total).
2025/01/02 17:21:21 [threads:4] Created thread "non-blocking queue #2" (7 total).
2025/01/02 17:21:21 [video.converter:3] Using preferred video converter: ffmpeg.
2025/01/02 17:21:21 [audio.converter:3] Using samplerate converter: ffmpeg.
2025/01/02 17:21:21 [clock.generic:4] Clock thread is starting
2025/01/02 17:21:21 [source:4] Source sine gets up with content type: {audio=pcm(stereo)} and frame type: {audio : pcm(stereo)}.
2025/01/02 17:21:21 [sine:3] Content type is {audio=pcm(stereo)}.
2025/01/02 17:21:21 [source:4] Source video.text gets up with content type: {video=canvas} and frame type: 'A.{video : canvas}.
2025/01/02 17:21:21 [video.text:3] Content type is {video=canvas}.
2025/01/02 17:21:21 [source:4] Source video.crop gets up with content type: {video=canvas} and frame type: {video : canvas}.
2025/01/02 17:21:21 [video.crop:3] Content type is {video=canvas}.
2025/01/02 17:21:21 [source:4] Source video.info gets up with content type: {video=canvas} and frame type: {video : canvas}.
2025/01/02 17:21:21 [video.info:3] Content type is {video=canvas}.
2025/01/02 17:21:21 [source:4] Source video.translate gets up with content type: {video=canvas} and frame type: {video : canvas}.
2025/01/02 17:21:21 [video.translate:3] Content type is {video=canvas}.
2025/01/02 17:21:21 [source:4] Source source.available gets up with content type: {video=canvas} and frame type: {video : canvas}.
2025/01/02 17:21:21 [source.available:3] Content type is {video=canvas}.
2025/01/02 17:21:21 [source:4] Source single gets up with content type: {video=canvas} and frame type: 'A.{video : canvas}
2025/01/02 17:21:21 [source:4] where
2025/01/02 17:21:21 [source:4]   'A is a set of tracks to be muxed into a source and a set of tracks to be muxed into a source.
2025/01/02 17:21:21 [single:3] Content type is {video=canvas}.
2025/01/02 17:21:21 [single:3] /Users/stef/liquidsoap/video/blank.png is static, resolving once for all...
2025/01/02 17:21:21 [decoder.video.metadata:4] Unsupported MIME type for "/Users/stef/liquidsoap/video/blank.png": image/png!
2025/01/02 17:21:21 [decoder.ogg.metadata:4] Unsupported MIME type for "/Users/stef/liquidsoap/video/blank.png": image/png!
2025/01/02 17:21:21 [decoder.image.metadata:4] Unsupported file extension for "/Users/stef/liquidsoap/video/blank.png"!

2025/01/02 17:21:21 [video.text:3] Using sdl implementation

2025/01/02 17:21:21 [decoder.id3:4] Unsupported MIME type for "/Users/stef/liquidsoap/video/blank.png": image/png!
2025/01/02 17:21:21 [decoder.id3:4] Unsupported MIME type for "/Users/stef/liquidsoap/video/blank.png": image/png!
2025/01/02 17:21:21 [decoder.id3:4] Unsupported MIME type for "/Users/stef/liquidsoap/video/blank.png": image/png!
2025/01/02 17:21:21 [decoder.flac.metadata:4] Unsupported MIME type for "/Users/stef/liquidsoap/video/blank.png": image/png!
2025/01/02 17:21:21 [decoder.ffmpeg:4] Unsupported MIME type for "/Users/stef/liquidsoap/video/blank.png": image/png!
2025/01/02 17:21:21 [decoder.ffmpeg:4] Unsupported file extension for "/Users/stef/liquidsoap/video/blank.png"!
2025/01/02 17:21:21 [decoder.midi:4] Unsupported MIME type for "/Users/stef/liquidsoap/video/blank.png": image/png!
2025/01/02 17:21:21 [decoder.srt:4] Unsupported MIME type for "/Users/stef/liquidsoap/video/blank.png": image/png!
2025/01/02 17:21:21 [decoder.aiff:4] Unsupported MIME type for "/Users/stef/liquidsoap/video/blank.png": image/png!
2025/01/02 17:21:21 [decoder.wav:4] Unsupported MIME type for "/Users/stef/liquidsoap/video/blank.png": image/png!
2025/01/02 17:21:21 [decoder:4] Available decoders: ffmpeg (priority: 10), image (priority: 1)
2025/01/02 17:21:21 [decoder:4] Trying decoder "ffmpeg"
2025/01/02 17:21:21 [decoder:4] Cannot decode file "/Users/stef/liquidsoap/video/blank.png" with decoder ffmpeg as {video=canvas}. Detected content: {}
2025/01/02 17:21:21 [decoder:4] Trying decoder "image"
2025/01/02 17:21:21 [decoder:4] Available image decoders: ffmpeg (priority: 10), sdl (priority: 5), ppm (priority: 1)
2025/01/02 17:21:21 [decoder:4] Trying image decoder "ffmpeg" (priority: 10)
2025/01/02 17:21:21 [decoder:3] Image decoder "ffmpeg" accepted "/Users/stef/liquidsoap/video/blank.png"
2025/01/02 17:21:21 [decoder:4] Selected decoder image for file "/Users/stef/liquidsoap/video/blank.png" with expected kind {video=canvas} and detected content {video=canvas}
2025/01/02 17:21:21 [decoder:4] Trying method "ffmpeg" for "/Users/stef/liquidsoap/video/blank.png"...
2025/01/02 17:21:21 [single:4] Switching to source single_actual
2025/01/02 17:21:21 [source:4] Source single_actual gets up with content type: {video=canvas} and frame type: {video : canvas}.
2025/01/02 17:21:21 [single_actual:3] Content type is {video=canvas}.
2025/01/02 17:21:21 [single_actual:4] Queued 1 request(s)
2025/01/02 17:21:21 [single_actual:4] Remaining 0 requests
2025/01/02 17:21:21 [decoder:4] Trying method "ffmpeg" for "/Users/stef/liquidsoap/video/blank.png"...
2025/01/02 17:21:21 [single_actual:3] Prepared "/Users/stef/liquidsoap/video/blank.png" (RID 0).
2025/01/02 17:21:21 [source:4] Source video.add gets up with content type: {video=canvas} and frame type: 'A.{video : canvas}.
2025/01/02 17:21:21 [video.add:3] Content type is {video=canvas}.
2025/01/02 17:21:21 [source:4] Source source gets up with content type: {video=canvas} and frame type: {video : canvas}.
2025/01/02 17:21:21 [source:3] Content type is {video=canvas}.
2025/01/02 17:21:21 [source:4] Source source.2 gets up with content type: {audio=pcm(stereo),video=canvas} and frame type: {audio : pcm(stereo), video : canvas}.
2025/01/02 17:21:21 [source.2:3] Content type is {audio=pcm(stereo),video=canvas}.
2025/01/02 17:21:21 [source:4] Source output.icecast gets up with content type: {audio=pcm(stereo),video=canvas} and frame type: {audio : pcm(stereo), video : canvas}.
2025/01/02 17:21:21 [output.icecast:3] Content type is {audio=pcm(stereo),video=canvas}.
2025/01/02 17:21:21 [/video:3] Content type is {audio=pcm(stereo),video=canvas}.
2025/01/02 17:21:21 [single_actual:4] Queued 1 request(s)
2025/01/02 17:21:21 [/video:3] Connecting mount /video for 

@gAlleb
Copy link
Contributor Author

gAlleb commented Jan 2, 2025

UPDATE:

When using savonet/liquidsoap:v2.3.0 Dockerimage:

  1. videostream = video.add_text(color=0xFFFFFF, font=rtl_font, speed=0, x=340, y=340, size=50, show_text, videostream) is reversed
  2. video_track = ffmpeg.filter.drawtext(fontfile=rtl_font,fontsize="50",x= "340",y="340",fontcolor="white",textfile="/Users/stef/liquidsoap/nowplaying.txt",reload=5,graph,video_track) is not reversed.

@toots
Copy link
Member

toots commented Jan 2, 2025

Yeah, it's confusing. I found no reversal here with whatever method are available.

For reference, you should be able to use:

  • video.add_text.native: Only ASCII support ❌
  • video.add_text.sdl: No reversal here, might be depending on the sdl version ✅
  • video.add_text.gd: gd does not compile here 🚫
  • video.add_text.camlimages: camlimages does not compile here 🚫
  • video.add_text.ffmpeg: No reversal here ✅

Make sure to use the latest main, I just pushed some fixes to video.add_text.ffmpeg

@gAlleb
Copy link
Contributor Author

gAlleb commented Jan 2, 2025

Upgraded to latest main opam. Text gets reversed.

  • video.add_text.sdl - reversed
  • video_track = ffmpeg.filter.drawtext(fontfile=rtl_font,fontsize="50",x= "340",y="340",fontcolor="white",textfile="/Users/stef/liquidsoap/nowplaying.txt",reload=5,graph,video_track) - reversed

When using video.add_text.ffmpeg this is what i get:

2025/01/02 18:13:09 [main:3] Liquidsoap rolling-release-v2.3.x-60-g88c83b4+dev
2025/01/02 18:13:09 [main:3] Using: angstrom=0.16.1 ao=0.2.4 backoff=0.1.1 base=v0.16.3 base.base_internalhash_types=v0.16.3 base.caml=v0.16.3 base.shadow_stdlib=v0.16.3 bigarray=[distributed with Ocaml] bigarray-compat=1.1.0 bigstringaf=0.10.0 bytes=[distributed with OCaml 4.02 or above] camlp-streams camomile.lib=2.0 cry=1.0.3 ctypes=0.23.0 ctypes-foreign=0.23.0 curl=0.9.2 dtools=0.4.5 dune-build-info=3.17.0 dune-private-libs.dune-section=3.17.0 dune-site=3.17.0 dune-site.private=3.17.0 duppy=0.9.4 ffmpeg-av=1.2.1 ffmpeg-avcodec=1.2.1 ffmpeg-avdevice=1.2.1 ffmpeg-avfilter=1.2.1 ffmpeg-avutil=1.2.1 ffmpeg-swresample=1.2.1 ffmpeg-swscale=1.2.1 fileutils=0.6.4 gen=1.1 integers lame=0.3.7 liquidsoap-lang=rolling-release-v2.3.x-60-g88c83b4 liquidsoap-lang.console=rolling-release-v2.3.x-60-g88c83b4 liquidsoap_ao=rolling-release-v2.3.x-60-g88c83b4-dirty liquidsoap_builtins=rolling-release-v2.3.x-60-g88c83b4-dirty liquidsoap_core=rolling-release-v2.3.x-60-g88c83b4-dirty liquidsoap_ffmpeg=rolling-release-v2.3.x-60-g88c83b4-dirty liquidsoap_lame=rolling-release-v2.3.x-60-g88c83b4-dirty liquidsoap_ndi=rolling-release-v2.3.x-60-g88c83b4-dirty liquidsoap_optionals=rolling-release-v2.3.x-60-g88c83b4-dirty liquidsoap_portaudio=rolling-release-v2.3.x-60-g88c83b4-dirty liquidsoap_runtime=rolling-release-v2.3.x-60-g88c83b4-dirty liquidsoap_sdl=rolling-release-v2.3.x-60-g88c83b4-dirty liquidsoap_sdl_log_level=rolling-release-v2.3.x-60-g88c83b4-dirty liquidsoap_stereotool=rolling-release-v2.3.x-60-g88c83b4-dirty liquidsoap_xmlplaylist=rolling-release-v2.3.x-60-g88c83b4-dirty magic-mime=1.3.1 mem_usage=0.1.1 menhirLib=20240715 metadata=0.3.0 mm=0.8.6 mm.audio=0.8.6 mm.base=0.8.6 mm.image=0.8.6 mm.midi=0.8.6 mm.video=0.8.6 multicore-magic=2.3.0 multicore-magic.__private__.multicore_magic_atomic_array_ocaml4=2.3.0 ndi=rolling-release-v2.3.x-60-g88c83b4-dirty portaudio=0.2.3 ppx_compare.runtime-lib=v0.16.0 ppx_hash.runtime-lib=v0.16.0 ppx_sexp_conv.runtime-lib=v0.16.0 re=1.12.0 saturn_lockfree=0.5.0 sedlex=3.3 seq=[distributed with OCaml 4.07 or above] sexplib0=v0.16.0 stdlib-shims=0.3.0 stereotool=rolling-release-v2.3.x-60-g88c83b4-dirty str=[distributed with Ocaml] stringext=1.6.0 threads=[distributed with Ocaml] threads.posix=[internal] tsdl=v1.1.0 tsdl-image=0.5 tsdl-ttf=0.6 unix=[distributed with Ocaml] uri=4.4.0 xml-light=2.5 xmlm=1.4.0 xmlplaylist=0.1.5
2025/01/02 18:13:09 [clock:3] Using builtin (low-precision) implementation for latency control
2025/01/02 18:13:20 [frame:4] frame.audio.samplerate set to: 44100
2025/01/02 18:13:20 [request.0:4] Pushed ["/Users/stef/liquidsoap/video/videos/PixelLoop.mp4";...].
2025/01/02 18:13:20 [main:3] User script loaded in 9.94 seconds.
2025/01/02 18:13:20 [frame:4] frame.audio.channels set to: 2
2025/01/02 18:13:20 [frame:4] frame.video.default set to: false
2025/01/02 18:13:20 [frame:4] frame.midi.channels set to: 0
2025/01/02 18:13:20 [frame:4] frame.video.width set to: 1280
2025/01/02 18:13:20 [frame:4] frame.video.height set to: 720
2025/01/02 18:13:20 [frame:4] frame.video.framerate set to: 25
2025/01/02 18:13:20 [frame:4] frame.audio.samplerate set to: 44100
2025/01/02 18:13:20 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz main.
2025/01/02 18:13:20 [frame:3] Video frame size set to: 1280x720
2025/01/02 18:13:20 [frame:3] Targeting 'frame.duration': 0.02s = 882 ticks.
2025/01/02 18:13:20 [sandbox:3] Could not find binary bwrap, disabling sandboxing.
2025/01/02 18:13:20 [startup:3] FFmpeg filters registration: 0.05s
2025/01/02 18:13:20 [startup:3] FFmpeg bitstream filters registration: 0.00s
2025/01/02 18:13:20 [startup:3] main script hash computation: 0.06s
2025/01/02 18:13:20 [startup:3] main script cache retrieval: 0.06s
2025/01/02 18:13:20 [startup:3] stdlib hash computation: 0.06s
2025/01/02 18:13:20 [startup:3] stdlib cache retrieval: 0.06s
2025/01/02 18:13:20 [startup:3] Typechecking stdlib: 7.56s
2025/01/02 18:13:20 [startup:3] Typechecking main script: 0.01s
2025/01/02 18:13:20 [startup:3] Evaluating main script: 0.11s
2025/01/02 18:13:20 [clock:3] Starting clock generic with 6 source(s) and sync: auto
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock generic.child.child with 3 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive
2025/01/02 18:13:20 [clock:3] Starting clock buffer_0.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2 with 11 source(s) and sync: passive

AzuraCast/AzuraCast#7649 (comment)

@gAlleb
Copy link
Contributor Author

gAlleb commented Jan 2, 2025

image: savonet/liquidsoap-ci-build:main_alpine_amd64

videostream = video.add_text.ffmpeg(color=0xFFFFFF, font=rtl_font, speed=0, x=340, y=340, size=50, show_text, videostream) - works. not reversed

video_track = ffmpeg.filter.drawtext(fontfile=rtl_font,fontsize="50",x= "340",y="340",fontcolor="white",textfile="/Users/stef/liquidsoap/nowplaying.txt",reload=5,graph,video_track) works. not reversed.

videostream = video.add_text(color=0xFFFFFF, font=rtl_font, speed=0, x=340, y=340, size=50, show_text, videostream) - reversed

@toots
Copy link
Member

toots commented Jan 2, 2025

@gAlleb Could you break down with sdl? video.add_text could be any of them so this doesn't help.

I also have experienced some weird issues with copy-paste, I'd recommend doing screenshots.

Here are mine:

Screenshot 2025-01-02 at 10 30 51 AM Screenshot 2025-01-02 at 10 31 15 AM

I also add a new commit to display the SDL version your script is using:

2025/01/02 10:35:33 [sdl:3] Loading SDL version 2.30.8

@gAlleb
Copy link
Contributor Author

gAlleb commented Jan 2, 2025

Upgraded:

Снимок экрана 2025-01-02 в 20 17 47

@toots
Copy link
Member

toots commented Jan 2, 2025

Well dang!

@gAlleb
Copy link
Contributor Author

gAlleb commented Jan 2, 2025

same goes for videostream = video.add_text.ffmpeg(color=0xFFFFFF, font=rtl_font, speed=0, x=340, y=340, size=50, "מוּסִיקָה", videostream)

on opam build - reversed
on docker build - not reversed

video.add_text.sdl is reversed on both

Latest docker main with sdl 2.30.10:

Снимок экрана 2025-01-02 в 20 38 28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants