本文介绍了Android FFmpeg报告“未找到文件协议”。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用android中的ffmpeg命令将序列图像转换为视频。
我已经为Android构建了ffmpeg并将ffmpeg二进制文件放在/ data / local文件夹中。
我在Android中使用 Runtime.getruntime.execute( mycommand)运行ffmpeg命令。

I am trying to convert sequence images to video using ffmpeg command in android.I have build ffmpeg for android and put ffmpeg binary file in /data/local folder.I am running ffmpeg command using Runtime.getruntime.execute("mycommand") in Android.

mycommand的结构是这样的

Stucture of mycommand is like this

"/data/local/ffmpeg -r 40 qscale 2 -i /mnt/sdcard/images/img%d.jpg /mnt/sdcard/images/finalvideo.mp4"

mycommand 包含我放置所有序列图像的文件夹的路径。运行此命令会给我错误找不到协议。

mycommand contains the path of a folder where I placed all my sequence images. Running this command gives me error "protocol not found".

我还阅读了ffmpeg文档中默认的文件协议。

Also I read that file protocol is default in ffmpeg documentation.

如何运行此类命令?

运行ffmpeg -i /mnt/sdcard/vid.mp4等简单命令后出现的错误

The Error I am getting after running simple command like ffmpeg -i /mnt/sdcard/vid.mp4

ffmpeg version 0.11.1.git Copyright (c) 2000-2012 the FFmpeg developers
built on Sep 26 2012 11:58:35 with gcc 4.4.3 (GCC)
configuration: --target-os=linux --prefix=/home/esteves/android-ffmpeg --enable-cross-compile --enable-runtime-cpudetect --disable-asm --arch=arm --cc=/home/esteves/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc --cross-prefix=/home/esteves/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- --disable-stripping --nm=/home/esteves/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-nm --sysroot=/home/esteves/android-ndk/platforms/android-8/arch-arm --enable-nonfree --enable-version3 --disable-everything --enable-gpl --disable-doc --enable-avresample --enable-demuxer=amr --enable-demuxer=aac --enable-demuxer=rawvideo --enable-demuxer=rtsp --enable-muxer=rtsp --enable-muxer=flv --enable-muxer=mpegts --enable-muxer=mp4 --enable-demuxer=rtp --enable-demuxer=rtp --disable-ffplay --disable-ffserver --enable-ffmpeg --disable-ffprobe --enable-libx264 --enable-encoder=libx264   libavutil      51. 72.100 / 51. 72.100
libavcodec     54. 55.100 / 54. 55.100
libavformat    54. 25.105 / 54. 25.105
libswscale      2.  1.101 /  2.  1.101
error of main   libswresample   0. 15.100 /  0. 15.100
error of main   libpostproc    52.  0.100 / 52.  0.100
/mnt/sdcard/vid.mp4: Protocol not found


推荐答案

避免使用编译–禁用所有内容



它将禁用所有组件,包括协议支持。

Avoid compiling with --disable-everything

It will disable all components including protocol support.

您将必须手动启用所需的组件,例如-启用协议或诸如-enable-protocol = file,pipe 之类的零碎形式。但是,这很难正确执行,因为用户经常忘记启用他们需要的功能。请参阅的输出。/configure--help 了解更多信息。

You will have to manually enable your desired components, such as --enable-protocols or in a piecemeal fashion such as --enable-protocol=file,pipe. However, this is difficult to do properly because users often forget to enable something they need. See the output of ./configure --help for more info.

这篇关于Android FFmpeg报告“未找到文件协议”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-27 12:29