1)
確保視頻文件實際上是在同一文件夾中的應用程序(我假設你已經嘗試過這一點),否則指定絕對路徑。
2)
如果您使用的是Windows,你可能需要一個解碼包讀取視頻文件(例如,K-Lite Codec Pack)。
正如Macmade所建議的,AVI只是一個容器,可以容納不同的音頻,視頻甚至隱藏式字幕編解碼器。另外,here是Zeranoe針對Windows的FFmpeg版本。你可以在你的文件的編解碼器內容的更多信息,如果您做到以下幾點:
ffmpeg -i guitarplaying.avi
你應該看到的輸出,看起來像這樣:
ffmpeg version 0.8.7.git, Copyright (c) 2000-2011 the FFmpeg developers
built on Dec 6 2011 09:20:43 with gcc 4.6.1
configuration: --pkg-config=pkg-config --enable-gpl --enable-version3 --enable
-nonfree --enable-runtime-cpudetect --enable-memalign-hack --enable-postproc --a
rch=x86 --target-os=mingw32 --cross-prefix=i686-w64-mingw32- --prefix=/home/wluc
as/ffmpeg-cross/build/deploy --enable-libx264 --enable-libvpx --enable-zlib --en
able-bzlib --enable-libxvid --enable-libfaac --enable-libmp3lame --enable-libvor
bis --enable-libtheora --enable-libopenjpeg --enable-libfreetype
libavutil 51. 30. 0/51. 30. 0
libavcodec 53. 40. 0/53. 40. 0
libavformat 53. 24. 0/53. 24. 0
libavdevice 53. 4. 0/53. 4. 0
libavfilter 2. 51. 0/2. 51. 0
libswscale 2. 1. 0/2. 1. 0
libpostproc 51. 2. 0/51. 2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '..\..\Videos\Sintel\sintel_trailer-720p
.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 1970-01-01 00:00:00
title : Sintel Trailer
artist : Durian Open Movie Team
encoder : Lavf52.62.0
copyright : (c) copyright Blender Foundation | durian.blender.org
description : Trailer for the Sintel open movie project
Duration: 00:00:52.20, start: 0.000000, bitrate: 1165 kb/s
Stream #0:0(und): Video: h264 (High) (avc1/0x31637661), yuv420p, 1280x720,
1033 kb/s, 24 fps, 24 tbr, 24 tbn, 48 tbc
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a/0x6134706D), 48000 Hz, stereo, s16, 126
kb/s
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name :
所以,你可以看到這個.MP4容器有一個H.264視頻編解碼器和一個AAC音頻編解碼器。
AVI是一種文件格式,不是視頻格式。因此,您應該檢查視頻是否以支持的視頻格式編碼,因爲AVI文件可能以不同的方式進行編碼。 – Macmade