[FFmpeg-user] Is err_detect working at all?
Nicolas Tardieu
ncls.tardieu at gmail.com
Fri Feb 4 15:29:05 EET 2022
Hello,
I'm used to -xerror but I need a more permissive threshold so I tried
-err_detect. (I was interested in the 'careful' option)
But -err_detect does not seem to have any impact, whatever flag is passed.
I tried corrupted audio or video files, ffmpeg 4.4 and 5, different
encoders.
Here is an example where I would expect '-err_detect explode' to return a
failed conversion and exit_code !=0.
Am I doing something wrong or is it just not the way it is supposed to work?
Thanks
ffmpeg -err_detect explode -i "/Users/xxx/Desktop/2_f_audio_stream_2.mp4" -vn
-c:a aac -b:a 96k -ar 48000 "/Users/xxx/Desktop/out.mp4" -loglevel debug -y
ffmpeg version 5.0 Copyright (c) 2000-2022 the FFmpeg developers
built with Apple clang version 12.0.0 (clang-1200.0.32.29)
configuration: --prefix=/usr/local/Cellar/ffmpeg/5.0-with-options
--enable-shared --cc=clang --host-cflags= --host-ldflags= --enable-gpl
--enable-libaom --enable-libdav1d --enable-libmp3lame --enable-libopus
--enable-libsnappy --enable-libtheora --enable-libvmaf --enable-libvorbis
--enable-libvpx --enable-libx264 --enable-libx265 --enable-libfontconfig
--enable-libfreetype --enable-frei0r --enable-libass --enable-demuxer=dash
--enable-opencl --enable-videotoolbox --disable-htmlpages
--enable-libfdk-aac --enable-nonfree
libavutil 57. 17.100 / 57. 17.100
libavcodec 59. 18.100 / 59. 18.100
libavformat 59. 16.100 / 59. 16.100
libavdevice 59. 4.100 / 59. 4.100
libavfilter 8. 24.100 / 8. 24.100
libswscale 6. 4.100 / 6. 4.100
libswresample 4. 3.100 / 4. 3.100
libpostproc 56. 3.100 / 56. 3.100
Splitting the commandline.
Reading option '-err_detect' ...Routing option err_detect to both codec and
muxer layer
matched as AVOption 'err_detect' with argument 'explode'.
Reading option '-i' ... matched as input url with argument '/Users/xxx
/Desktop/2_f_audio_stream_2.mp4'.
Reading option '-vn' ... matched as option 'vn' (disable video) with
argument '1'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument
'aac'.
Reading option '-b:a' ... matched as option 'b' (video bitrate (please use
-b:v)) with argument '96k'.
Reading option '-ar' ... matched as option 'ar' (set audio sampling rate
(in Hz)) with argument '48000'.
Reading option '/Users/xxx/Desktop/out.mp4' ... matched as output url.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging
level) with argument 'debug'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with
argument '1'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url /Users/xxx
/Desktop/2_f_audio_stream_2.mp4.
Successfully parsed a group of options.
Opening an input file: /Users/xxx/Desktop/2_f_audio_stream_2.mp4.
[NULL @ 0x7fb628904d40] Opening '/Users/xxx/Desktop/2_f_audio_stream_2.mp4'
for reading
[file @ 0x7fb628905180] Setting default whitelist 'file,crypto,data'
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb628904d40] Format mov,mp4,m4a,3gp,3g2,mj2
probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb628904d40] ISO: File Type Major Brand: isom
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb628904d40] Unknown dref type 0x206c7275
size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb628904d40] Processing st: 0, edit list 0 -
media time: 1024, duration: 32221440
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb628904d40] drop a frame at curr_cts: 0 @ 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb628904d40] Before
avformat_find_stream_info() pos: 21680592 bytes read:159551 seeks:1
nb_streams:1
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb628904d40] demuxer injecting skip 1024 /
discard 0
[aac @ 0x7fb628905b80] skip 1024 / discard 0 samples due to side data
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb628904d40] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb628904d40] After
avformat_find_stream_info() pos: 122 bytes read:192319 seeks:2 frames:1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/xxx
/Desktop/2_f_audio_stream_2.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf59.16.100
Duration: 00:11:11.28, start: 0.000000, bitrate: 258 kb/s
Stream #0:0[0x1](und), 1, 1/48000: Audio: aac (LC) (mp4a / 0x6134706D),
48000 Hz, stereo, fltp, 256 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Successfully opened the file.
Parsing a group of options: output url /Users/xxx/Desktop/out.mp4.
Applying option vn (disable video) with argument 1.
Applying option c:a (codec name) with argument aac.
Applying option b:a (video bitrate (please use -b:v)) with argument 96k.
Applying option ar (set audio sampling rate (in Hz)) with argument 48000.
Successfully parsed a group of options.
Opening an output file: /Users/xxx/Desktop/out.mp4.
[file @ 0x7fb628908280] Setting default whitelist 'file,crypto,data'
Successfully opened the file.
Stream mapping:
Stream #0:0 -> #0:0 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if
it occurs once at the start per stream)
[aac @ 0x7fb628909580] skip 1024 / discard 0 samples due to side data
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if
it occurs once at the start per stream)
detected 12 logical cores
[graph_0_in_0_0 @ 0x7fb628d043c0] Setting 'time_base' to value '1/48000'
[graph_0_in_0_0 @ 0x7fb628d043c0] Setting 'sample_rate' to value '48000'
[graph_0_in_0_0 @ 0x7fb628d043c0] Setting 'sample_fmt' to value 'fltp'
[graph_0_in_0_0 @ 0x7fb628d043c0] Setting 'channel_layout' to value '0x3'
[graph_0_in_0_0 @ 0x7fb628d043c0] tb:1/48000 samplefmt:fltp
samplerate:48000 chlayout:0x3
[format_out_0_0 @ 0x7fb628d04740] Setting 'sample_fmts' to value 'fltp'
[format_out_0_0 @ 0x7fb628d04740] Setting 'sample_rates' to value '48000'
[AVFilterGraph @ 0x7fb62890b800] query_formats: 4 queried, 9 merged, 0
already done, 0 delayed
Output #0, mp4, to '/Users/xxx/Desktop/out.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf59.16.100
Stream #0:0(und), 0, 1/48000: Audio: aac (LC) (mp4a / 0x6134706D), 48000
Hz, stereo, fltp, delay 1024, 96 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
encoder : Lavc59.18.100 aac
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if
it occurs once at the start per stream)
[aac @ 0x7fb628909580] error in spectral data, ESC overflowd=43.5x
Error while decoding stream #0:0: Invalid data found when processing input
[out_0_0 @ 0x7fb628d045c0] EOF on sink link out_0_0:default.=45.4x
No more output streams to write to, finishing.
size= 7976kB time=00:11:11.29 bitrate= 97.3kbits/s speed=45.5x
video:0kB audio:7852kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 1.576995%
Input file #0 (/Users/xxx/Desktop/2_f_audio_stream_2.mp4):
Input stream #0:0 (audio): 31468 packets read (21553765 bytes); 31466
frames decoded (32221184 samples);
Total: 31468 packets (21553765 bytes) demuxed
Output file #0 (/Users/xxx/Desktop/out.mp4):
Output stream #0:0 (audio): 31466 frames encoded (32221184 samples);
31467 packets muxed (8040801 bytes);
Total: 31467 packets (8040801 bytes) muxed
[AVIOContext @ 0x7fb628908380] Statistics: 8167608 bytes written, 2 seeks,
34 writeouts
31466 frames successfully decoded, 1 decoding errors
[aac @ 0x7fb628907640] Qavg: 532.756
[AVIOContext @ 0x7fb628905300] Statistics: 21720895 bytes read, 2 seeks
More information about the ffmpeg-user
mailing list