我试图将 flac 音轨分割成几个文件,但失败了Output file #0 does not contain any stream
。该文件实际上是在 ogg 容器中编码的 flac,但我对常规 flac 文件也遇到了同样的问题。
命令:
ffmpeg.exe -i D:\_\RecManagerTests\103_1.flog -f segment -segment_time 30 -c copy D:\_\RecManagerTests\StreamingChunks/103_1_%03d.flog
输出:
ffmpeg version N-100131-g0639f5c294 Copyright (c) 2000-2020 the FFmpeg
developers built with gcc 9.3-win32 (GCC) 20200320 configuration:
--prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-zlib --enable-libxml2 --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-opencl --enable-libvmaf --enable-vulkan --enable-libvorbis --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-libs=-lgomp libavutil 56. 61.100 / 56. 61.100 libavcodec 58.114.100 / 58.114.100 libavformat 58. 64.100 / 58. 64.100 libavdevice 58. 11.103 /
58. 11.103 libavfilter 7. 91.100 / 7. 91.100 libswscale 5. 8.100 / 5. 8.100 libswresample 3. 8.100 / 3. 8.100 libpostproc 55. 8.100 / 55. 8.100 **Input #0**, ogg, from
'D:\_\RecManagerTests\103_1.flog': Duration: 00:07:14.68, start:
0.000000, bitrate: 467 kb/s
Stream #0:0: Audio: flac, 44100 Hz, stereo, s16
Metadata:
encoder : Lavc58.114.100 flac Output #0, segment, to 'D:\_\RecManagerTests\StreamingChunks/103_1_%03d.flog': **Output file #0
does not contain any stream**
答案1
正如@Rotem所建议的,目标扩展正在确定目标格式/编码,flog
是一个虚构的扩展(flac + ogg),例如使用它flac
来解决问题:
ffmpeg.exe -i source.flog -f segment -segment_time 30 -c copy target_%03d.flac