cndaqiang / cndaqiang.github.io

https://cndaqiang.github.io/
MIT License
8 stars 3 forks source link

ffmpeg使用 #5

Open cndaqiang opened 3 years ago

cndaqiang commented 3 years ago

conda install ffmpeg

cndaqiang commented 3 years ago

从文件列表读入-f concat

rm input.txt
for i in $(ls *.png )
do 
#每0.5秒钟一个
echo -e "file '$i' \nduration 0.5 " >> input.txt
done
ffmpeg  -f concat -i input.txt    -pix_fmt yuv420p -c:v libx264 out.mp4

让普通播放器能正常播放

 -pix_fmt yuv420p -c:v libx264