1

文件生成动态二维码

 1 year ago
source link: https://iminto.github.io/post/%E6%96%87%E4%BB%B6%E7%94%9F%E6%88%90%E5%8A%A8%E6%80%81%E4%BA%8C%E7%BB%B4%E7%A0%81/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

文件生成动态二维码 - 白菜不是菜

白菜不是菜 他们相信天堂是有的,可以实现的,但在现世界与那天堂的中间隔着一座海,一座血污海,人类泅得过这血海,才能登彼岸,他们决定先实现那血海。

文件生成动态二维码

 2023-06-16 136 字 Linux 

将图片/文件转为二维码动画

yum install qrencode 
test="$(cat dianlong.jpg| base64|tr '\n' ' '|sed 's/[[:space:]]//g')"
echo $test >> base64.txt #文件转base64
split -b 1k base64.txt 1_ #按1K分割
for x in $(find -type f  -name "1_*"); do cat $x|qrencode -o $x.png -s 4 ;done
ffmpeg -framerate 6  -pattern_type glob -i '1_*.png'  -loop 0 out1.gif #转GIF
ffmpeg -framerate 10  -pattern_type glob -i '1_*.png'  -c:v libx264 -pix_fmt yuv420p out.mp4
#计算帧数,验证
ffprobe -i out.mp4
ffmpeg -i out.mp4  -map 0✌️0 -c copy -f null -
ffprobe -v error -select_streams v:0 -show_entries stream=nb_frames -of default=nokey=1:noprint_wrappers=1 out.mp4
ffmpeg -i out1.gif re/img_%2d.jpg
base64 -d base64.txt >b.jpg

除特殊注明部分,本站内容采用 CC BY-NC-SA 4.0 进行许可。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK