【问题标题】:FFMPEG Output file #0 does not contain any streamFFMPEG 输出文件#0 不包含任何流
【发布时间】:2017-09-11 06:57:08
【问题描述】:

我正在尝试为我的 Android 应用运行以下命令:

"ffmpeg -i /full/path.video.mp4 -ignore_loop 0 -i myGif.gif -filter_complex \"[0][1]overlay=0:H-100\" /full/path/videoWithGifOverlay.mp4"

但我得到了一个错误。

这是输出:

04-14 18:36:30.386 30508-30508/com.example.android.camera2video I/onProgress(): ***Output #0, mp4, to 'ffmpeg -i /full/path/video.mp4 -ignore_loop 0 -i myGif.gif -filter_complex "[0][1]overlay=0:H-100" /full/path/videoWithGifOverlay.mp4':
04-14 18:36:30.386 30508-30508/com.example.android.camera2video I/onProgress(): ***Output file #0 does not contain any stream
04-14 18:36:30.386 30508-30508/com.example.android.camera2video E/onFailure(): ***ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
    built with gcc 4.8 (GCC)
    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=
    libavutil      55. 17.103 / 55. 17.103
    libavcodec     57. 24.102 / 57. 24.102
    libavformat    57. 25.100 / 57. 25.100
    libavdevice    57.  0.101 / 57.  0.101
    libavfilter     6. 31.100 /  6. 31.100
    libswscale      4.  0.100 /  4.  0.100
    libswresample   2.  0.101 /  2.  0.101
    libpostproc    54.  0.100 / 54.  0.100
  Output #0, mp4, to 'ffmpeg -i /full/path/video.mp4 -ignore_loop 0 -i myGif.gif -filter_complex "[0][1]overlay=0:H-100" /full/path/videoWithGifOverlay.mp4':
  Output file #0 does not contain any stream

我正在尝试保存一个视频,在它录制后,上面有一个 gif 覆盖。

【问题讨论】:

  • 您的输出文件似乎被命名为ffmpeg -i /full/path/video.mp4 -ignore_loop 0 -i myGif.gif -filter_complex "[0][1]overlay=0:H-100" /full/path/videoWithGifOverlay.mp4,而不是videoWithGifOverlay.mp4。可能是典型的常见 Android 引用问题。

标签: android ffmpeg android-ffmpeg


【解决方案1】:

如果您查看 FFmpeg android 示例,您会发现它们将每个 " "(space) 分开,因此您应该执行以下操作,而不是传递集成的字符串命令:

String[] commands = new String[10];
commands[0] ="-i";
commands[1] = "/full/path.video.mp4";

......

【讨论】:

    【解决方案2】:

    我有类似的问题。我应用 ffmpeg 解码 h264 文件:

    ffmpeg -hide_banner -vsync 0 -i .\h264\test_hp_cbr16_20M.h264 -pix_fmt yuv420p -y rec.yuv [h264 @ 000001ad31d8ae80] 找不到流 0 的编解码器参数(视频:h264,无):未指定大小 考虑增加“analyzeduration”和“probesize”选项的值 输入 #0,h264,来自 '.\h264\test_hp_cbr16_20M.h264': 持续时间:不适用,比特率:不适用 流 #0:0:视频:h264,无,25 tbr,1200k tbn,50 tbc 输出#0,rawvideo,到“rec.yuv”: 输出文件 #0 不包含任何流

    “输出文件 #0 不包含任何流”的原因 - 输入文件为空(文件大小为 0)

    【讨论】:

      猜你喜欢
      • 2019-07-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-01
      • 2017-04-09
      相关资源
      最近更新 更多