Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 使用args“立体声:c0_Android_Video_Ffmpeg_Android Ffmpeg - Fatal编程技术网

Android 使用args“立体声:c0

Android 使用args“立体声:c0,android,video,ffmpeg,android-ffmpeg,Android,Video,Ffmpeg,Android Ffmpeg,我在FFmpeg命令下面运行,以合并音频和视频,并使用FFmpeg 4.0-39版本保留视频的原始音频- -i /storage/emulated/0/Movies/extract_audio.mp3 -i /storage/emulated/0/Movies/VID-20200501-WA0000.mp4 -filter_complex [0:a][1:a]amerge,pan=stereo:c0<c0+c2:c1<c1+c3[out] -map 1:v -map [out] -c

我在FFmpeg命令下面运行,以合并音频和视频,并使用FFmpeg 4.0-39版本保留视频的原始音频-

-i /storage/emulated/0/Movies/extract_audio.mp3 -i /storage/emulated/0/Movies/VID-20200501-WA0000.mp4 -filter_complex [0:a][1:a]amerge,pan=stereo:c0<c0+c2:c1<c1+c3[out] -map 1:v -map [out] -c:v copy -c:a aac -shortest /storage/emulated/0/Movies/merge_video.mp4
它失败的所有视频与以下错误!但是,当使用较旧版本的FFMpeg 3.0.1时,相同的命令运行良好

FAILED with output : ffmpeg version n4.0-39-gda39990 Copyright (c) 2000-2018 the FFmpeg developers
      built with gcc 4.9.x (GCC) 20150123 (prerelease)
      configuration: --target-os=linux --cross-prefix=/root/bravobit/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/root/bravobit/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-ffprobe --enable-libopus --enable-libvorbis --enable-libfdk-aac --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-libvpx --enable-libass --enable-yasm --enable-pthreads --disable-debug --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-linux-perf --disable-doc --disable-shared --enable-static --enable-runtime-cpudetect --enable-nonfree --enable-network --enable-avresample --enable-avformat --enable-avcodec --enable-indev=lavfi --enable-hwaccels --enable-ffmpeg --enable-zlib --enable-gpl --enable-small --enable-nonfree --pkg-config=pkg-config --pkg-config-flags=--static --prefix=/root/bravobit/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/root/bravobit/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/root/bravobit/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-cxxflags=
      libavutil      56. 14.100 / 56. 14.100
      libavcodec     58. 18.100 / 58. 18.100
      libavformat    58. 12.100 / 58. 12.100
      libavdevice    58.  3.100 / 58.  3.100
      libavfilter     7. 16.100 /  7. 16.100
      libavresample   4.  0.  0 /  4.  0.  0
      libswscale      5.  1.100 /  5.  1.100
      libswresample   3.  1.100 /  3.  1.100
      libpostproc    55.  1.100 / 55.  1.100
    Input #0, mp3, from '/storage/emulated/0/Movies/extract_audio.mp3.mp4':
      Metadata:
        major_brand     : M4V 
        minor_version   : 512
        compatible_brands: isomiso2avc1
        encoder         : Lavf58.12.100
      Duration: 00:00:20.04, start: 0.025057, bitrate: 256 kb/s
        Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 256 kb/s
        Metadata:
          encoder         : Lavc58.18
    Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Movies/VID-20200501-WA0000.mp4.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2avc1mp41
        encoder         : Lavf58.20.100
      Duration: 00:00:09.83, start: 0.000000, bitrate: 809 kb/s
        Stream #1:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 480x600, 737 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
        Metadata:
          handler_name    : VideoHandler
        Stream #1:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 64 kb/s (default)
        Metadata:
          handler_name    : SoundHandler
    [Parsed_pan_1 @ 0xaef0c000] This syntax is deprecated. Use '|' to separate the list items ('stereo|c0<c0+c2|c1<c1+c3' instead of 'stereo:c0<c0+c2:c1<c1+c3')
    [AVFilterGraph @ 0xaf117180] Error initializing filter 'pan' with args 'stereo:c0<c0+c2:c1<c1+c3'
    Error initializing complex filters.
    Invalid argument

新的语法是pan=stereo | c0谢谢你的回答。他们的文档可以突出显示每个版本中引入的所有代码级更改,以便从旧ffmpeg版本迁移到新ffmpeg版本变得容易?不适用于私有API的更改,如过滤器参数。