Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
10th July 2020, 23:44 | #1 | Link |
Registered User
Join Date: Jun 2020
Posts: 6
|
ffmpeg creates subtitles delay
Hi everyone
I want to mux a .ass subtitles file into a matroska container together with a video stream. First I checked the .ass file in Aegisubs before muxing and I got the following timing on the individual subtitles lines: First text line from 00:14.49 - 00:17.83 If I now mux the .ass file together with a .mkv video file with mkvtoolnix I get the following timing on the first line (through checkingt he resulting .mkv with embedded .ass in Aegisub): First text line from 00:14.49 - 00:17.83 mkvtoolnix muxed the subtitles file exactly as it was when I checked the .ass file in Aegisub before muxing. When I tried to mux the .ass file together with a video.mkv file using ffmpeg and the following command, the subtitles timing gets messed up and delayed (through checking the resulting .mkv with embedded .ass in Aegisub): ffmpeg -i video.mkv -i subtitles.ass -map 0 -map 1 -c copy -output.mkv First text line from 00:14.44 - 00:17-78 In conclusion: When I mux with ffmpeg instead of mkkvtoolnix, I get delayed subtitles of - 0.05s. Has anybody else encountered this problem when muxing subtitles with ffmpeg. How can I avoid this and make ffmpeg mux the .ass file exactly as it is shown when opened in Aegisub without creating that 0.05s delay? Last edited by carlosrodriguez; 11th July 2020 at 14:58. |
11th July 2020, 22:49 | #2 | Link |
Registered User
Join Date: Jun 2020
Posts: 6
|
I found a quick and dirty workaround with itsoffset like this
ffmpeg -i video.mkv -itsoffset 0.05 -i subs.ass -c copy output.mkv It seems to work but it is still somewhat problematic because I don't know if the subtitles offset is always 0.05s and always in the same direction. I am muxing wiith .bat batch files and if I have to test every single file again for the delay I could just as well mux them one by one in mkvtoolnix. The whole point of me doing it in ffmpeg command line is that I can automate it with batch. Would still appreciate it if somebody knows why this delay happens in the first place and if there is any command that prevents it. Must be something with timestamps or key frames or the sorts. I have no experience with these things unfortunately. |
12th July 2020, 09:57 | #3 | Link | |
Registered User
Join Date: Dec 2002
Posts: 5,565
|
Quote:
Code:
mkvmerge -o "output.mkv" "video.mkv" "subs.ass" |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|