raspberry pi 底下
列印系統用 CUPS
掃描系統用 SANE
sudo apt install sane-utils
scanimage -L (查看有哪些裝置可用)
scanimage -d 'escl:https://192.168.1.68:443' --help (查看支援的指令有哪些)
scanimage -d 'epson2:net:192.168.1.55' --mode Color --resolution 300 --format=jpeg > test001.jpg
scanimage -d 'epson2:net:192.168.1.55' --mode Gray --resolution 300 --format=jpeg > test002.jpg
scanimage -d 'escl:https://192.168.1.68:443' --mode Color --resolution 300 --format=jpeg > test003.jpg
scanimage -d 'airscan:e3:EPSON WF-C579R Series' --mode Color --resolution 300 --format=jpeg > test004.jpg
pi@raspberrypi:~ $ scanimage -L
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN "
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Author" content="SEIKO EPSON">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0">
<meta name="format-detection" content="telephone=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<script type="text/javascript">
var path = location.href;
var Ret;
Ret = path.indexOf("/PRESENTATION/ADVANCED/COMMON/TOP", 0);
if (-1 < Ret) {
} else {
Ret = path.indexOf("PRESENTATION",0);
if (-1 < Ret) {
document.write("<meta http-equiv = 'refresh' content='0; URL= ./ADVANCED/COMMON/TOP'>");
} else {
document.write("<meta http-equiv = 'refresh' content='0; URL= ./PRESENTATION/ADVANCED/COMMON/TOP'>");
}
}
</script>
</head>
<body><noscript>啓用瀏覽器的JavaScript設定。</noscript></body></HTML>
device `escl:http://192.168.1.55:443' is a Epson L565 Series platen,adf scanner
device `escl:https://192.168.1.68:443' is a Epson WF-C579R Series platen,adf scanner
device `epson2:net:192.168.1.55' is a Epson PID 08D3 flatbed scanner
device `airscan:e2:EPSON L565 Series' is a eSCL EPSON L565 Series ip=192.168.1.55
device `airscan:e3:EPSON WF-C579R Series' is a eSCL EPSON WF-C579R Series ip=192.168.1.68
<script>
async function template()
{
let oBtn=event.target;
oBtn.setAttribute("disabled", "true");
while(true)
{
try
{
var oResponse=await fetch(
"a.php",
{
method: "POST",
headers: { "Content-Type": "application/json; charset=UTF-8" },
body: JSON.stringify({"strUsername":"john", "strPassword":"123"})
}
);
var strJson=await oResponse.text();
var oJson=JSON.parse(strJson);
console.log(oJson);
}
catch(oError)
{
console.log({ "oResponse":oResponse, "strJson":strJson, "oError":oError });
alert((oResponse.url+"\n"+oResponse.status+"\n"+oResponse.statusText)+"\n\n"+strJson+"\r\n"+(oError.toString()));
break;
}
break;
}
oBtn.removeAttribute("disabled");
}
</script>
<?php
header("Content-Type: application/json; charset=utf-8");
$strJson=file_get_contents('php://input'); // 讀入 json 資料
$oInpData=json_decode($strJson);
$oOutData=new stdClass();
$oOutData->booSuccess=true;
$oOutData->oInp=$oInpData;
echo json_encode($oOutData, JSON_UNESCAPED_UNICODE); // 輸出 json 資料
?>
raspberry pi 5 + ubuntu + blender
sudo apt install blender
LIBGL_ALWAYS_SOFTWARE=1 blender
或
LIBGL_ALWAYS_SOFTWARE=1 blender --gpu-backend opengl
------
sudo apt install kdenlive
kdenlive
linux使用網路磁碟機(cifs)(sshfs)
sudo mkdir /mnt/nas
sudo mount -t cifs //192.168.x.x/somefolder /mnt/nas -o username=yourusername,password="yourpassword",uid=$(id -u),gid=$(id -g)
sudo mkdir /mnt/happy.com
sudo sshfs -p 8888 -o allow_other pi@happy.com:/ /mnt/happy.com/
假如檔案名稱是 001.jpg, 002.jpg 003.jpg, ...... 那就要用 %3d.jpg
ffmpeg -framerate 24 \
-i './buffer/vol1_04_上平二冬其一_%d.jpg' \
-i 'vol1_04_上平二冬其一.mp3' \
-c:v libx264 \
-preset fast \
-crf 18 \
-pix_fmt yuv420p \
-c:a aac \
-b:a 192k \
-shortest \
'vol1_04_上平二冬其一.mp4'