Jak mogę uzyskać następujące scalone pliki wideo za pomocą ffmpeg?
Proszę pomóż mi
EDYTOWAĆ
Użyłem hstack i vstack następujący błąd
06-24 17:11:39.133 14565-14565/com.parksangha.videorecorder I/System.out: onFailure : WARNING: linker: /data/data/com.parksangha.videorecorder/files/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
06-24 17:11:39.133 14565-14565/com.parksangha.videorecorder I/System.out: ffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: built on Oct 7 2014 15:08:46 with gcc 4.8 (GCC)
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: configuration: --target-os=linux --cross-prefix=/home/sb/Source-Code/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/sb/Source-Code/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/sb/Source-Code/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/sb/Source-Code/ffmpeg-android/build/armeabi-v7a-neon --extra-cflags='-I/home/sb/Source-Code/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all -mfpu=neon' --extra-ldflags='-L/home/sb/Source-Code/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: libavutil 54. 7.100 / 54. 7.100
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: libavcodec 56. 1.100 / 56. 1.100
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: libavformat 56. 4.101 / 56. 4.101
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: libavdevice 56. 0.100 / 56. 0.100
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: libavfilter 5. 1.100 / 5. 1.100
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: libswscale 3. 0.100 / 3. 0.100
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: libswresample 1. 1.100 / 1. 1.100
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: libpostproc 53. 0.100 / 53. 0.100
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/sdcard/testffmpeg/1.mp4':
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: Metadata:
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: major_brand : mp42
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: minor_version : 0
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: compatible_brands: isommp42
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: creation_time : 2016-06-23 21:21:16
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: Duration: 00:00:05.42, start: 0.000000, bitrate: 3081 kb/s
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 2949 kb/s, 30.02 fps, 30 tbr, 90k tbn, 180k tbc (default)
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: Metadata:
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: rotate : 90
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: creation_time : 2016-06-23 21:21:16
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: handler_name : VideoHandle
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: Side data:
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: displaymatrix: rotation of -90.00 degrees
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 153 kb/s (default)
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: Metadata:
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: creation_time : 2016-06-23 21:21:16
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: handler_name : SoundHandle
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/sdcard/testffmpeg/2.mp4':
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: Metadata:
06-24 17:11:39.143 14565-14565/com.parksangha.videorecorder I/System.out: major_brand : mp42
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: minor_version : 0
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: compatible_brands: isommp42
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: creation_time : 2016-06-23 21:21:16
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: Duration: 00:00:05.42, start: 0.000000, bitrate: 3081 kb/s
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: Stream #1:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 2949 kb/s, 30.02 fps, 30 tbr, 90k tbn, 180k tbc (default)
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: Metadata:
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: rotate : 90
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: creation_time : 2016-06-23 21:21:16
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: handler_name : VideoHandle
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: Side data:
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: displaymatrix: rotation of -90.00 degrees
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: Stream #1:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 153 kb/s (default)
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: Metadata:
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: creation_time : 2016-06-23 21:21:16
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: handler_name : SoundHandle
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: Input #2, mov,mp4,m4a,3gp,3g2,mj2, from '/sdcard/testffmpeg/3.mp4':
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: Metadata:
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: major_brand : mp42
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: minor_version : 0
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: compatible_brands: isommp42
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: creation_time : 2016-06-23 21:21:16
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: Duration: 00:00:05.42, start: 0.000000, bitrate: 3081 kb/s
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: Stream #2:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 2949 kb/s, 30.02 fps, 30 tbr, 90k tbn, 180k tbc (default)
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: Metadata:
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: rotate : 90
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: creation_time : 2016-06-23 21:21:16
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: handler_name : VideoHandle
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: Side data:
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: displaymatrix: rotation of -90.00 degrees
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: Stream #2:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 153 kb/s (default)
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: Metadata:
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: creation_time : 2016-06-23 21:21:16
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: handler_name : SoundHandle
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: [AVFilterGraph @ 0xb5468240] No such filter: 'hstack'
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: Error configuring filters.
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/LOG: On Finish
06-24 17:11:39.153 14565-14565/com.parksangha.videorecorder I/System.out: onFinish
EDYTOWAĆ
Ze względu na użycie vstack i hstack przeszły do wersji 2016.
I używam następującego kodu w Androidzie:
String[] cmds = new String[]{"-i",video1+".mp4","-i",video2+".mp4","-i",video3+".mp4","-filter","complex","[1:v][2:v]hstack[bottom];[0:v][bottom]vstack",output+".mp4"};
Ale dostałem następujący błąd:
06-25 03:02:36.438 17859-17859/co.gioin.testsquarecamera I/System.out: onStart
06-25 03:02:36.548 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
06-25 03:02:36.548 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : built with gcc 4.8 (GCC)
06-25 03:02:36.548 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
06-25 03:02:36.568 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : libavutil 55. 17.103 / 55. 17.103
06-25 03:02:36.568 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : libavcodec 57. 24.102 / 57. 24.102
06-25 03:02:36.578 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : libavformat 57. 25.100 / 57. 25.100
06-25 03:02:36.578 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : libavdevice 57. 0.101 / 57. 0.101
06-25 03:02:36.578 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : libavfilter 6. 31.100 / 6. 31.100
06-25 03:02:36.578 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : libswscale 4. 0.100 / 4. 0.100
06-25 03:02:36.588 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : libswresample 2. 0.101 / 2. 0.101
06-25 03:02:36.588 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : libpostproc 54. 0.100 / 54. 0.100
06-25 03:02:36.618 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/bitbox/3x1/t/mainVideo.mp4':
06-25 03:02:36.618 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : Metadata:
06-25 03:02:36.618 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : major_brand : isom
06-25 03:02:36.618 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : minor_version : 512
06-25 03:02:36.628 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : compatible_brands: isomiso2avc1mp41
06-25 03:02:36.628 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : encoder : Lavf56.4.101
06-25 03:02:36.628 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : Duration: 00:00:00.68, start: 0.021333, bitrate: 3947 kb/s
06-25 03:02:36.628 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 902x1080, 5228 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
06-25 03:02:36.638 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : Metadata:
06-25 03:02:36.638 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : rotate : 90
06-25 03:02:36.638 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : handler_name : VideoHandler
06-25 03:02:36.638 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : Side data:
06-25 03:02:36.638 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : displaymatrix: rotation of -90.00 degrees
06-25 03:02:36.638 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 94 kb/s (default)
06-25 03:02:36.648 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : Metadata:
06-25 03:02:36.648 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : handler_name : SoundHandler
06-25 03:02:36.648 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/bitbox/3x1/t/leftVideo.mp4':
06-25 03:02:36.648 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : Metadata:
06-25 03:02:36.648 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : major_brand : isom
06-25 03:02:36.648 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : minor_version : 512
06-25 03:02:36.648 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : compatible_brands: isomiso2avc1mp41
06-25 03:02:36.658 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : encoder : Lavf56.4.101
06-25 03:02:36.658 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : Duration: 00:00:01.22, start: 0.021333, bitrate: 2360 kb/s
06-25 03:02:36.658 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : Stream #1:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1440x938, 2544 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
06-25 03:02:36.658 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : Metadata:
06-25 03:02:36.658 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : rotate : 90
06-25 03:02:36.658 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : handler_name : VideoHandler
06-25 03:02:36.658 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : Side data:
06-25 03:02:36.658 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : displaymatrix: rotation of -90.00 degrees
06-25 03:02:36.658 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : Stream #1:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 113 kb/s (default)
06-25 03:02:36.658 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : Metadata:
06-25 03:02:36.668 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : handler_name : SoundHandler
06-25 03:02:36.678 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : Input #2, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/bitbox/3x1/t/rightVideo.mp4':
06-25 03:02:36.678 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : Metadata:
06-25 03:02:36.688 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : major_brand : isom
06-25 03:02:36.688 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : minor_version : 512
06-25 03:02:36.688 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : compatible_brands: isomiso2avc1mp41
06-25 03:02:36.688 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : encoder : Lavf56.4.101
06-25 03:02:36.688 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : Duration: 00:00:00.99, start: 0.021333, bitrate: 5945 kb/s
06-25 03:02:36.698 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : Stream #2:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1440x938, 6933 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
06-25 03:02:36.698 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : Metadata:
06-25 03:02:36.698 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : rotate : 90
06-25 03:02:36.698 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : handler_name : VideoHandler
06-25 03:02:36.698 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : Side data:
06-25 03:02:36.698 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : displaymatrix: rotation of -90.00 degrees
06-25 03:02:36.698 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : Stream #2:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 109 kb/s (default)
06-25 03:02:36.698 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : Metadata:
06-25 03:02:36.698 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : handler_name : SoundHandler
06-25 03:02:36.708 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : [NULL @ 0xb5460c00] Unable to find a suitable output format for '[1:v][2:v]hstack[bottom];[0:v][bottom]vstack'
06-25 03:02:36.708 17859-17859/co.gioin.testsquarecamera I/System.out: onProgress : [1:v][2:v]hstack[bottom];[0:v][bottom]vstack: Invalid argument
06-25 03:02:36.708 17859-17859/co.gioin.testsquarecamera I/System.out: onFailure : ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
06-25 03:02:36.708 17859-17859/co.gioin.testsquarecamera I/System.out: built with gcc 4.8 (GCC)
06-25 03:02:36.708 17859-17859/co.gioin.testsquarecamera I/System.out: configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
06-25 03:02:36.708 17859-17859/co.gioin.testsquarecamera I/System.out: libavutil 55. 17.103 / 55. 17.103
06-25 03:02:36.708 17859-17859/co.gioin.testsquarecamera I/System.out: libavcodec 57. 24.102 / 57. 24.102
06-25 03:02:36.708 17859-17859/co.gioin.testsquarecamera I/System.out: libavformat 57. 25.100 / 57. 25.100
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: libavdevice 57. 0.101 / 57. 0.101
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: libavfilter 6. 31.100 / 6. 31.100
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: libswscale 4. 0.100 / 4. 0.100
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: libswresample 2. 0.101 / 2. 0.101
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: libpostproc 54. 0.100 / 54. 0.100
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/bitbox/3x1/t/mainVideo.mp4':
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: Metadata:
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: major_brand : isom
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: minor_version : 512
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: compatible_brands: isomiso2avc1mp41
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: encoder : Lavf56.4.101
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: Duration: 00:00:00.68, start: 0.021333, bitrate: 3947 kb/s
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 902x1080, 5228 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: Metadata:
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: rotate : 90
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: handler_name : VideoHandler
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: Side data:
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: displaymatrix: rotation of -90.00 degrees
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 94 kb/s (default)
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: Metadata:
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: handler_name : SoundHandler
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/bitbox/3x1/t/leftVideo.mp4':
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: Metadata:
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: major_brand : isom
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: minor_version : 512
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: compatible_brands: isomiso2avc1mp41
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: encoder : Lavf56.4.101
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: Duration: 00:00:01.22, start: 0.021333, bitrate: 2360 kb/s
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: Stream #1:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1440x938, 2544 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: Metadata:
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: rotate : 90
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: handler_name : VideoHandler
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: Side data:
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: displaymatrix: rotation of -90.00 degrees
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: Stream #1:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 113 kb/s (default)
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: Metadata:
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: handler_name : SoundHandler
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: Input #2, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/bitbox/3x1/t/rightVideo.mp4':
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: Metadata:
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: major_brand : isom
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: minor_version : 512
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: compatible_brands: isomiso2avc1mp41
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: encoder : Lavf56.4.101
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: Duration: 00:00:00.99, start: 0.021333, bitrate: 5945 kb/s
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: Stream #2:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1440x938, 6933 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: Metadata:
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: rotate : 90
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: handler_name : VideoHandler
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: Side data:
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: displaymatrix: rotation of -90.00 degrees
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: Stream #2:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 109 kb/s (default)
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: Metadata:
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: handler_name : SoundHandler
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: [NULL @ 0xb5460c00] Unable to find a suitable output format for '[1:v][2:v]hstack[bottom];[0:v][bottom]vstack'
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: [1:v][2:v]hstack[bottom];[0:v][bottom]vstack: Invalid argument
06-25 03:02:36.718 17859-17859/co.gioin.testsquarecamera I/System.out: onFinish
command-line
ffmpeg
android
Omid Naji
źródło
źródło
Odpowiedzi:
Można to zrobić na kilka sposobów.
hstack i vstack
Metoda ta wykorzystuje hstack do poziomego stosu
video1
ivideo2
, następnie vstack pionowo stosvideo0
na nich.Jeśli chcesz skalować, aby dopasować rozmiary
Jeśli najpierw musisz przeskalować dowolne wejście, dodaj filtr skalowania :
Łączenie audio
Nie wspomniałeś o dźwięku, ale jeśli chcesz połączyć wszystkie dźwięki, dodaj amerge :
Jeśli chcesz audio tylko z jednego wejścia, nie używaj amerge i po prostu zamapuj żądany dźwięk, na przykład
-map 1:a
.W przypadku przestarzałych wersji: pad + nakładka
Twoje zdeprawowane
ffmpeg
jest zdecydowanie za stare, aby używać filtrów stosu, więc używaj padu i nakładki .źródło
ffmpeg
jest za stary. Dlaczego korzystasz z 2.4.2? Dlaczego wydaje się, że wszyscy użytkownicy Androida używają tej starej, nieaktualnej wersji? Skąd to masz? Dodałem nowy przykład, używając pad + nakładki, które powinny działać w twojej starożytnej wersji.I/System.out: handler_name : SoundHandler I/System.out: [NULL @ 0xb5460c00] Unable to find a suitable output format for '[1:v][2:v]hstack[bottom];[0:v][bottom]vstack' I/System.out: [1:v][2:v]hstack[bottom];[0:v][bottom]vstack: Invalid argument I/System.out: onFinish
"-filter","complex"
powinien być"-filter_complex"
Utwórz mozaikę z kilku wejściowych filmów
https://trac.ffmpeg.org/wiki/Create%20a%20mosaic%20out%20of%20several%20input%20videos
źródło