Opened 2 years ago
Closed 2 years ago
#10916 closed defect (fixed)
CLI hangs instead of exiting on remux error when attempting to mux TX3G to Matroska
| Reported by: | Marth64 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | undetermined |
| Version: | unspecified | Keywords: | |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description (last modified by )
Summary of the bug:
Attempted to remux MP4 to Matroska. Accidentally set -c:s copy from a TX3G track (which cannot fit in Matroska). FFmpeg raises the error to say this is not supported, but then hangs and needs to be killed.
In 6.x, CLI exits properly on error and does not hang.
How to reproduce:
ffmpeg -i "INPUT.mp4" -map 0:0 -codec:0 copy -map 0:1 -codec:1 copy -f matroska "VIDEO.mkv" -map 0:2 -codec:0 copy -metadata:s:0 title=BUG -f matroska "SUBS.mks"
ffmpeg version N-114279-g746c27f314 Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
configuration: --enable-libdvdread --enable-libdvdnav --enable-gpl --enable-demuxer=dvdvideo
libavutil 59. 2.100 / 59. 2.100
libavcodec 61. 1.101 / 61. 1.101
libavformat 61. 0.100 / 61. 0.100
libavdevice 61. 0.100 / 61. 0.100
libavfilter 10. 0.100 / 10. 0.100
libswscale 8. 0.100 / 8. 0.100
libswresample 5. 0.100 / 5. 0.100
libpostproc 58. 0.100 / 58. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'INPUT.mp4':
Metadata:
major_brand : mp42
minor_version : 512
compatible_brands: mp42iso6
creation_time : 2023-10-13T18:11:59.000000Z
title : TITLE
comment : COMMENT
Duration: 00:21:46.46, start: 0.000000, bitrate: 8018 kb/s
Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 7820 kb/s, 23.98 fps, 23.98 tbr, 24k tbn (default)
Metadata:
creation_time : 2023-10-13T18:11:59.000000Z
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:1[0x2](eng): Audio: eac3 (ec-3 / 0x332D6365), 48000 Hz, 5.1(side), fltp, 192 kb/s (default)
Metadata:
creation_time : 2023-10-13T18:11:59.000000Z
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Side data:
audio service type: main
Stream #0:2[0x3](eng): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s (default)
Metadata:
creation_time : 2023-10-13T18:11:59.000000Z
handler_name : English
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Stream #0:2 -> #1:0 (copy)
Output #0, matroska, to 'VIDEO.mkv':
Metadata:
major_brand : mp42
minor_version : 512
compatible_brands: mp42iso6
comment : COMMENT
title : TITLE
encoder : Lavf61.0.100
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 7820 kb/s, 23.98 fps, 23.98 tbr, 1k tbn (default)
Metadata:
creation_time : 2023-10-13T18:11:59.000000Z
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:1(eng): Audio: eac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 192 kb/s (default)
Metadata:
creation_time : 2023-10-13T18:11:59.000000Z
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Side data:
audio service type: main
[matroska @ 0x5577bd257000] Subtitle codec 94213 is not supported.
[out#1/matroska @ 0x5577bd252840] Could not write header (incorrect codec parameters ?): Function not implemented
Conversion failed!
Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.
Change History (8)
comment:1 by , 2 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 2 years ago
| Description: | modified (diff) |
|---|
comment:3 by , 2 years ago
comment:4 by , 2 years ago
Does this still happen? I think it should have been fixed by da17c4d24a35de1bbdea2b657b367da5287ae19d
comment:5 by , 2 years ago
Hi,
It's still happening on master@b89ee2653919c14193f646ba03b2bf1d13c9aa2d
I have been trying to intermittently look into it as well. Thanks for checking it.
comment:6 by , 2 years ago
Then it should be fixed by https://lists.ffmpeg.org//pipermail/ffmpeg-devel/2024-March/324440.html (I didn't notice it actually covers more cases than pthread_create() failing, commit message updated to match).
comment:7 by , 2 years ago
Yes, that patch fixes the issue. ffmpeg closes on the error condition without hanging. Thank you!
comment:8 by , 2 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |



See latest log in description. Ignore first log, was comparing against 6.1 and pasted on accident