我有麻烦从MKV文件中获取第一个流。奇怪的是,我的脚本曾经用于较旧的Debian,而且相同的代码在Debian 8上不起作用。我也检查了手册,并且有相同的内容:
ffmpeg -i INPUT -map 0:1 out.wav
你知道出了什么问题吗?
谢谢
tommy@reco1:/home/www/media/20$ ffmpeg -i /home/www/media/21/21.mkv -map 0:1 /var/www/vids/21/new.mkv
ffmpeg version 2.6.8 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.9.2 (Debian 4.9.2-10)
configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libvpx --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-librtmp --enable-avfilter --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/x86_64-linux-gnu --disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-frei0r --enable-openssl --enable-libass --enable-libopus --enable-fontconfig --enable-libpulse --disable-mips32r2 --disable-mipsdspr1 --disable-mipsdspr2 --enable-libvidstab --enable-libzvbi --enable-avresample --disable-htmlpages --disable-podpages --enable-libutvideo --enable-libfdk-aac --enable-libx265 --enable-libiec61883 --enable-vaapi --enable-libdc1394 --disable-altivec --shlibdir=/usr/lib/x86_64-linux-gnu
libavutil 54. 20.100 / 54. 20.100
libavcodec 56. 26.100 / 56. 26.100
libavformat 56. 25.101 / 56. 25.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.102 / 5. 11.102
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Guessed Channel Layout for Input Stream #0.1 : mono
Guessed Channel Layout for Input Stream #0.2 : mono
Guessed Channel Layout for Input Stream #0.3 : mono
Guessed Channel Layout for Input Stream #0.4 : stereo
Input #0, matroska,webm, from '/home/www/media/21/21.mkv':
Metadata:
MINOR_VERSION : 0
COMPATIBLE_BRANDS: mp42isom
MAJOR_BRAND : mp42
ENCODER : Lavf56.25.101
Duration: 00:01:30.16, start: 0.000000, bitrate: 3512 kb/s
Stream #0:0(und): Video: h264 (Main), yuv420p(tv), 1024x576 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
Stream #0:1: Audio: pcm_s16le, 16000 Hz, 1 channels, s16, 256 kb/s
Metadata:
ENCODER : Lavc56.56.101 pcm_s16le
Stream #0:2: Audio: pcm_s16le, 16000 Hz, 1 channels, s16, 256 kb/s
Metadata:
ENCODER : Lavc56.56.101 pcm_s16le
Stream #0:3: Audio: pcm_s16le, 16000 Hz, 1 channels, s16, 256 kb/s
Metadata:
ENCODER : Lavc56.56.101 pcm_s16le
Stream #0:4(und): Audio: pcm_s16le, 16000 Hz, 2 channels, s16, 512 kb/s (default)
Metadata:
LANGUAGE : und
ENCODER : Lavc56.56.101 pcm_s16le
/var/www/vids/21/new.mkv: No such file or directory
答案 0 :(得分:1)
此消息:/var/www/vids/21/new.mkv: No such file or directory
有点清楚。您要写入的目录:/var/www/vids/21
显然不存在。尝试创建它并查看它的作用。