我有第三个流的文件,它可能是来自 FCP 的一些元数据。这是 ffprobe 的输出:
ffprobe 00700.mov
ffprobe version 2.0.1 Copyright (c) 2007-2013 the FFmpeg developers
built on Aug 27 2013 20:17:24 with gcc 4.5 (SUSE Linux)
configuration: --enable-gpl --enable-shared --enable-libmp3lame --enable-libxvid --enable-libx264 --enable-nonfree --enable-postproc --enable-version3
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.100 / 55. 12.100
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 79.101 / 3. 79.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. …
Run Code Online (Sandbox Code Playgroud) 如果我有:
for i in *.mov;
do
ffmpeg -y -i $i -c:v copy -c:a copy ${i%%.mov}.mp4
done
Run Code Online (Sandbox Code Playgroud)
这运行良好。但如果我跑:
find . -name "*.ts" -print0 | while read -d $'\0' file;
do
ffmpeg -i "$file" -c copy -map 0 "${file%%.ts}_rec.mp4";
done
Run Code Online (Sandbox Code Playgroud)
这失败了。我需要输入-nostdin。
find . -name "*.ts" -print0 | while read -d $'\0' file;
do
ffmpeg -nostdin -i "$file" -c copy -map 0 "${file%%.ts}_rec.mp4";
done
Run Code Online (Sandbox Code Playgroud)
文档解释说,这会禁用标准输入上的交互,并且对后台进程很有帮助。
为什么在第二种情况下 FFmpeg 是后台进程?或者还有其他问题吗?