microshow / RxFFmpeg

🔥💥RxFFmpeg 是基于 ( FFmpeg 4.0 + X264 + mp3lame + fdk-aac + opencore-amr + openssl ) 编译的适用于 Android 平台的音视频编辑、视频剪辑的快速处理框架,包含以下功能:视频拼接,转码,压缩,裁剪,片头片尾,分离音视频,变速,添加静态贴纸和gif动态贴纸,添加字幕,添加滤镜,添加背景音乐,加速减速视频,倒放音视频,音频裁剪,变声,混音,图片合成视频,视频解码图片,抖音首页,视频播放器及支持 OpenSSL https 等主流特色功能
4.46k stars 748 forks source link

单张图片转视频崩溃 #99

Closed tmexcept closed 4 years ago

tmexcept commented 4 years ago

命令行如下: ffmpeg -t 10 -r 30 -loop 1 -i /sdcard/20191111171116.png -pix_fmt yuvj420p /sdcard/tt.mp4 日志如下: 11-22 12:05:17.730 22403-22464/io.microshow.rxffmpegdemo.debug I/TAG_FFMPEG: ffmpeg version 4.0 11-22 12:05:17.731 22403-22464/io.microshow.rxffmpegdemo.debug I/TAG_FFMPEG: Copyright (c) 2000-2018 the FFmpeg developers 11-22 12:05:17.731 22403-22464/io.microshow.rxffmpegdemo.debug I/TAG_FFMPEG: built with gcc 4.9.x (GCC) 20150123 (prerelease) 11-22 12:05:17.731 22403-22464/io.microshow.rxffmpegdemo.debug I/TAG_FFMPEG: configuration: --prefix=/mnt/d/DevConfig/ffmpeg/4.0/build/build_script/lib/ffmpeg/armv8-a --enable-neon --enable-hwaccels --enable-nonfree --enable-gpl --enable-x86asm --disable-shared --enable-static --cross-prefix=/mnt/d/DevConfig/ffmpeg/ndk/android-ndk-r14b/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android- --target-os=android --arch=arm64 --cpu=armv8-a --cc=/mnt/d/DevConfig/ffmpeg/ndk/android-ndk-r14b/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-gcc --nm=/mnt/d/DevConfig/ffmpeg/ndk/android-ndk-r14b/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-nm --enable-cross-compile --sysroot=/mnt/d/DevConfig/ffmpeg/ndk/android-ndk-r14b/platforms/android-21/arch-arm64/ --enable-libx264 --enable-encoder=libx264 --enable-libmp3lame --enable-encoder=libmp3lame --enable-libfdk-aac --enable-encoder=libfdk_aac --enable-encoder=aac --enable-encoder=mjpeg --enable-encoder=png --enable-encoder=gif --enable-decode 11-22 12:05:17.731 22403-22464/io.microshow.rxffmpegdemo.debug I/TAG_FFMPEG: libavutil 56. 14.100 / 56. 14.100 11-22 12:05:17.731 22403-22464/io.microshow.rxffmpegdemo.debug I/TAG_FFMPEG: libavcodec 58. 18.100 / 58. 18.100 11-22 12:05:17.731 22403-22464/io.microshow.rxffmpegdemo.debug I/TAG_FFMPEG: libavformat 58. 12.100 / 58. 12.100 11-22 12:05:17.731 22403-22464/io.microshow.rxffmpegdemo.debug I/TAG_FFMPEG: libavdevice 58. 3.100 / 58. 3.100 11-22 12:05:17.731 22403-22464/io.microshow.rxffmpegdemo.debug I/TAG_FFMPEG: libavfilter 7. 16.100 / 7. 16.100 11-22 12:05:17.731 22403-22464/io.microshow.rxffmpegdemo.debug I/TAG_FFMPEG: libswscale 5. 1.100 / 5. 1.100 11-22 12:05:17.731 22403-22464/io.microshow.rxffmpegdemo.debug I/TAG_FFMPEG: libswresample 3. 1.100 / 3. 1.100 11-22 12:05:17.732 22403-22464/io.microshow.rxffmpegdemo.debug I/TAG_FFMPEG: libpostproc 55. 1.100 / 55. 1.100 11-22 12:05:17.732 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Splitting the commandline. 11-22 12:05:17.732 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Reading option '-t' ... 11-22 12:05:17.732 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: matched as option 't' (record or transcode "duration" seconds of audio/video) with argument '10'. 11-22 12:05:17.732 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Reading option '-r' ... 11-22 12:05:17.732 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: matched as option 'r' (set frame rate (Hz value, fraction or abbreviation)) with argument '30'. 11-22 12:05:17.732 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Reading option '-loop' ... 11-22 12:05:17.735 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: matched as AVOption 'loop' with argument '1'. 11-22 12:05:17.736 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Reading option '-i' ... 11-22 12:05:17.736 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: matched as input url with argument '/sdcard/20191111171116.png'. 11-22 12:05:17.736 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Reading option '-pix_fmt' ... 11-22 12:05:17.737 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: matched as option 'pix_fmt' (set pixel format) with argument 'yuvj420p'. 11-22 12:05:17.737 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Reading option '/sdcard/tt.mp4' ... 11-22 12:05:17.737 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: matched as output url. 11-22 12:05:17.737 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Finished splitting the commandline. 11-22 12:05:17.737 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Parsing a group of options: global . 11-22 12:05:17.737 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Successfully parsed a group of options. 11-22 12:05:17.737 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Parsing a group of options: input url /sdcard/20191111171116.png. 11-22 12:05:17.737 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Applying option t (record or transcode "duration" seconds of audio/video) with argument 10. 11-22 12:05:17.737 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 30. 11-22 12:05:17.737 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Successfully parsed a group of options. 11-22 12:05:17.737 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Opening an input file: /sdcard/20191111171116.png. 11-22 12:05:17.738 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Opening '/sdcard/20191111171116.png' for reading 11-22 12:05:17.738 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Setting default whitelist 'file,crypto' 11-22 12:05:17.745 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Format png_pipe probed with size=2048 and score=99 11-22 12:05:17.746 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Before avformat_find_stream_info() pos: 0 bytes read:32768 seeks:0 nb_streams:1 11-22 12:05:17.787 22403-22427/io.microshow.rxffmpegdemo.debug D/mali_winsys: new_window_surface returns 0x3000 11-22 12:05:17.791 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Probe buffer size limit of 5000000 bytes reached 11-22 12:05:17.792 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: After avformat_find_stream_info() pos: 64985 bytes read:5003845 seeks:76 frames:77 11-22 12:05:17.792 22403-22464/io.microshow.rxffmpegdemo.debug I/TAG_FFMPEG: Input #0, png_pipe, from '/sdcard/20191111171116.png': 11-22 12:05:17.792 22403-22464/io.microshow.rxffmpegdemo.debug I/TAG_FFMPEG: Duration: 11-22 12:05:17.792 22403-22464/io.microshow.rxffmpegdemo.debug I/TAG_FFMPEG: N/A 11-22 12:05:17.792 22403-22464/io.microshow.rxffmpegdemo.debug I/TAG_FFMPEG: , bitrate: 11-22 12:05:17.792 22403-22464/io.microshow.rxffmpegdemo.debug I/TAG_FFMPEG: N/A 11-22 12:05:17.792 22403-22464/io.microshow.rxffmpegdemo.debug I/TAG_FFMPEG: Stream #0:0 11-22 12:05:17.792 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: , 77, 1/25 11-22 12:05:17.792 22403-22464/io.microshow.rxffmpegdemo.debug I/TAG_FFMPEG: : Video: png, rgba(pc), 1047x440 [SAR 3779:3779 DAR 1047:440] 11-22 12:05:17.792 22403-22464/io.microshow.rxffmpegdemo.debug I/TAG_FFMPEG: , 11-22 12:05:17.792 22403-22464/io.microshow.rxffmpegdemo.debug I/TAG_FFMPEG: 25 fps, 11-22 12:05:17.792 22403-22464/io.microshow.rxffmpegdemo.debug I/TAG_FFMPEG: 25 tbr, 11-22 12:05:17.792 22403-22464/io.microshow.rxffmpegdemo.debug I/TAG_FFMPEG: 25 tbn, 11-22 12:05:17.792 22403-22464/io.microshow.rxffmpegdemo.debug I/TAG_FFMPEG: 25 tbc 11-22 12:05:17.792 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Successfully opened the file. 11-22 12:05:17.792 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Parsing a group of options: output url /sdcard/tt.mp4. 11-22 12:05:17.792 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Applying option pix_fmt (set pixel format) with argument yuvj420p. 11-22 12:05:17.792 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Successfully parsed a group of options. 11-22 12:05:17.792 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Opening an output file: /sdcard/tt.mp4. 11-22 12:05:17.795 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Statistics: 5003845 bytes read, 76 seeks 11-22 12:05:17.795 22403-22464/io.microshow.rxffmpegdemo.debug D/TAG_FFMPEG: Setting default whitelist 'file,crypto' 11-22 12:05:17.796 22403-22464/io.microshow.rxffmpegdemo.debug A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 22464 (RxCachedThreadS)

microshow commented 4 years ago

命令加个 -y 试试

tmexcept commented 4 years ago

恩,可以了,非常感谢,使用的是命令行是 ffmpeg -y -r 30 -t 10 -loop 1 -i /sdcard/icon_watermark.png -pix_fmt yuv420p -preset superfast /sdcard/result.mp4