我正在尝试使用我在网上找到的脚本将200MB .ogv文件转换为.avi:
#!/bin/bash
# ogv to avi
# Call this with multiple arguments
# for example : ls *.{ogv,OGV} | xargs ogv2avi
N=$#;
echo "Converting $N files !"
for ((i=0; i<=(N-1); i++))
do
echo "converting" $1
filename=${1%.*}
mencoder "$1" -ovc xvid -oac mp3lame -xvidencopts pass=1 -o $filename.avi
shift 1
done
在此之后,我所要做的就是$ ogv2avi name_of_file.ogv 并创建converted.avi文件。
它适用于小文件,但它似乎对大文件崩溃,我只能在30分钟录制的前3分钟左右。
Too many audio packets in the buffer: (4096 in 850860 bytes).
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.
Flushing video frames.
Writing index...
Writing header...
ODML: vprp aspect is 16384:10142.
Setting audio delay to 0.078s.
Video stream: 784.308 kbit/s (98038 B/s) size: 21254748 bytes 216.800 secs 3000 frames
Audio stream: 87.341 kbit/s (10917 B/s) size: 2372536 bytes 217.313 secs
答案 0 :(得分:0)
我有完全相同的问题,我唯一的解决方法(一个草率的解决方案,但它的工作原理)是在Ubuntu桌面上播放.ogv视频并记录视频位于台式录像机的视频不生成.ogv文件(我推荐Kazam生成.webm文件)。然后根据需要使用Audacity编辑输出视频的音频,并使用MkvMerge将编辑后的音频与输出视频混合。