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

Error with SRT subtitles with multiple line breaks #14271

Open
6 tasks done
raziel711 opened this issue Jun 1, 2024 · 2 comments
Open
6 tasks done

Error with SRT subtitles with multiple line breaks #14271

raziel711 opened this issue Jun 1, 2024 · 2 comments

Comments

@raziel711
Copy link

raziel711 commented Jun 1, 2024

mpv Information

mpv v0.38.0-372-g481e4984 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
 built on May 31 2024 12:18:20
libplacebo version: v7.349.0 (v6.338.0-140-g50ddb03-dirty)
FFmpeg version: N-115464-g249c66bb2
FFmpeg library versions:
   libavutil       59.20.100
   libavcodec      61.5.104
   libavformat     61.3.104
   libswscale      8.2.100
   libavfilter     10.2.102
   libswresample   5.2.100

Important Information

  • Platform version: Windows 10 22H2
  • GPU model, driver and version: NVIDIA GeForce GTX 1650, driver version 555.85
  • Source: https://github.com/zhongfly/mpv-winbuild/releases
  • Introduced in version: Unknown. This is an extremely niche case so I'm not sure if this is a regression.

Reproduction Steps

I am having an issue with SRT subtitles that contain lines with more than one line break in the subtitle track. When there are at least two line breaks between dialogue lines, only the first line is displayed.

For instance, this is a line from the SRT subtitle track from the sample video provided below:

3
00:00:06,131 --> 00:00:09,217
SQUAD 1 BARRACKS - FRONT GATE









That man is very cunning.

There are ten breaks between the two lines; however, when played with mpv using mpv --no-config only the first line appears:

mpv-shot0004

This is with MPC-HC (using the internal subtitle renderer with all libass options checked):

mpc-hc64_zwpB8ofRTY

This is with VLC:

vlc_zd7uJpeuFj

There is also a difference in behavior depending on whether or not the SRT track is an internal track or an external track. If the SRT track is extracted and loaded as an external track, then both lines are displayed, but with only a single line break.

Internal track:

internal

The same subtitle track but loaded as an external subtitle track:

external

Expected Behavior

Both dialogue lines with the correct number of line breaks should be displayed.

Actual Behavior

With internal SRT subtitles, only the first line is displayed, and with external SRT subtitles, both lines are displayed, but with only one line break regardless of the number of breaks in the subtitle track.

Log File

log.txt

Sample Files

sample.zip

I carefully read all instruction and confirm that I did the following:

  • I tested with the latest mpv version to validate that the issue is not already fixed.
  • I provided all required information including system and mpv version.
  • I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • I attached the full, untruncated log file.
  • I attached the backtrace in the case of a crash.
@Dudemanguy
Copy link
Member

ffplay seems to reproduce the same behavior. I think the converter likely strips newlines or something.

@na-na-hi
Copy link
Contributor

na-na-hi commented Jun 1, 2024

The sample is malformed. SRT subtitle format doesn't support multiple line breaks. A blank line always indicates a new part of the subtitle. Both the linked spec and the SubRip program work like this.

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

No branches or pull requests

3 participants