Skip to content

[MacOS] ffmpeg EXC_BAD_ACCESS (ffmpeg init_intra_predictors_internal at EbIntraPrediction.c)

Created by: FreddyX078

MacOS version is 10.15.2 - Git ffmpeg and svt-av1

Using SVT-AV1 today and standalone is working fast and fine. Trying with ffmpeg (static) result in a crash:

Process 16491 launched: '/usr/local/bin/ffmpeg' (x86_64)
ffmpeg version 20200104-static Copyright (c) 2000-2020 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.16)
  configuration: --cpu=native --prefix=/tmp/working --extra-cflags=-I/tmp/working/include --extra-cflags=-fno-stack-check --extra-cflags='-march=native' --extra-ldflags=-L/tmp/working/lib --extra-libs=-lfontconfig --pkg-config-flags=--static --extra-version=static --disable-shared --enable-static --enable-hardcoded-tables --disable-doc --enable-gpl --enable-version3 --enable-runtime-cpudetect --enable-libfreetype --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libx265 --enable-librav1e --enable-libdav1d --enable-libsvthevc --enable-libsvtav1 --enable-libfdk-aac --enable-avfilter --enable-libfribidi --enable-libass --enable-libopencore-amrwb --enable-libopencore-amrnb --enable-filters --enable-libvidstab --enable-videotoolbox --enable-opengl --enable-opencl --enable-libopenjpeg --enable-appkit --enable-avfoundation --enable-coreimage --enable-audiotoolbox --enable-debug --disable-optimizations --disable-stripping
  libavutil      56. 38.100 / 56. 38.100
  libavcodec     58. 65.102 / 58. 65.102
  libavformat    58. 35.101 / 58. 35.101
  libavdevice    58.  9.102 / 58.  9.102
  libavfilter     7. 70.101 /  7. 70.101
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Splitting the commandline.
Reading option '-i' ... matched as input url with argument 'footage.mov'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'libsvt_av1'.
Reading option '-rc' ... matched as AVOption 'rc' with argument '0'.
Reading option '-qp' ... matched as AVOption 'qp' with argument '28'.
Reading option '-an' ... matched as option 'an' (disable audio) with argument '1'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option 'svt-av1.mp4' ... matched as output url.
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 footage.mov.
Successfully parsed a group of options.
Opening an input file: footage.mov.
[NULL @ 0x110800000] Opening 'footage.mov' for reading
[file @ 0x110001f00] Setting default whitelist 'file,crypto'
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x110800000] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x110800000] ISO: File Type Major Brand: qt  
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x110800000] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x110800000] Processing st: 0, edit list 0 - media time: 0, duration: 320000
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x110800000] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x110800000] Processing st: 1, edit list 0 - media time: 0, duration: 320000
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x110800000] Before avformat_find_stream_info() pos: 2387021465 bytes read:71857 seeks:3 nb_streams:2
[prores @ 0x110801000] Auto bitdepth precision. Use 10b decoding based on codec tag.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x110800000] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x110800000] After avformat_find_stream_info() pos: 3713480 bytes read:3785301 seeks:4 frames:2
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'footage.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 512
    compatible_brands: qt  
    encoder         : Lavf58.27.103
  Duration: 00:00:25.00, start: 0.000000, bitrate: 763846 kb/s
    Stream #0:0(eng), 1, 1/12800: Video: prores (HQ), 1 reference frame (apch / 0x68637061), yuv422p10le(tv, bt709, progressive), 3840x2160, 0/1, 763844 kb/s, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default)
    Metadata:
      handler_name    : Core Media Video
      encoder         : Apple ProRes 422 HQ
      timecode        : 09:04:57:19
    Stream #0:1(eng), 1, 1/12800: Data: none (tmcd / 0x64636D74), 0/1, 0 kb/s
    Metadata:
      handler_name    : Core Media Video
      timecode        : 09:04:57:19
