Opened 8 years ago
Closed 8 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)
Change History (14)
by , 8 years ago
Attachment: | subs_es.srt added |
---|
comment:1 by , 8 years ago
follow-up: 3 comment:2 by , 8 years ago
Component: | undetermined → 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 by , 8 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 )
comment:4 by , 8 years ago
Resolution: | → invalid |
---|---|
Status: | new → 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 by , 8 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
comment:7 by , 8 years ago
Resolution: | → needs_more_info |
---|---|
Status: | reopened → closed |
Apparently OP is no more interested in this ticket.
subtitle file 1