mpvacious icon indicating copy to clipboard operation
mpvacious copied to clipboard

Audio padding issue

Open Geniusssmit opened this issue 3 years ago • 17 comments

Environment

  1. OS name [e.g. Parabola, Debian] win 10
  2. OS version 1809
  3. mpv version 0.35
  4. Logs
  5. Screenshots, if applicable image image

Describe the bug A description of what the bug is. audio_padding only works when timings for multiple lines are set by pressing "c", and not for shift+s, shift+e

Expected behavior A description of what you expected to happen. audio padding should work

Geniusssmit avatar Nov 14 '22 16:11 Geniusssmit

Motokare no Yuigonjou 2022 S01 1080p WEB-DL AAC H.264-MagicStar.zip comparison, padding set to 1.0 (1 second)

Geniusssmit avatar Nov 14 '22 16:11 Geniusssmit

difference is exactly 2 seconds

Geniusssmit avatar Nov 14 '22 16:11 Geniusssmit

Padding is only applied when timings are chosen automatically. When you set them manually, no padding is applied.

tatsumoto-ren avatar Nov 14 '22 16:11 tatsumoto-ren

c - Interactive subtitle selection. is automatic?

Geniusssmit avatar Nov 14 '22 16:11 Geniusssmit

If you want to create a card with padding, you shouldn't use shift+s and shift+e and instead use only c and shift+l,shift+h

tatsumoto-ren avatar Nov 14 '22 16:11 tatsumoto-ren

I see, difference is not obvious tbh, but ok, also do you know why it cuts audio, even if subtitle is still shown. I ended up with 1.0 padding, but thats quite big

Geniusssmit avatar Nov 14 '22 16:11 Geniusssmit

When you override timings set in the subtitles, mpvacious assumes that your subs are incorrectly timed, and disables the padding since applying it would mean potentially grabbing extra parts of the dialogue that you don't want on your card.

tatsumoto-ren avatar Nov 14 '22 16:11 tatsumoto-ren

I ended up with 1.0 padding

Could be your subtitle's timings, or the amount of padding you set in subs2srs.conf.

tatsumoto-ren avatar Nov 14 '22 16:11 tatsumoto-ren

When you override timings set in the subtitles, mpvacious assumes that your subs are incorrectly timed, and disables the padding since applying it would mean potentially grabbing extra parts of the dialogue that you don't want on your card.

I understand that. I mean I check, timings are perfect, even without overriding mpvacious cuts before subtitle disappears.

Geniusssmit avatar Nov 14 '22 16:11 Geniusssmit

that's why I'm using 1.0 padding to compensate it

Geniusssmit avatar Nov 14 '22 16:11 Geniusssmit

but yeah, anyway "c" key works just fine.

Geniusssmit avatar Nov 14 '22 16:11 Geniusssmit

Bandicam 2022-11-14 19-57-05-276-1.zip Please watch, it cuts 4 seconds earlier, even with "c"

Geniusssmit avatar Nov 14 '22 17:11 Geniusssmit

that's why I'm using 1.0 padding to compensate it

You're better off fixing the timings then.

Please watch, it cuts 4 seconds earlier, even with "c"

On the video you still set the timing manually.

tatsumoto-ren avatar Nov 14 '22 17:11 tatsumoto-ren

that's why I'm using 1.0 padding to compensate it

You're better off fixing the timings then.

Please watch, it cuts 4 seconds earlier, even with "c"

On the video you still set the timing manually.

I mean, as you can see, automatically it sets end timing to 07m30s200ms, but when I fix it manually, I set it when the line ends, it ends around 07m34s186ms

Geniusssmit avatar Nov 14 '22 17:11 Geniusssmit

image I think there is something wrong with the subtitle file, do you know how to deal with cases like this? 2 exact same lines with different timings [MagicStar] Motokare no Yuigonjou EP04 [WEBDL] [1080p].zip

Geniusssmit avatar Nov 14 '22 17:11 Geniusssmit

This could help. You can also open the file in vim and remove the redundant lines.

tatsumoto-ren avatar Nov 14 '22 22:11 tatsumoto-ren

I also found this behavior really confusing: padding is only respected for single-line selection, but somehow not for multiple-line selection. I needed to spend some time debugging to figure out what was going on.

When you override timings set in the subtitles, mpvacious assumes that your subs are incorrectly timed, and disables the padding

I think this behavior is only expected when the user directly sets the timestamps without referencing the exact timing of the current subs. I only use shift+s and shift+e when the subs are already correctly timed, and I need to select a range of them. In this case, this behavior is definitely a surprise for me.

If you want to create a card with padding, you shouldn't use shift+s and shift+e and instead use only c and shift+l,shift+h

This is probably the best option. I didn't try it before because it seemed less intuitive than shift+s and shift+e.

Alternatively, just locally comment out these lines. https://github.com/Ajatt-Tools/mpvacious/blob/178674f605ad9a91b9925de5abb81880d8c70526/subs2srs.lua#L331-L333

tomtung avatar Aug 23 '23 10:08 tomtung