首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >FFmpeg文件未找到异常,没有此类文件或目录

FFmpeg文件未找到异常,没有此类文件或目录
EN

Stack Overflow用户
提问于 2018-02-06 12:16:05
回答 4查看 2.7K关注 0票数 0

我得到了视频修剪的No such file or directory异常。

视频路径: /storage/emulated/0/Pictures/Instagram/Fast & Furious 7 - Get Low Extended Version Video.mp4

文件名: Fast & Furious 7 - Get Low Extended Version Video.mp4

ffmpeg/storage/emulated/0/Pictures/Instagram/Fast: No such file or directory中只搜索Fast

我发现了这个问题,因为文件名在它们之间有空格,所以您可以签入上面提到的路径和异常。

在更改文件名后,它的工作状态,但从设备中更改每个文件的名称,这不是正确的方法,所以我如何解决这个异常

代码语言:javascript
复制
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
EN

回答 4

Stack Overflow用户

发布于 2018-02-07 10:00:09

试着取代

代码语言:javascript
复制
execFFmpegBinary("-i " + path + " -ss " + startMs / 1000 + 
       " -to " + endMs / 1000 + " -c copy " + destPath);

使用

代码语言:javascript
复制
execFFmpegBinary(new String[] {"-i", path, "-ss", "" + startMs / 1000,           
       "-to", "" + endMs / 1000, "-c", "copy", destPath});

ffmpeg-android-java修复可以追溯到2015年。

票数 1
EN

Stack Overflow用户

发布于 2018-02-07 10:47:58

试着用.

代码语言:javascript
复制
execFFmpegBinary("-i '/storage/emulated/0/Pictures/Instagram/Fast\ &\ Furious\ 7\ -\ Get\ Low\ Extended\ Version\ Video.mp4'"  + "-ss " + startMs / 1000 +
       " -to " + endMs / 1000 + " -c copy " + destPath);
票数 0
EN

Stack Overflow用户

发布于 2018-05-26 20:12:56

很晚才回答这个问题,但我还是想补充一下..我就是这样执行命令的:

代码语言:javascript
复制
String[] s = {"-i" ,sourcePath,"-crf","18","-c:v","libx264","-preset","ultrafast",directoryToStore+"/"+outputName};
s.execFFmpegBinary();

我已经测试过使用带有名称空间的文件,它运行得很好。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48642873

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档