Opened 2 years ago

Last modified 2 years ago

#6051 new enhancement

Detect srt without index

Reported by: cehoyos Owned by:
Priority: wish Component: avformat
Version: git-master Keywords: srt
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

(videolan ticket 17720)
Attached srt file is missing index values, decoding works fine if I force the demuxer.

$ ffmpeg -i DEF\ CON\ 24\ Conference\ -\ Ang\ Cui\ -\ A\ Monitor\ Darkly\ -\ Reversing\ and\ Exploiting\ Ubiquitous\ -\ Video\ and\ Slides.srt
ffmpeg version N-82963-g9ec52a0 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      55. 43.100 / 55. 43.100
  libavcodec     57. 70.100 / 57. 70.100
  libavformat    57. 61.100 / 57. 61.100
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 68.100 /  6. 68.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
DEF CON 24 Conference - Ang Cui - A Monitor Darkly - Reversing and Exploiting Ubiquitous - Video and Slides.srt: Invalid data found when processing input
$ ffmpeg -f srt -i DEF\ CON\ 24\ Conference\ -\ Ang\ Cui\ -\ A\ Monitor\ Darkly\ -\ Reversing\ and\ Exploiting\ Ubiquitous\ -\ Video\ and\ Slides.srt out.srt
ffmpeg version N-82963-g9ec52a0 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      55. 43.100 / 55. 43.100
  libavcodec     57. 70.100 / 57. 70.100
  libavformat    57. 61.100 / 57. 61.100
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 68.100 /  6. 68.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
Input #0, srt, from 'DEF CON 24 Conference - Ang Cui - A Monitor Darkly - Reversing and Exploiting Ubiquitous - Video and Slides.srt':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Subtitle: subrip
Output #0, srt, to 'out.srt':
  Metadata:
    encoder         : Lavf57.61.100
    Stream #0:0: Subtitle: subrip (srt)
    Metadata:
      encoder         : Lavc57.70.100 srt
Stream mapping:
  Stream #0:0 -> #0:0 (subrip (srt) -> subrip (srt))
Press [q] to stop, [?] for help
size=      49kB time=00:34:00.53 bitrate=   0.2kbits/s speed=2.47e+05x
video:0kB audio:0kB subtitle:35kB other streams:0kB global headers:0kB muxing overhead: 38.937664%

Change History (4)

comment:1 follow-up: Changed 2 years ago by Cigaes

Does any other software play these files without hiccup?

There are several very similar subtitles formats, making one of them less strict may cause it to detect as its own files meant for another one.

Fixing these files is very easy and quick with a good text editor.

comment:2 in reply to: ↑ 1 Changed 2 years ago by cehoyos

Replying to Cigaes:

Does any other software play these files without hiccup?

Compn claims they play fine with MPlayer.

There are several very similar subtitles formats, making one of them less strict may cause it to detect as its own files meant for another one.

aqtitle and webvtt or do I miss one?
Both are easy to avoid afaict.

Fixing these files is very easy and quick with a good text editor.

How is this related?

comment:3 Changed 2 years ago by Cigaes

The VLC ticket says there is a hiccup with the MPlayer's playback. Anyway, I would not take MPlayer as a reference for reliable behaviour in that area; the ASS parser will eat comas in certain circumstances for example.

Supporting a non-standard variant of a format encourages people to use it, possibly unwittingly, and puts pressure to other implementations to support it: more work and less reliability for everybody.

I think we should consider it only if either (1) the files are not easily fixable, or (2) significant other implementations support them too, or (3) we know where these files come from and they will keep coming. When none of these conditions are met, I think we should close as WONTFIX and tell people to fix their files.

Note: See TracTickets for help on using tickets.