FFMPEG输出文件#0不包含任何流 [英] FFMPEG Output file #0 does not contain any stream

查看:568
本文介绍了FFMPEG输出文件#0不包含任何流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am trying to run the following command for my Android app:

"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的视频.

I am trying to save a video, after its recorded, with a gif overlay on it.

推荐答案

如果您查看FFmpeg android示例,您将看到它们将每个"(空格)分隔开,因此无需传递集成的字符串命令您应该执行以下操作:

if you take a look at the FFmpeg android sample, you will see that they are separating every " "(space) , so instead of passing an integrated string command you should do something like this:

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

......

这篇关于FFMPEG输出文件#0不包含任何流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