- 代碼: 選擇全部
#!/bin/sh
if [ -z "$1" ]; then
echo "Usage: $0 {-divx|-xvid} list_of_flv_files"
exit 1
fi
# video encoding bit rate
V_BITRATE=1000
while [ "$1" ]; do
case "$1" in
-divx)
MENC_OPTS="-ovc lavc -lavcopts \
vcodec=mpeg4:vbitrate=$V_BITRATE:mbd=2:v4mv:autoaspect"
;;
-xvid)
MENC_OPTS="-ovc xvid -xvidencopts bitrate=$V_BITRATE:autoaspect"
;;
*)
if file "$1" | grep -q "Macromedia Flash Video"; then
mencoder "$1" $MENC_OPTS -vf pp=lb -oac mp3lame \
-lameopts fast:preset=standard -o \
"`basename $1 .flv`.avi"
else
echo "$1 is not Flash Video. Skipping"
fi
;;
esac
shift
done
我忘上列的 script 轉flv 檔. 不過 結果出現
- 代碼: 選擇全部
MEncoder dev-SVN-rUNKNOWN-4.1.2 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Pentium(R) M processor 1.60GHz (Family: 6, Model: 13, Stepping: 8)CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
success: format: 0 data: 0x0 - 0xbdbbf7
libavformat file format detected.
[mp3 @ 0x87ab9e8]Could not find codec parameters (Audio: mp3, 80 kb/s)
LAVF_header: av_find_stream_info() failed
Audio file file format detected.
Video stream is mandatory!
Exiting...
請問是什麼原因呢?
win32codec 我有用 apt-get install w32codecs 安裝了.