1
0
mirror of https://github.com/odrling/Aegisub synced 2025-04-11 22:56:02 +02:00

8715 Commits

Author SHA1 Message Date
Vincent Wong
59f0fe2aeb
Audio/timing: minor style, comment
A bit more clarification of code logic. Follow predominant if/else style
2024-11-06 14:52:05 +01:00
Vincent Wong
85a3d1e7e1
Audio/Timing: implement tap-to-time
Tap-to-time provides the user the ability to tap to the lyrics/syllables
of the song in order to time lines or karaoke. It consists of these
extra UI interactions:

- **Indicator**: tap marker: a designated marker that can be moved to
  the current audio position; indicated in:
  - the audio display by a green arrow underneath a marker
  - the karaoke display by a green-colored syllable
- **Control**: tap marker: the tap marker can be changed by selecting
  syllables on audio display in karaoke mode, or clicking the markers on
  audio display in dialogue mode
- **Control**: ctrl-right-click audio display: starts playing the audio
  from that exact position until the end of the file
- **Option**: Timing/Tap To Time: enables the tap marker indicator and
  commands
- **Button**: time_opt_tap_to_time: toggles the Timing/Tap To Time option
- **Button**: time_tap_connect (hotkey I): a command that:
  - moves the tap marker's position to the current playing audio
    position
  - sets the next marker to be the tap marker
  - if the tap marker is already the last marker AND BOTH autocommit AND
    next-line-on-commit is ON, will move onto the next line
  - if moved on to the next line, also sets the start marker to the current
    audio position, so the two lines are connected, and moves to the
    next tap marker (essentially reinvoking time_tap_connect once)
- **Button**: time_tap_no_connect (hotkey O): similar to
  time_tap_connect, except it will not set the next line's start
  position even if moved to the next line

Expected workflow:
1) User loads song lyrics
2) User splits each line into syllables
3) User turns on tap-to-time, autocommit, and next-line-on-commit
4) User plays audio from beginning, tapping time_tap_connect to each
syllable, occasionally tapping time_tap_no_connect when a break between
lines is desired
5) If user messes up a line, they can set the tap marker to where they
want to restart from, and ctrl-right-click to start the audio a few
seconds before it
6) Syllables can be split/merged at will, and adjustments to timing can
be done using normal karaoke timing controls
2024-11-06 14:52:05 +01:00
Vincent Wong
4f188432ae
AudioTimingControllerKaraoke: move timing correction above MoveMarker
Having the timing correction in MoveMarker is extremely surprising
behavior if any other part of the code uses MoveMarker expecting it to
work correctly as advertised
2024-11-06 14:52:04 +01:00
Vincent Wong
ad91807d06
audio_timing: add missing param comment for OnLeftClick
Missing the alt_click param in comment
2024-11-06 14:52:04 +01:00
odrling
32ff0eb037
shift video instead of subtitles
This is probably wrong in some cases. This is probably what we want with
matroska files.
2024-11-06 14:43:10 +01:00
odrling
818405ed91
fix mks file parsing 2024-11-06 14:43:10 +01:00
odrling
9db826f86e
fix sub timing in mkv files with video delay
Some matroska files have audio start at timestamp 0 and video later.
In this case mkvtoolnix seems to use the first block of the first
cluster to the audio track (I would assume this is only an
implementation detail and not really from the matroska specs. And also
could happen in other cases without the video being delayed, but that's
not the point). Aegisub used to read this first block and use its
timestamp as the starting point of the video track.

