[FFmpeg-trac] #9409(undetermined:new): Embedding some mp4 subtitles causes ffmpeg to hang
FFmpeg
trac at avcodec.org
Sun Sep 5 21:42:32 EEST 2021
#9409: Embedding some mp4 subtitles causes ffmpeg to hang
-------------------------------------+-------------------------------------
Reporter: Frank | Owner: (none)
Type: defect | Status: new
Priority: normal | Component:
| undetermined
Version: git-master | Resolution:
Keywords: subtitles | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Description changed by Frank:
Old description:
> I've run into a bug when trying to embed some subtitles into an MP4 file,
> ffmpeg hangs indefinitely with 100% cpu usage on one thread. When this
> happens the output file stops growing and what is usually a few seconds
> job simply does not finish even if left for hours.
>
> This only started happening recently with some videos downloaded from
> youtube-dl. I've tested this and it seems to be an issue with the latest
> version of every 4.x branch - 4.0.6, 4.1.6, 4.2.4, 4.3.2, and the latest
> git build. ffmpeg completes if I try this with the latest 3.4.8 branch,
> but the subtitles are broken and do not appear when selected.
>
> Since I'm not sure where the problem is in the subtitle I can't cut out
> the problem part here for an example. I will attach one of the subtitle
> files that causes the issue and include the youtube-dl command that will
> download the smallest video.
>
> youtube-dl command:
> {{{
> youtube-dl.exe -v -f 160+249 --merge-output-format mp4 --sub-lang bn
> --write-auto-sub --embed-subs 0UlUbeaBCTg
> }}}
>
> ffmpeg command being run by youtube-dl:
> {{{
> ffmpeg -y -loglevel "repeat+info" -i "file:Making Flavored Rum _ Easy and
> Cheap! - Part 1-0UlUbeaBCTg.mp4" -i "file:Making Flavored Rum _ Easy and
> Cheap! - Part 1-0UlUbeaBCTg.bn.vtt" -map 0 -c copy -map "-0:s" -map
> "-0:d" "-c:s" mov_text -map "1:0" "-metadata:s:s:0" "language=ben"
> "file:Making Flavored Rum _ Easy and Cheap! - Part
> 1-0UlUbeaBCTg.temp.mp4"
> }}}
New description:
I've run into a bug when trying to embed some subtitles into an MP4 file,
ffmpeg hangs indefinitely with 100% cpu usage on one thread. When this
happens the output file stops growing and what is usually a few seconds
job simply does not finish even if left for hours.
This only started happening recently with some videos downloaded from
youtube-dl, including some that worked before with no changes in my ffmpeg
version, so I think youtube must've change the way they write their subs.
Additionally I've tested this and it seems to be an issue with the latest
version of every 4.x branch - 4.0.6, 4.1.6, 4.2.4, 4.3.2, and the latest
git build. ffmpeg does complete without errors if I try this with the
latest 3.4.8 branch, but the subtitles are broken and do not appear when
selected during playback.
Since I'm not sure where the problem is in the subtitle I can't cut out
the problem part of the video and attach it for an example since it's too
big. I will attach one of the subtitle files that causes the issue and
include the youtube-dl command that will download the smallest version of
the video.
youtube-dl command:
{{{
youtube-dl.exe -v -f 160+249 --merge-output-format mp4 --sub-lang bn
--write-auto-sub --embed-subs 0UlUbeaBCTg
}}}
ffmpeg command being run by youtube-dl:
{{{
ffmpeg -y -loglevel "repeat+info" -i "file:Making Flavored Rum _ Easy and
Cheap! - Part 1-0UlUbeaBCTg.mp4" -i "file:Making Flavored Rum _ Easy and
Cheap! - Part 1-0UlUbeaBCTg.bn.vtt" -map 0 -c copy -map "-0:s" -map "-0:d"
"-c:s" mov_text -map "1:0" "-metadata:s:s:0" "language=ben" "file:Making
Flavored Rum _ Easy and Cheap! - Part 1-0UlUbeaBCTg.temp.mp4"
}}}
--
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9409#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list