byhook / ffmpeg4android

音视频学习实践,从移植ffmpeg库到android平台,混合编译x264库以及fdk-aac库,到相机音频采集编码推流到RTMP服务器的学习记录
773 stars 258 forks source link

命令行执行失败 #1

Open wuMaoTou opened 5 years ago

wuMaoTou commented 5 years ago

你好,按你博客编译出了ffmpeg.so库,但是执行ffmpeg的命令行成功后却还是报错崩溃,看了日志也没看出哪出问题了,请教一下你

日志如下: ffmpeg version 3.3 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 4.9 (GCC) 20140827 (prerelease) configuration: --prefix=/home/wuchundu/Documents/ffmpeg/ffmpeg/libs/ffmpeg-merge/armeabi-v7a --enable-cross-compile --disable-runtime-cpudetect --disable-asm --arch=armeabi-v7a --target-os=android --cc=/home/wuchundu/Documents/ffmpeg/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --cross-prefix=/home/wuchundu/Documents/ffmpeg/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi- --disable-stripping --nm=/home/wuchundu/Documents/ffmpeg/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-nm --sysroot=/home/wuchundu/Documents/ffmpeg/android-ndk-r10e/platforms/android-14/arch-arm --enable-gpl --enable-nonfree --disable-shared --enable-static --enable-version3 --enable-pthreads --enable-small --disable-vda --disable-iconv --disable-encoders --enable-neon --enable-yasm --enable-encoder=mpeg4 --enable-encoder=mjpeg --enable-encoder=png --enable-nonfree --enable-muxers --enable-muxer=mov --enable-muxer=mp4 --enable-muxer=h264 --enable-muxer=avi --enable-decoder=h264 --enable-decoder=mpeg4 --enable-decoder=mjpeg --enable-decoder=png --enable-demuxer=image2 --enable-demuxer=h264 --enable-demuxer=avi --enable-demuxer=mpc --enable-demuxer=mpegts --enable-demuxer=mov --enable-parser=ac3 --enable-parser=h264 --enable-protocols --enable-zlib --enable-avfilter --enable-avresample --enable-postproc --enable-avdevice --disable-outdevs --disable-ffprobe --disable-ffplay --disable-ffmpeg --disable-ffserver --disable-debug --disable-symver --disable-stripping --extra-cflags='-DANDROID -fPIC -ffunction-sections -funwind-tables -fstack-protector -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -O3 -Wall -pipe -ffast-math -fstrict-aliasing -Werror=strict-aliasing -Wno-psabi -Wa,--noexecstack -DANDROID ' --extra-ldflags= libavutil 55. 58.100 / 55. 58.100 libavcodec 57. 89.100 / 57. 89.100 libavformat 57. 71.100 / 57. 71.100 libavdevice 57. 6.100 / 57. 6.100 libavfilter 6. 82.100 / 6. 82.100 libavresample 3. 5. 0 / 3. 5. 0 libswscale 4. 6.100 / 4. 6.100 libswresample 2. 7.100 / 2. 7.100 libpostproc 54. 5.100 / 54. 5.100 Splitting the commandline. Reading option '-i' ... matched as input url with argument '/sdcard/JCamera/video_1541474028496.mp4'. Reading option '-i' ... matched as input url with argument '/sdcard/JCamera/tuya.png'. Reading option '-r' ... matched as option 'r' (set frame rate (Hz value, fraction or abbreviation)) with argument '25'. Reading option '-b' ... matched as option 'b' (video bitrate (please use -b:v)) with argument '4000000'. Reading option '-s' ... matched as option 's' (set frame size (WxH or abbreviation)) with argument '720x1280'. Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'copy'. Reading option '-filter_complex' ... matched as option 'filter_complex' (create a complex filtergraph) with argument 'overlay=0:0'. Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'. Reading option '/storage/emulated/0/Android/data/com.maotou.mybuildffmpegdemo/files/finish.mp4' ... matched as output url. Finished splitting the commandline. Parsing a group of options: global . Applying option filter_complex (create a complex filtergraph) with argument overlay=0:0. Applying option y (overwrite output files) with argument 1. Successfully parsed a group of options. Parsing a group of options: input url /sdcard/JCamera/video_1541474028496.mp4. Successfully parsed a group of options. Opening an input file: /sdcard/JCamera/video_1541474028496.mp4. Setting default whitelist 'file,crypto' Probing mov,mp4,m4a,3gp,3g2,mj2 score:100 size:2048 Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100 type:'ftyp' parent:'root' sz: 24 8 1325620 ISO: File Type Major Brand: mp42 type:'moov' parent:'root' sz: 1639 32 1325620 type:'mvhd' parent:'moov' sz: 108 8 1631 time scale = 1000 type:'meta' parent:'moov' sz: 121 116 1631 type:'hdlr' parent:'meta' sz: 33 8 113 ctype=[0][0][0][0] stype=mdta type:'keys' parent:'meta' sz: 43 41 113 type:'ilst' parent:'meta' sz: 37 84 113 type:'[0][0][0][1]' parent:'ilst' sz: 29 8 29 type:'trak' parent:'moov' sz: 847 237 1631 type:'tkhd' parent:'trak' sz: 92 8 839 type:'mdia' parent:'trak' sz: 747 100 839 type:'mdhd' parent:'mdia' sz: 32 8 739 type:'hdlr' parent:'mdia' sz: 44 40 739 ctype=[0][0][0][0] stype=vide type:'minf' parent:'mdia' sz: 663 84 739 type:'vmhd' parent:'minf' sz: 20 8 655 type:'dinf' parent:'minf' sz: 36 28 655 type:'dref' parent:'dinf' sz: 28 8 28 Unknown dref type 0x206c7275 size 12 type:'stbl' parent:'minf' sz: 599 64 655 type:'stsd' parent:'stbl' sz: 155 8 591 size=139 4CC=avc1 codec_type=0 type:'avcC' parent:'stsd' sz: 37 8 53 type:'pasp' parent:'stsd' sz: 16 45 53 type:'stts' parent:'stbl' sz: 136 163 591 track[0].stts.entries = 15 sample_count=1, sample_duration=6263 sample_count=8, sample_duration=4551 sample_count=2, sample_duration=4694 sample_count=2, sample_duration=4823 sample_count=2, sample_duration=4977 sample_count=2, sample_duration=5115 sample_count=2, sample_duration=5279 sample_count=2, sample_duration=5426 sample_count=2, sample_duration=5600 sample_count=2, sample_duration=5587 sample_count=2, sample_duration=5600 sample_count=2, sample_duration=5588 sample_count=2, sample_duration=5600 sample_count=1, sample_duration=5587 sample_count=12, sample_duration=5432 type:'stss' parent:'stbl' sz: 24 299 591 keyframe_count = 2 type:'stsz' parent:'stbl' sz: 196 323 591 sample_size = 0 sample_count = 44 type:'stsc' parent:'stbl' sz: 52 519 591 track[0].stsc.entries = 3 type:'stco' parent:'stbl' sz: 28 571 591 AVIndex stream 0, sample 0, offset c9b, dts 0, size 20101, distance 0, keyframe 1 AVIndex stream 0, sample 1, offset 5b20, dts 6263, size 1825, distance 1, keyframe 0 AVIndex stream 0, sample 2, offset 6241, dts 10814, size 4540, distance 2, keyframe 0 AVIndex stream 0, sample 3, offset 73fd, dts 15365, size 10080, distance 3, keyframe 0 AVIndex stream 0, sample 4, offset 9b5d, dts 19916, size 10274, distance 4, keyframe 0 AVIndex stream 0, sample 5, offset c37f, dts 24467, size 17211, distance 5, keyframe 0 AVIndex stream 0, sample 6, offset 106ba, dts 29018, size 26059, distance 6, keyframe 0 AVIndex stream 0, sample 7, offset 16c85, dts 33569, size 31699, distance 7, keyframe 0 AVIndex stream 0, sample 8, offset 1e858, dts 38120, size 32333, distance 8, keyframe 0 AVIndex stream 0, sample 9, offset 266a5, dts 42671, size 35109, distance 9, keyframe 0 AVIndex stream 0, sample 10, offset 2efca, dts 47365, size 28527, distance 10, keyframe 0 AVIndex stream 0, sample 11, offset 35f39, dts 52059, size 35970, distance 11, keyframe 0 AVIndex stream 0, sample 12, offset 3ebbb, dts 56882, size 31165, distance 12, keyframe 0 AVIndex stream 0, sample 13, offset 46578, dts 61705, size 30188, distance 13, keyframe 0 AVIndex stream 0, sample 14, offset 4db64, dts 66682, size 36415, distance 14, keyframe 0 AVIndex stream 0, sample 15, offset 569a3, dts 71659, size 25643, distance 15, keyframe 0 AVIndex stream 0, sample 16, offset 5cdce, dts 76774, size 42607, distance 16, keyframe 0 AVIndex stream 0, sample 17, offset 6743d, dts 81889, size 28025, distance 17, keyframe 0 AVIndex stream 0, sample 18, offset 6e1b6, dts 87168, size 33849, distance 18, keyframe 0 AVIndex stream 0, sample 19, offset 765ef, dts 92447, size 28990, distance 19, keyframe 0 AVIndex stream 0, sample 20, offset 7d72d, dts 97873, size 37670, distance 20, keyframe 0 AVIndex stream 0, sample 21, offset 871f3, dts 103299, size 36329, distance 21, keyframe 0 AVIndex stream 0, sample 22, offset 8ffdc, dts 108899, size 40909, distance 22, keyframe 0 AVIndex stream 0, sample 23, offset 99fa9, dts 114499, size 30203, distance 23, keyframe 0 AVIndex stream 0, sample 24, offset a15a4, dts 120086, size 39542, distance 24, keyframe 0 AVIndex stream 0, sample 25, offset ab01a, dts 125673, size 31179, distance 25, keyframe 0 AVIndex stream 0, sample 26, offset b29e5, dts 131273, size 39007, distance 26, keyframe 0 AVIndex stream 0, sample 27, offset bc244, dts 136873, size 32675, distance 27, keyframe 0 AVIndex stream 0, sample 28, offset c41e7, dts 142461, size 45485, distance 28, keyframe 0 AVIndex stream 0, sample 29, offset cf394, dts 148049, size 37764, distance 29, keyframe 0 AVIndex stream 0, sample 30, offset d8718, dts 153649, size 28061, distance 0, keyframe 1 AVIndex stream 0, sample 31, offset df4b5, dts 159249, size 37513, distance 1, keyframe 0 AVIndex stream 0, sample 32, offset e873e, dts 164836, size 17893, distance 2, keyframe 0 AVIndex stream 0, sample 33, offset ecd23, dts 170268, size 45519, distance 3, keyframe 0 AVIndex stream 0, sample 34, offset f7ef2, dts 175700, size 18694, distance 4, keyframe 0 AVIndex stream 0, sample 35, offset fc7f8, dts 181132, size 29079, distance 5, keyframe 0 AVIndex stream 0, sample 36, offset 10398f, dts 186564, size 24617, distance 6, keyframe 0 AVIndex stream 0, sample 37, offset 1099b8, dts 191996, size 35011, distance 7, keyframe 0 AVIndex stream 0, sample 38, offset 112894, dts 197428, size 32521, distance 8, keyframe 0 AVIndex stream 0, sample 39, offset 11a79d, dts 202860, size 35573, distance 9, keyframe 0 AVIndex stream 0, sample 40, offset 123292, dts 208292, size 33151, distance 10, keyframe 0 AVIndex stream 0, sample 41, offset 12b411, dts 213724, size 32287, distance 11, keyframe 0 AVIndex stream 0, sample 42, offset 133230, dts 219156, size 32662, distance 12, keyframe 0 AVIndex stream 0, sample 43, offset 13b1c6, dts 224588, size 34535, distance 13, keyframe 0 type:'trak' parent:'moov' sz: 555 1084 1631 type:'tkhd' parent:'trak' sz: 92 8 547 type:'mdia' parent:'trak' sz: 455 100 547 type:'mdhd' parent:'mdia' sz: 32 8 447 type:'hdlr' parent:'mdia' sz: 44 40 447 ctype=[0][0][0][0] stype=soun type:'minf' parent:'mdia' sz: 371 84 447 type:'smhd' parent:'minf' sz: 16 8 363 type:'dinf' parent:'minf' sz: 36 24 363 type:'dref' parent:'dinf' sz: 28 8 28 Unknown dref type 0x206c7275 size 12 type:'stbl' parent:'minf' sz: 311 60 363 type:'stsd' parent:'stbl' sz: 91 8 303 size=75 4CC=mp4a codec_type=1 audio channels 1 version =0, isom =1 type:'esds' parent:'stsd' sz: 39 8 39 MPEG-4 description: tag=0x03 len=25 MPEG-4 description: tag=0x04 len=17 esds object type id 0x40 MPEG-4 description: tag=0x05 len=2 Specific MPEG-4 header len=2 mp4a config channels 1 obj 2 ext obj 0 sample rate 8000 ext sample rate 0 type:'stts' parent:'stbl' sz: 32 99 303 track[1].stts.entries = 2 sample_count=1, sample_duration=1024 sample_count=19, sample_duration=1024 type:'stsz' parent:'stbl' sz: 100 131 303 sample_size = 0 sample_count = 20 type:'stsc' parent:'stbl' sz: 52 231 303 track[1].stsc.entries = 3 type:'stco' parent:'stbl' sz: 28 283 303 AVIndex stream 1, sample 0, offset 86a53, dts 0, size 195, distance 0, keyframe 1 AVIndex stream 1, sample 1, offset 86b16, dts 1024, size 195, distance 0, keyframe 1 AVIndex stream 1, sample 2, offset 86bd9, dts 2048, size 195, distance 0, keyframe 1 AVIndex stream 1, sample 3, offset 86c9c, dts 3072, size 195, distance 0, keyframe 1 AVIndex stream 1, sample 4, offset 86d5f, dts 4096, size 196, distance 0, keyframe 1 AVIndex stream 1, sample 5, offset 86e23, dts 5120, size 195, distance 0, keyframe 1 AVIndex stream 1, sample 6, offset 86ee6, dts 6144, size 195, distance 0, keyframe 1 AVIndex stream 1, sample 7, offset 86fa9, dts 7168, size 195, distance 0, keyframe 1 AVIndex stream 1, sample 8, offset 8706c, dts 8192, size 195, distance 0, keyframe 1 AVIndex stream 1, sample 9, offset 8712f, dts 9216, size 196, distance 0, keyframe 1 AVIndex stream 1, sample 10, offset 11227b, dts 10240, size 205, distance 0, keyframe 1 AVIndex stream 1, sample 11, offset 112348, dts 11264, size 186, distance 0, keyframe 1 AVIndex stream 1, sample 12, offset 112402, dts 12288, size 194, distance 0, keyframe 1 AVIndex stream 1, sample 13, offset 1124c4, dts 13312, size 199, distance 0, keyframe 1 AVIndex stream 1, sample 14, offset 11258b, dts 14336, size 192, distance 0, keyframe 1 AVIndex stream 1, sample 15, offset 11264b, dts 15360, size 195, distance 0, keyframe 1 AVIndex stream 1, sample 16, offset 11270e, dts 16384, size 195, distance 0, keyframe 1 AVIndex stream 1, sample 17, offset 1127d1, dts 17408, size 195, distance 0, keyframe 1 AVIndex stream 1, sample 18, offset 1438ad, dts 18432, size 195, distance 0, keyframe 1 AVIndex stream 1, sample 19, offset 143970, dts 19456, size 196, distance 0, keyframe 1 type:'free' parent:'root' sz: 1556 1671 1325620 type:'mdat' parent:'root' sz: 1322401 3227 1325620 on_parse_exit_offset=3227 Before avformat_find_stream_info() pos: 3227 bytes read:32768 seeks:0 nb_streams:2 nal_unit_type: 7, nal_ref_idc: 3 nal_unit_type: 8, nal_ref_idc: 3 stream 0, sample 0, dts 0 stream 1, sample 0, dts 0 nal_unit_type: 5, nal_ref_idc: 3 Reinit context to 1280x720, pix_fmt: yuv420p stream 0, sample 1, dts 69589 stream 1, sample 0, dts 0 nal_unit_type: 1, nal_ref_idc: 2 stream 0, sample 2, dts 120156 stream 1, sample 0, dts 0 nal_unit_type: 1, nal_ref_idc: 2 stream 0, sample 3, dts 170722 stream 1, sample 0, dts 0 nal_unit_type: 1, nal_ref_idc: 2 stream 0, sample 4, dts 221289 stream 1, sample 0, dts 0 nal_unit_type: 1, nal_ref_idc: 2 stream 0, sample 5, dts 271856 stream 1, sample 0, dts 0 nal_unit_type: 1, nal_ref_idc: 2 stream 0, sample 6, dts 322422 stream 1, sample 0, dts 0 nal_unit_type: 1, nal_ref_idc: 2 stream 0, sample 7, dts 372989 stream 1, sample 0, dts 0 stream 0, sample 8, dts 423556 stream 1, sample 0, dts 0 stream 0, sample 9, dts 474122 stream 1, sample 0, dts 0 stream 0, sample 10, dts 526278 stream 1, sample 0, dts 0 stream 0, sample 11, dts 578433 stream 1, sample 0, dts 0 stream 0, sample 12, dts 632022 stream 1, sample 0, dts 0 stream 0, sample 13, dts 685611 stream 1, sample 0, dts 0 stream 0, sample 14, dts 740911 stream 1, sample 0, dts 0 stream 0, sample 15, dts 796211 stream 1, sample 0, dts 0 stream 0, sample 16, dts 853044 stream 1, sample 0, dts 0 stream 0, sample 17, dts 909878 stream 1, sample 0, dts 0 stream 0, sample 18, dts 968533 stream 1, sample 0, dts 0 stream 0, sample 19, dts 1027189 stream 1, sample 0, dts 0 stream 0, sample 19, dts 1027189 stream 1, sample 1, dts 128000 stream 0, sample 20, dts 1087478 stream 1, sample 1, dts 128000 All info found stream 0: start_time: 0.000 duration: 2.556 stream 1: start_time: 0.000 duration: 2.560 format: start_time: 0.000 duration: 2.560 bitrate=4142 kb/s After avformat_find_stream_info() pos: 551507 bytes read:590948 seeks:2 frames:22 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/sdcard/JCamera/video_1541474028496.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2018-11-06T03:13:51.000000Z com.android.version: 6.0.1 Duration: 00:00:02.56, start: 0.000000, bitrate: 4142 kb/s Stream #0:0(eng), 21, 1/90000: Video: h264 (avc1 / 0x31637661), yuv420p, 1280x720, 4127 kb/s, SAR 1:1 DAR 16:9, 17.22 fps, 90k tbr, 90k tbn, 180k tbc (default) Metadata: rotate : 90 creation_time : 2018-11-06T03:13:51.000000Z handler_name : VideoHandle Side data: displaymatrix: rotation of -90.00 degrees Stream #0:1(eng), 1, 1/8000: Audio: aac (mp4a / 0x6134706D), 8000 Hz, mono, fltp, 12 kb/s (default) Metadata: creation_time : 2018-11-06T03:13:51.000000Z handler_name : SoundHandle Successfully opened the file. Parsing a group of options: input url /sdcard/JCamera/tuya.png. Successfully parsed a group of options. Opening an input file: /sdcard/JCamera/tuya.png. Setting default whitelist 'file,crypto' Probing image2 score:50 size:2048 Probing mp3 score:1 size:2048 Probing png_pipe score:99 size:2048 Format png_pipe probed with size=2048 and score=99 Before avformat_find_stream_info() pos: 0 bytes read:32768 seeks:0 nb_streams:1 stream 0: start_time: -368934881474191040.000 duration: -368934881474191040.000 format: start_time: -9223372036854.775 duration: -9223372036854.775 bitrate=0 kb/s After avformat_find_stream_info() pos: 51138 bytes read:51138 seeks:0 frames:1 Input #1, png_pipe, from '/sdcard/JCamera/tuya.png': Duration: N/A, bitrate: N/A Stream #1:0, 1, 1/25: Video: png, rgba(pc), 720x1280, 25 tbr, 25 tbn, 25 tbc Successfully opened the file. detected 6 logical cores Setting 'x' to value '0' Setting 'y' to value '0' Parsing a group of options: output url /storage/emulated/0/Android/data/com.maotou.mybuildffmpegdemo/files/finish.mp4. Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 25. Applying option b (video bitrate (please use -b:v)) with argument 4000000. Please use -b:a or -b:v, -b is ambiguous Applying option s (set frame size (WxH or abbreviation)) with argument 720x1280. Applying option acodec (force audio codec ('copy' to copy stream)) with argument copy. Successfully parsed a group of options. Opening an output file: /storage/emulated/0/Android/data/com.maotou.mybuildffmpegdemo/files/finish.mp4. Setting default whitelist 'file,crypto' Successfully opened the file. nal_unit_type: 7, nal_ref_idc: 3 nal_unit_type: 8, nal_ref_idc: 3 Stream mapping: Stream #0:0 (h264) -> overlay:main Stream #1:0 (png) -> overlay:overlay overlay -> Stream #0:0 (mpeg4) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) nal_unit_type: 5, nal_ref_idc: 3 Reinit context to 1280x720, pix_fmt: yuv420p cur_dts is invalid (this is harmless if it occurs once at the start per stream) nal_unit_type: 1, nal_ref_idc: 2 cur_dts is invalid (this is harmless if it occurs once at the start per stream) nal_unit_type: 1, nal_ref_idc: 2 cur_dts is invalid (this is harmless if it occurs once at the start per stream) nal_unit_type: 1, nal_ref_idc: 2 cur_dts is invalid (this is harmless if it occurs once at the start per stream) nal_unit_type: 1, nal_ref_idc: 2 cur_dts is invalid (this is harmless if it occurs once at the start per stream) nal_unit_type: 1, nal_ref_idc: 2 nal_unit_type: 1, nal_ref_idc: 2 cur_dts is invalid (this is harmless if it occurs once at the start per stream) cur_dts is invalid (this is harmless if it occurs once at the start per stream) Setting 'x' to value '0' Setting 'y' to value '0' Setting 'video_size' to value '1280x720' Setting 'pix_fmt' to value '0' Setting 'time_base' to value '1/90000' Setting 'pixel_aspect' to value '1/1' Setting 'sws_param' to value 'flags=2' Setting 'frame_rate' to value '198000/11501' w:1280 h:720 pixfmt:yuv420p tb:1/90000 fr:198000/11501 sar:1/1 sws_param:flags=2 Setting 'dir' to value 'clock' Setting 'video_size' to value '720x1280' Setting 'pix_fmt' to value '28' Setting 'time_base' to value '1/25' Setting 'pixel_aspect' to value '0/1' Setting 'sws_param' to value 'flags=2' Setting 'frame_rate' to value '25/1' w:720 h:1280 pixfmt:rgba tb:1/25 fr:25/1 sar:0/1 sws_param:flags=2 Setting 'w' to value '720' Setting 'h' to value '1280' Setting 'flags' to value 'bicubic' w:720 h:1280 flags:'bicubic' interl:0 compat: called with args=[yuv420p] Setting 'pix_fmts' to value 'yuv420p' w:iw h:ih flags:'bilinear' interl:0 auto-inserting filter 'auto_scaler_0' between the filter 'graph 0 input from stream 1:0' and the filter 'Parsed_overlay_0' query_formats: 7 queried, 5 merged, 1 already done, 0 delayed w:1280 h:720 dir:1 -> w:720 h:1280 rotation:clockwise vflip:0 w:720 h:1280 fmt:rgba sar:0/1 -> w:720 h:1280 fmt:yuva420p sar:0/1 flags:0x2 main w:720 h:1280 fmt:yuv420p overlay w:720 h:1280 fmt:yuva420p eof_action:repeat Selected 1/90000 time base Sync level 2 w:720 h:1280 fmt:yuv420p sar:1/1 -> w:720 h:1280 fmt:yuv420p sar:1/1 flags:0x4 Incoming frame (time:0) from link #0 Incoming frame (time:0) from link #1 n:1.000000 t:0.000000 pos:3227.000000 x:0.000000 xi:0 y:0.000000 yi:0 intra_quant_bias = 0 inter_quant_bias = -64 Output #0, mp4, to '/storage/emulated/0/Android/data/com.maotou.mybuildffmpegdemo/files/finish.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 com.android.version: 6.0.1 encoder : Lavf57.71.100 Stream #0:0, 0, 1/12800: Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 720x1280 [SAR 1:1 DAR 9:16], q=2-31, 4000 kb/s, 25 fps, 12800 tbn, 25 tbc (default) Metadata: encoder : Lavc57.89.100 mpeg4 Side data: cpb: bitrate max/min/avg: 0/0/4000000 buffer size: 0 vbv_delay: -1 Stream #0:1(eng), 0, 1/8000: Audio: aac ([64][0][0][0] / 0x0040), 8000 Hz, mono, fltp, 12 kb/s (default) Metadata: creation_time : 2018-11-06T03:13:51.000000Z handler_name : SoundHandle Clipping frame in rate conversion by 0.000008 cur_dts is invalid (this is harmless if it occurs once at the start per stream) nal_unit_type: 1, nal_ref_idc: 2 Incoming frame (time:0.0695889) from link #0 cur_dts is invalid (this is harmless if it occurs once at the start per stream) nal_unit_type: 1, nal_ref_idc: 2 Incoming frame (time:0.120156) from link #0 cur_dts is invalid (this is harmless if it occurs once at the start per stream) nal_unit_type: 1, nal_ref_idc: 2 Incoming frame (time:0.170722) from link #0 frame= 1 fps=0.0 q=5.6 size= 0kB time=00:00:00.00 bitrate= 0.0kbits/s speed=0.000147x
cur_dts is invalid (this is harmless if it occurs once at the start per stream) nal_unit_type: 1, nal_ref_idc: 2 Incoming frame (time:0.221289) from link #0 cur_dts is invalid (this is harmless if it occurs once at the start per stream) nal_unit_type: 1, nal_ref_idc: 2 Incoming frame (time:0.271856) from link #0 cur_dts is invalid (this is harmless if it occurs once at the start per stream) nal_unit_type: 1, nal_ref_idc: 2 Incoming frame (time:0.322422) from link #0 cur_dts is invalid (this is harmless if it occurs once at the start per stream) stream 0, sample 21, dts 1147767 nal_unit_type: 1, nal_ref_idc: 2 stream 1, sample 1, dts 128000 Incoming frame (time:0.372989) from link #0 cur_dts is invalid (this is harmless if it occurs once at the start per stream) stream 0, sample 21, dts 1147767 nal_unit_type: 1, nal_ref_idc: 2 stream 1, sample 2, dts 256000 Incoming frame (time:0.423556) from link #0 cur_dts is invalid (this is harmless if it occurs once at the start per stream) stream 0, sample 21, dts 1147767 nal_unit_type: 1, nal_ref_idc: 2 stream 1, sample 3, dts 384000 Incoming frame (time:0.474122) from link #0 cur_dts is invalid (this is harmless if it occurs once at the start per stream) stream 0, sample 21, dts 1147767 stream 1, sample 4, dts 512000 nal_unit_type: 1, nal_ref_idc: 2 Incoming frame (time:0.526278) from link #0 cur_dts is invalid (this is harmless if it occurs once at the start per stream) stream 0, sample 21, dts 1147767 nal_unit_type: 1, nal_ref_idc: 2 stream 1, sample 5, dts 640000 Incoming frame (time:0.578433) from link #0 cur_dts is invalid (this is harmless if it occurs once at the start per stream) stream 0, sample 21, dts 1147767 stream 1, sample 6, dts 768000 nal_unit_type: 1, nal_ref_idc: 2 Incoming frame (time:0.632022) from link #0 cur_dts is invalid (this is harmless if it occurs once at the start per stream) stream 0, sample 21, dts 1147767 stream 1, sample 7, dts 896000 n:13.000000 t:0.069589 pos:23328.000000 x:0.000000 xi:0 y:0.000000 yi:0 1 dup! stream 0, sample 21, dts 1147767 nal_unit_type: 1, nal_ref_idc: 2 Incoming frame (time:0.685611) from link #0 stream 1, sample 8, dts 1024000 n:13.000000 t:0.120156 pos:25153.000000 x:0.000000 xi:0 y:0.000000 yi:0 n:13.000000 t:0.170722 pos:29693.000000 x:0.000000 xi:0 y:0.000000 yi:0 n:13.000000 t:0.221289 pos:39773.000000 x:0.000000 xi:0 y:0.000000 yi:0 n:13.000000 t:0.271856 pos:50047.000000 x:0.000000 xi:0 y:0.000000 yi:0 n:13.000000 t:0.322422 pos:67258.000000 x:0.000000 xi:0 y:0.000000 yi:0 n:13.000000 t:0.372989 pos:93317.000000 x:0.000000 xi:0 y:0.000000 yi:0 n:13.000000 t:0.423556 pos:125016.000000 x:0.000000 xi:0 y:0.000000 yi:0 n:13.000000 t:0.474122 pos:157349.000000 x:0.000000 xi:0 y:0.000000 yi:0 n:13.000000 t:0.526278 pos:192458.000000 x:0.000000 xi:0 y:0.000000 yi:0 n:13.000000 t:0.578433 pos:220985.000000 x:0.000000 xi:0 y:0.000000 yi:0 n:13.000000 t:0.632022 pos:256955.000000 x:0.000000 xi:0 y:0.000000 yi:0 n:13.000000 t:0.685611 pos:288120.000000 x:0.000000 xi:0 y:0.000000 yi:0 1 dup! Clipping frame in rate conversion by 0.467766 Clipping frame in rate conversion by 0.203606 1 dup! Past duration 0.675270 too large Clipping frame in rate conversion by 0.411110 Clipping frame in rate conversion by 0.146935 1 dup! Clipping frame in rate conversion by 0.539162 Clipping frame in rate conversion by 0.199440 1 dup! stream 0, sample 21, dts 1147767 nal_unit_type: 1, nal_ref_idc: 2 stream 1, sample 9, dts 1152000 Incoming frame (time:0.740911) from link #0 n:14.000000 t:0.740911 pos:318308.000000 x:0.000000 xi:0 y:0.000000 yi:0 Clipping frame in rate conversion by 0.477211 frame= 20 fps=9.4 q=2.0 size= 36kB time=00:00:00.76 bitrate= 383.6kbits/s dup=5 drop=0 speed=0.357x
stream 0, sample 21, dts 1147767 stream 1, sample 10, dts 1280000 stream 0, sample 22, dts 1209989 stream 1, sample 10, dts 1280000 stream 0, sample 23, dts 1272211 stream 1, sample 10, dts 1280000 stream 0, sample 24, dts 1334289 stream 1, sample 10, dts 1280000 stream 0, sample 25, dts 1396367 stream 1, sample 10, dts 1280000 stream 0, sample 26, dts 1458589 stream 1, sample 10, dts 1280000 stream 0, sample 27, dts 1520811 stream 1, sample 10, dts 1280000 nal_unit_type: 1, nal_ref_idc: 2 stream 0, sample 28, dts 1582900 stream 1, sample 10, dts 1280000 stream 0, sample 29, dts 1644989 stream 1, sample 10, dts 1280000 stream 0, sample 30, dts 1707211 stream 1, sample 10, dts 1280000 Incoming frame (time:0.796211) from link #0 n:15.000000 t:0.796211 pos:354723.000000 x:0.000000 xi:0 y:0.000000 yi:0 Clipping frame in rate conversion by 0.094719 stream 0, sample 31, dts 1769433 nal_unit_type: 1, nal_ref_idc: 2 stream 1, sample 10, dts 1280000 Incoming frame (time:0.853044) from link #0 n:16.000000 t:0.853044 pos:380366.000000 x:0.000000 xi:0 y:0.000000 yi:0
1 dup! stream 0, sample 32, dts 1831511 nal_unit_type: 1, nal_ref_idc: 2 stream 1, sample 10, dts 1280000 Incoming frame (time:0.909878) from link #0 n:17.000000 t:0.909878 pos:422973.000000 x:0.000000 xi:0 y:0.000000 yi:0 Clipping frame in rate conversion by 0.253044 stream 0, sample 33, dts 1891867 nal_unit_type: 1, nal_ref_idc: 2 stream 1, sample 10, dts 1280000 Incoming frame (time:0.968533) from link #0 n:18.000000 t:0.968533 pos:450998.000000 x:0.000000 xi:0 y:0.000000 yi:0 1 dup! frame= 26 fps=9.9 q=2.0 size= 665kB time=00:00:01.15 bitrate=4731.1kbits/s dup=7 drop=0 speed=0.437x
stream 0, sample 34, dts 1952222 nal_unit_type: 1, nal_ref_idc: 2 stream 1, sample 10, dts 1280000 Incoming frame (time:1.02719) from link #0 n:19.000000 t:1.027189 pos:484847.000000 x:0.000000 xi:0 y:0.000000 yi:0 Clipping frame in rate conversion by 0.320274 nal_unit_type: 1, nal_ref_idc: 2 stream 0, sample 35, dts 2012578 stream 1, sample 10, dts 1280000 Incoming frame (time:1.08748) from link #0 n:20.000000 t:1.087478 pos:513837.000000 x:0.000000 xi:0 y:0.000000 yi:0
1 dup! nal_unit_type: 1, nal_ref_idc: 2 stream 0, sample 36, dts 2072933 stream 1, sample 10, dts 1280000 Incoming frame (time:1.14777) from link #0 n:21.000000 t:1.147767 pos:553459.000000 x:0.000000 xi:0 y:0.000000 yi:0 Clipping frame in rate conversion by 0.305824 stream 0, sample 37, dts 2133289 nal_unit_type: 1, nal_ref_idc: 2 stream 1, sample 10, dts 1280000 Incoming frame (time:1.20999) from link #0 n:22.000000 t:1.209989 pos:589788.000000 x:0.000000 xi:0 y:0.000000 yi:0 1 dup! stream 0, sample 38, dts 2193644 nal_unit_type: 1, nal_ref_idc: 2 stream 1, sample 10, dts 1280000 Incoming frame (time:1.27221) from link #0 n:23.000000 t:1.272211 pos:630697.000000 x:0.000000 xi:0 y:0.000000 yi:0 Clipping frame in rate conversion by 0.194710 frame= 33 fps= 10 q=2.0 size= 726kB time=00:00:01.28 bitrate=4643.3kbits/s dup=9 drop=0 speed=0.39x
stream 0, sample 38, dts 2193644 stream 1, sample 11, dts 1408000 nal_unit_type: 5, nal_ref_idc: 3 Incoming frame (time:1.33429) from link #0 n:24.000000 t:1.334289 pos:660900.000000 x:0.000000 xi:0 y:0.000000 yi:0
1 dup! stream 0, sample 38, dts 2193644 nal_unit_type: 1, nal_ref_idc: 2 stream 1, sample 12, dts 1536000 Incoming frame (time:1.39637) from link #0 n:25.000000 t:1.396367 pos:700442.000000 x:0.000000 xi:0 y:0.000000 yi:0 Clipping frame in rate conversion by 0.090828 stream 0, sample 38, dts 2193644 nal_unit_type: 1, nal_ref_idc: 2 stream 1, sample 13, dts 1664000 Incoming frame (time:1.45859) from link #0 n:26.000000 t:1.458589 pos:731621.000000 x:0.000000 xi:0 y:0.000000 yi:0 1 dup! stream 0, sample 38, dts 2193644 nal_unit_type: 1, nal_ref_idc: 2 stream 1, sample 14, dts 1792000 Incoming frame (time:1.52081) from link #0 n:27.000000 t:1.520811 pos:770628.000000 x:0.000000 xi:0 y:0.000000 yi:0 frame= 39 fps= 10 q=2.1 size= 726kB time=00:00:01.52 bitrate=3910.2kbits/s dup=11 drop=0 speed=0.402x
stream 0, sample 38, dts 2193644 nal_unit_type: 1, nal_ref_idc: 2 stream 1, sample 15, dts 1920000 Incoming frame (time:1.5829) from link #0 n:28.000000 t:1.582900 pos:803303.000000 x:0.000000 xi:0 y:0.000000 yi:0
1 dup! stream 0, sample 38, dts 2193644 nal_unit_type: 1, nal_ref_idc: 2 stream 1, sample 16, dts 2048000 Incoming frame (time:1.64499) from link #0 n:29.000000 t:1.644989 pos:848788.000000 x:0.000000 xi:0 y:0.000000 yi:0 1 dup! stream 0, sample 38, dts 2193644 nal_unit_type: 1, nal_ref_idc: 2 stream 1, sample 17, dts 2176000 Incoming frame (time:1.70721) from link #0 n:30.000000 t:1.707211 pos:886552.000000 x:0.000000 xi:0 y:0.000000 yi:0 Clipping frame in rate conversion by 0.319710 nal_unit_type: 1, nal_ref_idc: 2 stream 0, sample 38, dts 2193644 stream 1, sample 18, dts 2304000 Incoming frame (time:1.76943) from link #0 n:31.000000 t:1.769433 pos:914613.000000 x:0.000000 xi:0 y:0.000000 yi:0 1 dup! frame= 46 fps= 11 q=3.0 size= 726kB time=00:00:01.80 bitrate=3302.0kbits/s dup=14 drop=0 speed=0.414x
stream 0, sample 39, dts 2254000 stream 1, sample 18, dts 2304000 stream 0, sample 40, dts 2314356 stream 1, sample 18, dts 2304000 stream 0, sample 41, dts 2374711 stream 1, sample 18, dts 2304000 stream 0, sample 42, dts 2435067 stream 1, sample 18, dts 2304000 stream 0, sample 43, dts 2495422 stream 1, sample 18, dts 2304000 stream 1, sample 18, dts 2304000 stream 1, sample 19, dts 2432000 nal_unit_type: 1, nal_ref_idc: 2 Incoming frame (time:1.83151) from link #0 n:32.000000 t:1.831511 pos:952126.000000 x:0.000000 xi:0 y:0.000000 yi:0 Clipping frame in rate conversion by 0.212212 nal_unit_type: 1, nal_ref_idc: 2 Incoming frame (time:1.89187) from link #0 n:33.000000 t:1.891867 pos:970019.000000 x:0.000000 xi:0 y:0.000000 yi:0 1 dup! nal_unit_type: 1, nal_ref_idc: 2 Incoming frame (time:1.95222) from link #0 n:34.000000 t:1.952222 pos:1015538.000000 x:0.000000 xi:0 y:0.000000 yi:0 Clipping frame in rate conversion by 0.194435 nal_unit_type: 1, nal_ref_idc: 2 Incoming frame (time:2.01258) from link #0 n:35.000000 t:2.012578 pos:1034232.000000 x:0.000000 xi:0 y:0.000000 yi:0 1 dup! frame= 52 fps= 11 q=4.0 size= 1272kB time=00:00:02.17 bitrate=4789.9kbits/s dup=16 drop=0 speed=0.447x
nal_unit_type: 1, nal_ref_idc: 2 Incoming frame (time:2.07293) from link #0 n:36.000000 t:2.072933 pos:1063311.000000 x:0.000000 xi:0 y:0.000000 yi:0 Clipping frame in rate conversion by 0.176659 nal_unit_type: 1, nal_ref_idc: 2 Incoming frame (time:2.13329) from link #0 n:37.000000 t:2.133289 pos:1087928.000000 x:0.000000 xi:0 y:0.000000 yi:0 1 dup! Incoming frame (time:2.19364) from link #0 n:38.000000 t:2.193644 pos:1124500.000000 x:0.000000 xi:0 y:0.000000 yi:0 Clipping frame in rate conversion by 0.158882 Incoming frame (time:2.254) from link #0 n:39.000000 t:2.254000 pos:1157021.000000 x:0.000000 xi:0 y:0.000000 yi:0 1 dup! Incoming frame (time:2.31436) from link #0 n:40.000000 t:2.314356 pos:1192594.000000 x:0.000000 xi:0 y:0.000000 yi:0 Clipping frame in rate conversion by 0.141106 frame= 59 fps= 11 q=2.7 size= 1359kB time=00:00:02.43 bitrate=4577.8kbits/s dup=18 drop=0 speed=0.444x
Incoming frame (time:2.37471) from link #0 n:41.000000 t:2.374711 pos:1225745.000000 x:0.000000 xi:0 y:0.000000 yi:0 1 dup! Incoming frame (time:2.43507) from link #0 n:42.000000 t:2.435067 pos:1258032.000000 x:0.000000 xi:0 y:0.000000 yi:0 Clipping frame in rate conversion by 0.123329 Incoming frame (time:2.49542) from link #0 n:43.000000 t:2.495422 pos:1290694.000000 x:0.000000 xi:0 y:0.000000 yi:0 1 dup! Sync level 0 No more output streams to write to, finishing. frame= 64 fps= 11 q=3.2 Lsize= 1497kB time=00:00:02.52 bitrate=4867.2kbits/s dup=20 drop=0 speed=0.422x
video:1492kB audio:4kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.127803% Input file #0 (/sdcard/JCamera/video_1541474028496.mp4): Input stream #0:0 (video): 44 packets read (1318489 bytes); 44 frames decoded; Input stream #0:1 (audio): 20 packets read (3904 bytes); Total: 64 packets (1322393 bytes) demuxed Input file #1 (/sdcard/JCamera/tuya.png): Input stream #1:0 (video): 1 packets read (51138 bytes); 1 frames decoded; Total: 1 packets (51138 bytes) demuxed Output file #0 (/storage/emulated/0/Android/data/com.maotou.mybuildffmpegdemo/files/finish.mp4): Output stream #0:0 (video): 64 frames encoded; 64 packets muxed (1527356 bytes); Output stream #0:1 (audio): 20 packets muxed (3904 bytes); Total: 84 packets (1531260 bytes) muxed 45 frames successfully decoded, 0 decoding errors Statistics: 60 seeks, 154 writeouts Statistics: 1365061 bytes read, 2 seeks Statistics: 51138 bytes read, 0 seeks

Android Studio 控制台日志: A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x24 in tid 28689 (Thread-301)

byhook commented 5 years ago

使用示例试试或者重新看看步骤有没有遗漏?