Opened 7 months ago

Closed 4 months ago

#6226 closed defect (needs_more_info)

subtitles filter (hardsubs) error

Reported by: Lediff Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: sub srt
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
When trying to burn (hardsubs) an srt with an mp4 I get the entire file in second 0. See image1.jpg
How to reproduce:

% ffmpeg  -i video.mp4 -vf "subtitles=subs_es.srt" output.mp4
ffmpeg version: 
ffmpeg -version
ffmpeg version N-83692-gb8a7dcbde2-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.1 (Debian 5.4.1-5) 20170205
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-5 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
libavutil      55. 47.100 / 55. 47.100
libavcodec     57. 81.100 / 57. 81.100
libavformat    57. 66.102 / 57. 66.102
libavdevice    57.  3.100 / 57.  3.100
libavfilter     6. 74.100 /  6. 74.100
libswscale      4.  3.101 /  4.  3.101
libswresample   2.  4.100 /  2.  4.100
libpostproc    54.  2.100 / 54.  2.100
d322e558b9264761f8c2e4febef88d17  ffmpeg-git-64bit-static.tar.xz
git: gb8a7dcbde2 built on 20170301

I did tried to changing the line breaks from Linux, to Windows. Also parsing the file with ffmpeg like

% ffmpeg -i subtitle.srt subtitle2.srt

Some result.

% file *srt
subs_es2.srt:    UTF-8 Unicode text, with CRLF, LF line terminators
subs_es.srt:     UTF-8 Unicode text
win_subs_es.srt: UTF-8 Unicode text, with CRLF line terminators
% md5sum *srt
73bbe474e4d9e80c25c00972fba44631  subs_es2.srt
21daf8dcced5a11b8ac16ed66e38f9f3  subs_es.srt
31f39ec370b6aa410da444f893eb01fb  win_subs_es.srt

Video from

% youtube-dl --format mp4 https://www.youtube.com/watch?v=j_aiFv6peDE
(md5: 4245c561290207d1df6f2ffdfecf1ba3 )

Attachments (7)

subs_es.srt (3.8 KB) - added by Lediff 7 months ago.
subtitle file 1
subs_es2.srt (3.9 KB) - added by Lediff 7 months ago.
subtitle 2
win_subs_es.srt (4.0 KB) - added by Lediff 7 months ago.
subtitle 3
image1.jpg (123.7 KB) - added by Lediff 7 months ago.
screenshot
ffmpeg-20170307-210806.log (812.5 KB) - added by Lediff 7 months ago.
report
ffmpeg-20170307-231957.log (1.0 MB) - added by Lediff 7 months ago.
report for subs_es.srt
ffmpeg-20170307-232259.log (812.2 KB) - added by Lediff 7 months ago.
report for win_subs_es.srt

Change History (14)

Changed 7 months ago by Lediff

subtitle file 1

Changed 7 months ago by Lediff

subtitle 2

Changed 7 months ago by Lediff

subtitle 3

Changed 7 months ago by Lediff

screenshot

Changed 7 months ago by Lediff

report

comment:2 follow-up: Changed 7 months ago by cehoyos

  • Component changed from undetermined to avcodec
  • Keywords sub srt added; subtitles filter hardsubs removed

Which program is able to read the subtitle file you attached?
How were the files created?

comment:3 in reply to: ↑ 2 Changed 7 months ago by Lediff

Replying to cehoyos:

Which program is able to read the subtitle file you attached?
How were the files created?

VLC 2.2.3-37-g888b7e89 (current repo vlc on debian jessie) can read subs_es.srt and win_subs_es.srt.


sub_es.srt was created using ccsubs.com, selecting:
language: spanish
format: srt
url: https://www.youtube.com/watch?v=j_aiFv6peDE
I did modify it a little bit because the website prepends an ad that makes the first line sub to overlap with the ad.
The edit was:
line 2 (first sentence) from:

00:00:00 --> 00:00:05

to

00:00:00,0 --> 00:00:01,0

line number 6 (second sentence) from:

00:00:00 --> 00:00:03

to

00:00:01 --> 00:00:03

(at first I thought this overlap was causing the issue, that's why I edited the file manually to fix it and re-try the burn)


subs_es2.srt was created doing:

ffmpeg -i subs_es.srt subs_es2.srt

win_subs_es.srt was created by doing

perl -p -e 's/\n/\r\n/' < subs_es.srt > win_subs_es.srt

(following this post: http://superuser.com/a/71509 )

Changed 7 months ago by Lediff

report for subs_es.srt

Changed 7 months ago by Lediff

report for win_subs_es.srt

comment:4 Changed 7 months ago by Lediff

  • Resolution set to invalid
  • Status changed from new to closed

ok. The fix was to edit the file and change every line from

00:00:01 --> 00:00:03

to

00:00:01,000 --> 00:00:03,000

Now it works.
You can close this ticket.

comment:5 Changed 7 months ago by cehoyos

  • Resolution invalid deleted
  • Status changed from closed to reopened

comment:6 Changed 7 months ago by cehoyos

Could you provide the unedited, original file (with the overlapping ad)?

comment:7 Changed 4 months ago by richardpl

  • Resolution set to needs_more_info
  • Status changed from reopened to closed

Apparently OP is no more interested in this ticket.

Note: See TracTickets for help on using tickets.