Successfully opened the file.
Parsing a group of options: output url svt-av1.mp4.
Applying option c:v (codec name) with argument libsvt_av1.
Applying option an (disable audio) with argument 1.
Successfully parsed a group of options.
Opening an output file: svt-av1.mp4.
[file @ 0x1103015c0] Setting default whitelist 'file,crypto'
Successfully opened the file.
detected 12 logical cores
[prores @ 0x113003200] Auto bitdepth precision. Use 10b decoding based on codec tag.
Stream mapping:
  Stream #0:0 -> #0:0 (prores (native) -> av1 (libsvt_av1))
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)
    Last message repeated 13 times
[graph 0 input from stream 0:0 @ 0x117a00580] Setting 'video_size' to value '3840x2160'
[graph 0 input from stream 0:0 @ 0x117a00580] Setting 'pix_fmt' to value '66'
[graph 0 input from stream 0:0 @ 0x117a00580] Setting 'time_base' to value '1/12800'
[graph 0 input from stream 0:0 @ 0x117a00580] Setting 'pixel_aspect' to value '1/1'
[graph 0 input from stream 0:0 @ 0x117a00580] Setting 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 0x117a00580] w:3840 h:2160 pixfmt:yuv422p10le tb:1/12800 fr:25/1 sar:1/1
[format @ 0x117a00a80] Setting 'pix_fmts' to value 'yuv420p|yuv420p10le'
[auto_scaler_0 @ 0x117a01280] Setting 'flags' to value 'bicubic'
[auto_scaler_0 @ 0x117a01280] w:iw h:ih flags:'bicubic' interl:0
[format @ 0x117a00a80] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_null_0' and the filter 'format'
[AVFilterGraph @ 0x110500300] query_formats: 4 queried, 2 merged, 1 already done, 0 delayed
[auto_scaler_0 @ 0x117a01280] picking yuv420p10le out of 2 ref:yuv422p10le alpha:0
[auto_scaler_0 @ 0x117a01280] w:3840 h:2160 fmt:yuv422p10le sar:1/1 -> w:3840 h:2160 fmt:yuv420p10le sar:1/1 flags:0x4
SVT [version]:	SVT-AV1 Encoder Lib v0.8.0
SVT [build]  :	GCC 4.2.1 Compatible Apple LLVM 11.0.0 (clang-1100.0.33.16)	 64 bit
LIB Build date: Jan  4 2020 19:39:26
-------------------------------------------
[libsvt_av1 @ 0x113001200] Encoder 10 bits depth input
[libsvt_av1 @ 0x113001200] Encoder color format is 1 
Number of logical cores available: 12
Number of PPCS 72
[asm level on system : up to avx2]
[asm level selected : up to avx2]
------------------------------------------- 
SVT [config]: Main Profile	Tier (auto)	Level (auto)	
SVT [config]: EncoderMode 							: 8 
SVT [config]: EncoderBitDepth / EncoderColorFormat / CompressedTenBitFormat	: 10 / 1 / 0
SVT [config]: SourceWidth / SourceHeight					: 3840 / 2160 
SVT [config]: Fps_Numerator / Fps_Denominator / Gop Size / IntraRefreshType 	: 25 / 1 / 32 / 1
SVT [config]: HierarchicalLevels / BaseLayerSwitchMode / PredStructure		: 4 / 0 / 2 
SVT [config]: BRC Mode / QP  / LookaheadDistance / SceneChange			: CQP / 28 / 33 / 0 
------------------------------------------- 
Process 16491 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x103f41cf0)
    frame #0: 0x00000001020c2d30 ffmpeg`init_intra_predictors_internal at EbIntraPrediction.c:2547:26
   2544	}
   2545	
   2546	/*static*/ void init_intra_predictors_internal(void) {
-> 2547	    pred[V_PRED][TX_4X4] = eb_aom_v_predictor_4x4;
   2548	    pred[V_PRED][TX_8X8] = eb_aom_v_predictor_8x8;
   2549	    pred[V_PRED][TX_16X16] = eb_aom_v_predictor_16x16;
   2550	    pred[V_PRED][TX_32X32] = eb_aom_v_predictor_32x32;
Target 0: (ffmpeg) stopped.