ffmpeg连接: "Unsafe file name"

标签 ffmpeg concatenation

尝试将一堆 mts 文件转换为一个大 mp4 文件:

stephan@rechenmonster:/mnt/backupsystem/archive2/Videos/20151222/PRIVATE/AVCHD/BDMV$ ~/bin/ffmpeg-git-20160817-64bit-static/ffmpeg -v info -f concat -i <(find STREAM -name '*' -printf "file '$PWD/%p'\n") -deinterlace -r 25 -s hd720 -c:v libx264 -crf 23 -acodec copy -strict -2 ~/tmp/Videos/20151222.mp4
ffmpeg version N-81364-gf85842b-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.1 (Debian 5.4.1-1) 20160803
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --enable-libopus --enable-libass --enable-gnutls --enable-libvidstab --enable-libsoxr --enable-frei0r --enable-libfribidi --disable-indev=sndio --disable-outdev=sndio --enable-librtmp --enable-libmfx --enable-libzimg --cc=gcc-5
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 53.100 / 57. 53.100
  libavformat    57. 46.101 / 57. 46.101
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 51.100 /  6. 51.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
[concat @ 0x56054a0] Unsafe file name '/mnt/backupsystem/archive2/Videos/20151222/PRIVATE/AVCHD/BDMV/STREAM'
/dev/fd/63: Operation not permitted

你知道这里出了什么问题吗?在这种情况下,术语“不安全文件”是什么意思?

最佳答案

@Mulvya 给出的答案(谢谢!)有效:“在 -safe 0 之前添加 -i”。

然后又出现了 find STREAM -name '*' -printf "file '$PWD/%p'\n" 的问题它返回空路径作为第一个条目。

我将其更改为 for f in ./*.wav; do echo "file '$PWD/$f'"; done (参见 https://trac.ffmpeg.org/wiki/Concatenate )现在它似乎起作用了。万岁!

关于ffmpeg连接: "Unsafe file name",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38996925/

相关文章:

android - SQLite 将列转换为逗号分隔的字符串

c - 通过串联将位(字节)存储在 long long 中

c++ - 如何使用 ffmpeg 以便不需要将其 dll 包含在您的应用程序文件夹中?

android - 适用于 Android 的预编译 FFmpeg 与使用 Android NDK 构建 FFmpeg

c++ - 如何使用 + 运算符连接字符串

mysql连接字符串,行值作为选择查询中每一行的列名(仅通过查询)

python - 减少n维numpy数组维数的有效方法

c# - 有没有办法在 c# 应用程序中使用 ffmpeg?

android - FFmpeg 命令执行

video - 尝试转换为 HTML5 时 ffmpeg 崩溃