ffmpeginteropx / FFmpegInteropX

FFmpeg decoding library for Windows 10 UWP and WinUI 3 Apps
Apache License 2.0
212 stars 53 forks source link

Bitmap Subtitles with WinUI3 #399

Open softworkz opened 10 months ago

softworkz commented 10 months ago

Just wanted to check back: Has this ever worked for any of you so far?

brabebhin commented 8 months ago

image

Geometry strikethrough has an interesting effect xD

softworkz commented 8 months ago

For 2D vector graphics, this is not unusual. There's typically a setting somewhere to control the treatment of intersections.

softworkz commented 8 months ago

I believe it can also be fixed by inserting an additional point in the path. The logic for intersections also depends on whether the path has an odd or even number of points (but that part is all IIRC only).

brabebhin commented 8 months ago

Yeah I figured out the fix by the time I posted that, I just find the way it looks funny.

brabebhin commented 8 months ago

So the fix for that was to use a custom ICanvasTextRenderer, which allows you to override how the underline and strike-through are drew. Per character colors and per character outlines can also be done this way, although the outlines are still elusive. Eventually you need to draw all text as geometries if you want advanced stuff like underline, italics etc

In retrospect it is indeed not that difficult to implement the same level of SSA support as Windows.Media has. In fact, we could easily build something similar to libass with win2D by ourselves.