问题描述
我在修整视频时遇到没有这样的文件或目录
例外.
I am getting the No such file or directory
exception on video trimming.
视频路径: /storage/emulated/0/Pictures/Instagram/Fast&狂怒7-获取低扩展版本Video.mp4
文件名: Fast&狂怒7-获取低扩展版本Video.mp4
和 ffmpeg 在/storage/emulated/0/Pictures/Instagram/Fast中仅搜索
Fast
:没有这样的文件或目录
and ffmpeg searching for only Fast
in/storage/emulated/0/Pictures/Instagram/Fast: No such file or directory
我发现了这个问题,这是由于文件名之间存在空格而引起的,您可以检查上述路径,并且例外.
I have found the issue, it is causing due to the file name having spaces in between them you can check in the above mentioned path and in exception.
更改文件名后可以正常工作,但是更改设备中每个文件的名称都不是正确的方法,所以我该如何解决此异常
after changing the file name its working but the changing name of every file from the device it's not the right way so how can I solve this exception
FAILED with output : WARNING: linker: /data/user/0/com.example.SeekBarActivity/files/ffmpeg
has text relocations. This is wasting memory and prevents security hardening.
Please fix. FFmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
built on Oct 7 2014 15:08:46 with gcc 4.8 (GCC)
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=
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
/storage/emulated/0/Pictures/Instagram/Fast: No such file or directory
推荐答案
尝试替换
execFFmpegBinary("-i " + path + " -ss " + startMs / 1000 +
" -to " + endMs / 1000 + " -c copy " + destPath);
使用
execFFmpegBinary(new String[] {"-i", path, "-ss", "" + startMs / 1000,
"-to", "" + endMs / 1000, "-c", "copy", destPath});
ffmpeg-android-java的修复可以追溯到2015年.
The fix to ffmpeg-android-java dates back to 2015.
这篇关于找不到FFmpeg文件异常,没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!