gpt4 book ai didi

bash - ffmpeg在cygwin下找不到输出目录

转载 作者:行者123 更新时间:2023-12-04 22:52:04 27 4
gpt4 key购买 nike

我正在使用 ffmpeg 的 windows 版本(详情如下),当我尝试使用不在本地目录中的输出文件对视频进行转码时,它会提示错误消息:

/dtop/out.mp4: No such file or directory

我的 cygwin 挂载如下 - 我没有找到任何其他未正确遵循挂载/链接的应用程序...

[lwobker:/dtop/vertigo]$ mount
C:/Documents and Settings/lwobker/Desktop on /dtop type ntfs (binary)
C:/cygwin/bin on /usr/bin type ntfs (binary,auto)
C:/cygwin/lib on /usr/lib type ntfs (binary,auto)
C:/cygwin on / type ntfs (binary,auto)
C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)

到目前为止,这是我设法弄清楚的,这使我相信出于某种原因 FFMPEG 不喜欢在 cygwin 中跟踪挂载点或链接。但如果我能弄清楚原因,我会被诅咒的......

如果我这样做,它可以工作:
ffmpeg -i ./input.mp4 ./out.mp4

如果我这样做,它可以工作(权限和安装/链接检查):
触摸/dtop/out.mp4

但是,如果我给出的文件位置不在当前工作目录或当前工作目录的子目录中,它会呕吐:

[lwobker:/dtop/vertigo]$ ffmpeg -i 00001.MTS /dtop/out.mp4
ffmpeg version N-64919-ga613257 Copyright (c) 2000-2014 the FFmpeg developers
<snip>
Input #0, mpegts, from '00001.MTS':
Duration: 00:01:41.63, start: 1.033367, bitrate: 10221 kb/s
Program 1
Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1440x1080 [SAR 4:3 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
/dtop/out.mp4: No such file or directory

如果我给它/cygdrive/c/somefile.mp4 作为参数,它也会呕吐 - 它也不会找到。

任何想法都会非常感激。我使用的是我在 cygwin 中从本地源代码编译的 FFMPEG 版本,但是当我移动机器时,我无法正确重新编译它,所以我希望能解决这个问题,以便我可以使用预编译的二进制文件为了方便...

FFMPEG 版本详情:

[lwobker:/dtop/vertigo]$ ffmpeg
ffmpeg version N-64919-ga613257 Copyright (c) 2000-2014 the FFmpeg developers
built on Jul 23 2014 00:35:22 with gcc 4.8.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
libavutil 52. 92.101 / 52. 92.101
libavcodec 55. 69.100 / 55. 69.100
libavformat 55. 48.101 / 55. 48.101
libavdevice 55. 13.102 / 55. 13.102
libavfilter 4. 11.102 / 4. 11.102
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 19.100 / 0. 19.100
libpostproc 52. 3.100 / 52. 3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

最佳答案

您不能提供 Windows native 程序 Cygwin 路径,它们不理解
那。但是,您可以将包装脚本放在与 ffmpeg.exe 相同的文件夹中。 ,
并称它为ffmpeg .像这样

#!/bin/sh
for each
do
foo=$(cygpath -w -- "$each")
bar+=("$foo")
done
ffmpeg.exe "${bar[@]}"

然后你从这个

$ ffmpeg.exe -i 1_Les_Nuits.mp3 /tmp/outfile.m4a
/tmp/outfile.m4a: No such file or directory

对此

$ ffmpeg -i 1_Les_Nuits.mp3 /tmp/outfile.m4a
frame=1 fps=0.1 q=33.0 Lsize=6046kB time=00:06:21.52 bitrate= 129.8kbits/s

另一种选择,如果它对你有用,就是在交易时只使用 Windows 路径
使用 Windows native 程序,例如
ffmpeg.exe -i 'C:\1_Les_Nuits.mp3' 'C:\outfile.m4a'

关于bash - ffmpeg在cygwin下找不到输出目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25003781/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com