Opened 7 years ago

Closed 7 years 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 years ago.
subtitle file 1
subs_es2.srt (3.9 KB ) - added by Lediff 7 years ago.
subtitle 2
win_subs_es.srt (4.0 KB ) - added by Lediff 7 years ago.
subtitle 3
image1.jpg (123.7 KB ) - added by Lediff 7 years ago.
screenshot
ffmpeg-20170307-210806.log (812.5 KB ) - added by Lediff 7 years ago.
report
ffmpeg-20170307-231957.log (1.0 MB ) - added by Lediff 7 years ago.
report for subs_es.srt
ffmpeg-20170307-232259.log (812.2 KB ) - added by Lediff 7 years ago.
report for win_subs_es.srt

Change History (14)

by Lediff, 7 years ago

Attachment: subs_es.srt added

subtitle file 1

by Lediff, 7 years ago

Attachment: subs_es2.srt added

subtitle 2

by Lediff, 7 years ago

Attachment: win_subs_es.srt added

subtitle 3

by Lediff, 7 years ago

Attachment: image1.jpg added

screenshot

by Lediff, 7 years ago

Attachment: ffmpeg-20170307-210806.log added

report

comment:2 by Carl Eugen Hoyos, 7 years ago

Component: undeterminedavcodec
Keywords: sub srt added; subtitles filter hardsubs removed

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

in reply to:  2 comment:3 by Lediff, 7 years ago

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 )

by Lediff, 7 years ago

Attachment: ffmpeg-20170307-231957.log added

report for subs_es.srt

by Lediff, 7 years ago

Attachment: ffmpeg-20170307-232259.log added

report for win_subs_es.srt

comment:4 by Lediff, 7 years ago

Resolution: invalid
Status: newclosed

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 by Carl Eugen Hoyos, 7 years ago

Resolution: invalid
Status: closedreopened

comment:6 by Carl Eugen Hoyos, 7 years ago

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

comment:7 by Elon Musk, 7 years ago

Resolution: needs_more_info
Status: reopenedclosed

Apparently OP is no more interested in this ticket.

Note: See TracTickets for help on using tickets.