With this commit, Aegisub tries to read all the blocks until it can read
the first timestamp of the video track and use it for the subtitles'
timestamps. Audio tracks don't seem to be impacted by these changes.
2024-11-06 14:43:10 +01:00
Pierre Jeanjean
1ad2d838ad
Fix charset detection and conversion issues 2024-11-06 14:43:04 +01:00
arch1t3cht
8165f1ad5e Merge branch 'fixes' into feature 2024-11-03 00:26:40 +01:00
arch1t3cht
b7d228c0ce Stop shifting timecodes to start at 0ms
This reverts commit 1dedfb18cd62f006c39f76ce298f4a3157607271.
Such files exist in the wild (one example being a large set of old CR
rips, see https://redvice.org/2018/crunchyroll-83ms-delay/) and players
like mpv also respect this video delay (at least they do now, they might
not have when the linked commit was made).

Fixes TypesettingTools/Aegisub#21.
Fixes TypesettingTools/Aegisub#169.
2024-11-03 00:21:48 +01:00
arch1t3cht
b9ba4ea42c Merge branch 'misc' into feature 2024-10-31 22:15:43 +01:00
arch1t3cht
0510cedffb Fix crash when using search/replace with multiple windows
Have the dialog_manager manage the search/replace dialog like the other
dialogs.
2024-10-31 22:13:56 +01:00
arch1t3cht
d0d7b3febe Don't allow opening dialogs twice
This was broken in e924db1fdab00fa83fcc6aad2895bd5e94852941.
2024-10-31 22:12:01 +01:00
arch1t3cht
d8c5416bf7 Merge branch 'misc' into feature 2024-10-29 15:41:00 +01:00
arch1t3cht
b78088dc31 Wrap long status messages in progress dialog
I'm still fighting wxWidgets so I don't know if this is the best
solution, but at least it works in all cases now.
2024-10-29 15:40:46 +01:00
arch1t3cht
de0de6ae5a Revert "Wrap long status messages in progress dialog"
This reverts commit 88cc98df9c3f12705f52a4046836366e9972dcce.
2024-10-29 15:40:46 +01:00
arch1t3cht
e62f40fa00 Merge branch 'bestsource' into feature 2024-10-29 14:46:52 +01:00
Alex James
490fcd9294 meson: Support system-provided bestsource
Meson unconditionally uses the wrapped bestsource dependency when the
bestsource option is enabled. Update meson.build to support using a
system-provided version of bestsource when it is present.
2024-10-29 14:45:52 +01:00
arch1t3cht
dc68cae1be Merge branch 'vapoursynth' into feature 2024-10-25 18:01:39 +02:00
arch1t3cht
f67a8d77d1 Merge branch 'bestsource' into feature 2024-10-25 17:59:43 +02:00
arch1t3cht
46e15df453 Merge branch 'fixes' into feature 2024-10-25 17:59:17 +02:00
arch1t3cht
0f8a7c0973 Merge branch 'misc' into feature 2024-10-25 17:58:53 +02:00
arch1t3cht
2e5226421e vapoursynth: Use scoped_holder everywhere for RAII 2024-10-25 17:57:04 +02:00
arch1t3cht
2b855a327d vapoursynth: Respect YCbCr Matrix header
This probably leaks some memory in some of the error cases, but the next
commit will replace everything with proper RAII wrappers.
2024-10-25 17:55:33 +02:00
arch1t3cht
be2e6cb2d8 vapoursynth: Simplify resize argument logic
The previous logic was actually redundant (except in weird edge cases
where it may cause equally weird behavior) since frame props always take
precedence over explicit arguments in VapourSynth's resize.
2024-10-25 17:49:42 +02:00
arch1t3cht
9adeeb1f8e Fix, simplify, and outsource ffms2 color space override logic
Actually support all YCbCr Matrix values instead of only a 601 matrix.
Simplify the override logic and move most of it outside of the ffms2
provider so it can be shared with other providers.
Also stop erroring out on unknown video color spaces.

This is not yet perfect (the guessing logic could be improved, invalid
matrices should probably default to TV.601, and the added functions feel
a bit out of place in video_provider_manager.cpp and are partially
redundant with ycbcr_conv.cpp) but it's a lot better and more
maintainable than before.
2024-10-25 17:48:54 +02:00
arch1t3cht
1060e0591e bestsource: Respect YCbCr Matrix header 2024-10-25 17:48:24 +02:00
arch1t3cht
dec761de1f Fix, simplify, and outsource ffms2 color space override logic
Actually support all YCbCr Matrix values instead of only a 601 matrix.
Simplify the override logic and move most of it outside of the ffms2
provider so it can be shared with other providers.
Also stop erroring out on unknown video color spaces.

This is not yet perfect (the guessing logic could be improved, invalid
matrices should probably default to TV.601, and the added functions feel
a bit out of place in video_provider_manager.cpp and are partially
redundant with ycbcr_conv.cpp) but it's a lot better and more
maintainable than before.
2024-10-25 17:48:17 +02:00
arch1t3cht
8563a6c06e Fix, simplify, and outsource ffms2 color space override logic
Actually support all YCbCr Matrix values instead of only a 601 matrix.
Simplify the override logic and move most of it outside of the ffms2
provider so it can be shared with other providers.
Also stop erroring out on unknown video color spaces.

This is not yet perfect (the guessing logic could be improved, invalid
matrices should probably default to TV.601, and the added functions feel
a bit out of place in video_provider_manager.cpp and are partially
redundant with ycbcr_conv.cpp) but it's a lot better and more
maintainable than before.
2024-10-25 17:47:14 +02:00
arch1t3cht
88cc98df9c Wrap long status messages in progress dialog 2024-10-25 17:46:08 +02:00
arch1t3cht
6d3d5a7552 vapoursynth: Switch order of directories added to path
Give ?user priority over ?data. This matches the Lua API's behavior
and allows overriding modules in ?data with modules in ?user.
2024-10-24 18:44:16 +02:00
Mia Herkt
14480cc720 agi: Replace Boost flat_map with std::map in Thesaurus class
I do not see a reason to prefer the flat_map implementation,
and it’s causing crashes when compiled with GCC >= 13 and
Boost 1.85.0 at optimization level 2 or higher.

Whether or not this is a bug in GCC, or Boost hitting a case of
undefined behavior, avoiding it altogether doesn’t seem to hurt.

Fixes #137
2024-10-24 18:20:52 +02:00
arch1t3cht
74ed5a6917 Merge branches 'bugfixes', 'workarounds' and 'bestsource' into feature 2024-10-23 21:09:33 +02:00
arch1t3cht
2969ba4df8 Revert "ci: Pin meson version to 1.4.2 for now"
Things work again now.

This reverts commit 1e20306d489cf6b8975c9707dddc5312ce096b29.
2024-10-23 20:59:27 +02:00
arch1t3cht
b1fadaf1ee bestsource: Bump to R8 2024-10-23 20:58:22 +02:00
arch1t3cht
546abe9385 Remove dav1d patch
This is no longer necessary due to an upstream update.
2024-10-23 20:56:48 +02:00
arch1t3cht
e8ebb103a5 README: Update troubleshooting section, add section about issues/prs 2024-09-17 20:25:29 +02:00
arch1t3cht
bf20c62e6b Merge branch 'vapoursynth' into feature 2024-07-17 21:12:38 +02:00
arch1t3cht
d3bdecebef vapoursynth: Fix bestsource packaging in portable installer 2024-07-17 21:12:27 +02:00
arch1t3cht
2a9bbc05ff Merge branches 'bugfixes' and 'vapoursynth' into feature 2024-07-16 16:24:44 +02:00
arch1t3cht
1e20306d48 ci: Pin meson version to 1.4.2 for now
The harfbuzz subproject doesn't build with 1.5 due to a meson
regression.
2024-07-16 16:24:08 +02:00
arch1t3cht
c49b604172 vapoursynth: Improve lsmas plugin version detection
Some lsmas versions (like HomeOfAviSynthPlusEvolution's, the currently
actively maintained one) support the "cachedir" argument but do not
have a "Version" function. Hence, it's better to just check for the
argument directly.
2024-07-16 16:22:33 +02:00
arch1t3cht
cb930ab6b2 Merge branch 'misc' into feature 2024-06-20 20:27:58 +02:00
arch1t3cht
ef78a66281 Add option to make Shift+Enter add \n instead of \N
\n is useful in combination with a WrapStyle of 2, which plays
nicer with style overrides.
2024-06-20 20:27:19 +02:00
arch1t3cht
80491bacbf Merge branch 'bugfixes' into feature 2024-05-31 00:08:05 +02:00
arch1t3cht
b7af9bd0d3 ci: Bump even more action versions 2024-05-31 00:07:49 +02:00
arch1t3cht
b4da179146 Merge branches 'bugfixes' and 'bestsource' into feature 2024-05-30 23:17:17 +02:00
arch1t3cht
eff71c27a4 Merge branch 'workarounds' into feature 2024-05-30 23:17:12 +02:00
arch1t3cht
b8f0906906 bestsource: Don't set any prefer_static argument
This should no longer be needed at all
2024-05-30 23:12:28 +02:00
0tkl
0a01ecf9ce bestsource: Bump to R4 2024-05-30 23:01:09 +02:00