2020年10月21日水曜日

Lichee Zero-Dockを使ってみる

LCDが使用できて、安価なSBCを探していたら、見つけた。
https://akizukidenshi.com/catalog/g/gM-15544/
https://akizukidenshi.com/catalog/g/gM-14787/
https://akizukidenshi.com/catalog/g/gM-14873/

日本語の情報があまりないように思えるので、ちょっと気が重いがとりあえず購入。

情報源

公式はこのあたりなのかな
http://zero.lichee.pro/
http://nano.lichee.pro/
https://licheepizero.us/
https://licheepizero.us/downloads/readme_en.txt
https://dl.sipeed.com/LICHEE/Zero

中国語読めないよー

翻訳版

https://translate.google.co.jp/translate?hl=ja&sl=auto&tl=ja&u=http%3A%2F%2Fzero.lichee.pro%2F

作成済みイメージで動作確認

作成済みイメージをダウンロード

情報源や、貴重な日本語ページを参考にさせていただいてイメージをダウンロードする
https://qiita.com/17_kitano/items/8f8add216affa81ad321
https://dl.sipeed.com/LICHEE/Zero/Images/dd_img

minX_dd.tar.bz2
にしてみた。

適当なmicroSDカードに書き込んでみる

udo dd bs=4M if=minX_dd/lichee_zero-mindX_alpha.dd of=/dev/sdd conv=fsync

そして、Licheeに装着、シリアルコンソールも接続
TX,RXの表示は基板シルクが正しいみたい(webのは間違っている?)

起動してみる

シリアルコンソールの設定は、115200-8-N-1

Linux LicheePi 4.10.2-licheepi-zero+ #15 SMP Sat Apr 15 21:38:23 CST 2017 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@LicheePi:~#

初期パスワードはroot/licheepiだった。

液晶パネルを接続してみる

40pinのRGB液晶が対応しているというざっくりとした情報しかなくて
かなり不安だったが、とりあえずつなげてみた


 

接続したのは、同じところが出しているこれ
https://akizukidenshi.com/catalog/g/gM-14873/

u-Bootの表示がされたみたい。

調子に乗って、startxしてみたけどウィンドウマネージャ的なものが無いのか起動はしなかった。
でもXサーバーは起動しているようだ。一歩づついこう。

xアプリケーションを起動してみる

なんて呼んだらいいかわからないけど、xclockとかxcalc、xeyesなんかのx系のアプリケーションが入っているみたい。

root@LicheePi:~# ls /usr/bin/x*
/usr/bin/x-terminal-emulator  /usr/bin/xgamma	   /usr/bin/xmore
/usr/bin/x11perf	      /usr/bin/xgc	   /usr/bin/xprop
/usr/bin/x11perfcomp	      /usr/bin/xhost	   /usr/bin/xrandr
/usr/bin/xargs		      /usr/bin/xinit	   /usr/bin/xrdb
/usr/bin/xauth		      /usr/bin/xkbbell	   /usr/bin/xrefresh
/usr/bin/xbiff		      /usr/bin/xkbcomp	   /usr/bin/xset
/usr/bin/xcalc		      /usr/bin/xkbevd	   /usr/bin/xsetmode
/usr/bin/xclipboard	      /usr/bin/xkbprint    /usr/bin/xsetpointer
/usr/bin/xclock		      /usr/bin/xkbvleds    /usr/bin/xsetroot
/usr/bin/xcmsdb		      /usr/bin/xkbwatch    /usr/bin/xsm
/usr/bin/xconsole	      /usr/bin/xkeystone   /usr/bin/xstdcmap
/usr/bin/xcursorgen	      /usr/bin/xkill	   /usr/bin/xsubpp
/usr/bin/xcutsel	      /usr/bin/xload	   /usr/bin/xterm
/usr/bin/xditview	      /usr/bin/xlogo	   /usr/bin/xvidtune
/usr/bin/xdpyinfo	      /usr/bin/xlsatoms    /usr/bin/xvinfo
/usr/bin/xdriinfo	      /usr/bin/xlsclients  /usr/bin/xwd
/usr/bin/xedit		      /usr/bin/xlsfonts    /usr/bin/xwininfo
/usr/bin/xev		      /usr/bin/xmag	   /usr/bin/xwud
/usr/bin/xeyes		      /usr/bin/xman	   /usr/bin/xxd
/usr/bin/xfd		      /usr/bin/xmessage
/usr/bin/xfontsel	      /usr/bin/xmodmap

実行してみよう

startx /usr/bin/xclock -- :0


 

うぉー懐かしい。久しぶりに見たなこれー

開発環境を導入する

このままでは何ができるのかとか手探りになってしまうので
思い切って開発環境を導入してみようと思う
作成済みのイメージでは、以下のやり方がわからなかった。

  • 有線LANが使えない
  • タッチパネルのキャリブレーションができない
  • ウィンドウマネージャが開かない

公式の方法 Dockerで環境構築

http://zero.lichee.pro/入门/docker_index.html
の手順でやってみる。

adeno@drakorange:~/develop$ docker pull zepan/licheepi
Using default tag: latest
latest: Pulling from zepan/licheepi
9fb6c798fa41: Pull complete 
3b61febd4aef: Pull complete 
9d99b9777eb0: Pull complete 
d010c8cf75d7: Pull complete 
7fac07fb303e: Pull complete 
4a3e8d4abe49: Pull complete 
4e7cdc979849: Pull complete 
68de60586b36: Pull complete 
Digest: sha256:da6824787eb6b2e8b2556be6863b4dbfbe1683a1c834f257f9f8f5d993224bae
Status: Downloaded newer image for zepan/licheepi:latest
docker.io/zepan/licheepi:latest

取得できた

adeno@drakorange:~/develop$ docker run -d -p 6666:22 zepan/licheepi /usr/sbin/sshd -D
<略>
adeno@drakorange:~/develop$ ssh root@localhost -p 6666
The authenticity of host '[localhost]:6666 ([127.0.0.1]:6666)' can't be established.
ECDSA key fingerprint is <略>
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[localhost]:6666' (ECDSA) to the list of known hosts.
root@localhost's password: 
Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 5.4.0-42-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage
Last login: Thu Oct  5 09:15:27 2017 from 192.168.242.1
root@50959d444d56:~# cat README.txt 
u-boot	is mainline uboot, support tf or spi nor boot.
linux is mainline linux, 4.13 branch.
lichee is BSP linux, 3.4 kernel.
camdroid is BSP camdroid.

every dir have rebuild.sh to rebuild the source code.

sshでコンテナ内に入れた

U-bootのコンパイル

http://zero.lichee.pro/系统开发/uboot_index.html

コンフィングファイルは

root@50959d444d56:~/u-boot# ls configs/Lichee*
configs/LicheePi_Zero_480x272LCD_defconfig  configs/LicheePi_Zero_defconfig
configs/LicheePi_Zero_800x480LCD_defconfig

繋いでいるLCDは800x480だったような気がするので

make LicheePi_Zero_800x480LCD_defconfig

とりあえず、何か変えてU-bootが更新できることを確認する。

サンプルとして紹介されている、起動時の「バージョン情報の非表示」をやってみる
http://zero.lichee.pro/系统开发/uboot_logo.html

#define CONFIG_HIDE_LOGO_VERSION

/* Locals */
static GraphicDevice *pGD;      /* Pointer to Graphic array */

249行目辺りに #define CONFIG_HIDE_LOGO_VERSION を追記した。
コンパイルは

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
または
./rebuild.sh

で行う。
すると
u-boot-sunxi-with-spl.bin
が生成される

U-bootの更新

早速、更新してみる。
http://zero.lichee.pro/系统开发/uboot_build.html
には、
「コンパイル後、u-boot-sunxi-with-spl.binが現在のディレクトリに生成されます。これを8Kオフセットに書き込んで開始できます。」 by Google翻訳
とある。
8Kオフセットとは?なので、他の情報源にて探してみる。
https://linux-sunxi.org/Mainline_U-Boot#Compile_U-Boot
ここによると

dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8

sdXの部分を自分の環境に合わせる。
ハマったのはデバイス全体?を指定すること。sdd1にしていたら、起動できなくて。。。

8Kオフセットの説明は、ここにあった。
https://linux-sunxi.org/Bootable_SD_card#SD_Card_Layout

このSDカードを刺して起動してみると、ちゃんと?バージョン情報が非表示になった。

USB OTGで仮想イーサーネットを使用する

U-bootやカーネル更新毎にSDカード挿抜するのは大変だし、耐久性が心配。
挿抜が面倒。挿抜が面倒。

USB-OTG

仮想イーサーネットが使用できるらしいので使ってみる
http://zero.lichee.pro/应用/otg2PC.html

Lichee Zero側

インターフェースを作成する

root@LicheePi:~# ifconfig usb0 192.168.10.100
root@LicheePi:~# ifconfig
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

usb0      Link encap:Ethernet  HWaddr 4e:40:46:**:**:**  
          inet addr:192.168.10.100  Bcast:192.168.10.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4 errors:0 dropped:3 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:592 (592.0 B)  TX bytes:0 (0.0 B)

PC側

特に複雑な手順はなし。

adeno@drakorange:~/develop/licheepizoro$ lsusb
Bus 001 Device 009: ID 0525:a4aa Netchip Technology, Inc. Linux-USB CDC Composite Gadge (Ethernet and ACM)

adeno@drakorange:~/develop/licheepizoro$ ifconfig

enp1s0f0u3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.10.1  netmask 255.255.255.0  broadcast 192.168.10.255
        inet6 ****::****:****:****:****  prefixlen 64  scopeid 0x20<link>
        ether 6a:91:64:**:**:**  txqueuelen 1000  (イーサネット)
        RX packets 6  bytes 392 (392.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 143  bytes 24341 (24.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

やってみる

u-Bootイメージファイルをscpで、Licheeに転送。
そして、自身でdd使って書き換える。

root@LicheePi:~# fdisk -l                           

Disk /dev/mmcblk0: 3.7 GiB, 3980394496 bytes, 7774208 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x33f10fcb

Device         Boot Start     End Sectors  Size Id Type
/dev/mmcblk0p1       2048   34815   32768   16M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      34816 1419263 1384448  676M 83 Linux

root@LicheePi:~# dd if=u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 seek=8

できた!

でも、でも、接続のたびにMACアドレスが変わってしまい、インターフェース設定をやり直す必要があるみたい。

イーサーネットを使用する

せっかくLANコネクタのあるDockを入手したので、LANを有用化したい。
http://zero.lichee.pro/驱动/Ethernet.html

Linuxカーネルコンパイル

root@50959d444d56:~# cat README.txt 
u-boot	is mainline uboot, support tf or spi nor boot.
linux is mainline linux, 4.13 branch.
lichee is BSP linux, 3.4 kernel.
camdroid is BSP camdroid.

every dir have rebuild.sh to rebuild the source code.

linuxディレクトリの中に入り
手順通り、dts、dtsiファイルを修正して

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

arch/arm/boot/zImage
arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dtb
をSDカードにコピーして、再起動

eth0の有効化

無事に起動したら

root@LicheePi:~# ifup eth0
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

[  374.205155] Generic PHY stmmac-0:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=stmmac-0:01, irq=-1)
[  374.217488] dwmac-sun8i 1c30000.ethernet eth0: No MAC Management Counters available
[  374.225386] dwmac-sun8i 1c30000.ethernet eth0: PTP not supported by HW
Listening on LPF/eth0/02:0f:e2:**:**:**
Sending on   LPF/eth0/02:0f:e2:**:**:**
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
[  381.526816] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPOFFER from 192.168.1.1
DHCPACK from 192.168.1.1
bound to 192.168.1.121 -- renewal in 83698 seconds.
root@LicheePi:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 02:0f:e2:**:**:**
          inet addr:192.168.1.121  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:45 errors:0 dropped:0 overruns:0 frame:0
          TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4536 (4.4 KiB)  TX bytes:4124 (4.0 KiB)
          Interrupt:35 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:112 (112.0 B)  TX bytes:112 (112.0 B)

root@LicheePi:~# 

いけた!

LAN未接続で、待たされる件

喜んでいたのだが
LAN未接続時に

a start job is running for raise network interfaces

で20秒くらい待たされてしまう。なんとかしたい。
https://askubuntu.com/questions/862176/how-to-fix-a-start-job-is-running-for-the-raise-network-in-ubuntu-server-16

mkdir -p /etc/systemd/system/networking.service.d/
bash -c 'echo -e "[Service]\nTimeoutStartSec=5sec" > /etc/systemd/system/networking.service.d/timeout.conf'
systemctl daemon-reload

いいね!

U-Bootの自己書き換え

といっても、sshできているので、PCから/boot/あたりにイメージデータを保存して
以下を実行するだけ、/dev/以降が変わるくらいで、他に気にするところはなかった。

dd if=/boot/u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 seek=8

状況の整理

いろいろやりながらで、時間も経ってきたのでよくわからなくなってきた。
今一度整理。

分類 方法 状況 ソース
U-boot docker内の u-boot 出来た。ブート時のLCD表示もOK http://zero.lichee.pro/系统开发/uboot_build.html おそらく [git clone https://github.com/Lichee-Pi/u-boot.git -b v3s-current]
Linuxカーネル docker内の linux 出来た。 eth0の有効化もOK http://zero.lichee.pro/驱动/Ethernet.html
ルートシステム docker内の emdebian emdebianの開発終了のため試していない https://en.wikipedia.org/wiki/Emdebian_Grip
ルートシステム docker内の buildroot ルートシステムを作るのみ?
統合 buildroot 最新のやつはlicheepi対応しているみたいだが、LCDの確認はまだ
統合 OpenWrt 不明 https://qinfengling.pro/build_openwrt_image_for_licheepi_nano.html

docker内にいろいろサンプルがあるのがありがたい。

buildrootのあれこれ

buildrootって敷居が高かったのだけど、調べてみたらちょっとやってみたくなってきた。
docker内のやつは、ルートシステムを作るのみのように見えた。
u-Boot、カーネルこみこみでやる方法もあるらしいので、次は、それを試してみる。

https://qiita.com/aselectroworks/items/550370b4129c0afdda68
https://github.com/unframework/licheepi-nano-buildroot
https://github.com/Squonk42/buildroot-licheepi-zero
https://hackaday.io/project/134065-funkey-zero/log/144796-linux-distribution

2020年4月17日金曜日

3Dプリンタでマスク作ってみる

作りたいな、作ってみたいなと思って、かなり時間が経ってしまった。


ネットで公開されているありがたいデータ

国内は以下のような感じ? 海外のは、フェイスガードが多いのかな。
名称 リンク 備考
イグアス http://www.iguazu-3d.jp/case_study/laboratory/3d_mask/ 男性/女性/子供向けがある♥
PITATT 3D print mask https://www.rootech360.com/ REGULAR/SMALLがある
NANOHACK 2.0 https://copper3d.com/hackthepandemic/ 本格的
イヤーガードとフェイスシールド https://flashforge.co.jp/stl-earguard-faceshield/
データ集 https://cults3d.com/en/collections/useful-3d-printed-coronavirus-covid19-tool 一覧になっていて見やすい

PITATT 3D print maskのシミュレーション

PITATT 3D print maskを出力した場合のシミュレーション
REGULARで、3時間45分くらいかかる見込み。


イグアス マスクのシミュレーション

イグアス マスクを出力した場合のシミュレーション
男性向けで、6時間45分くらいかかる見込み。


でも、サポート部分の印刷が支配的なので、PITATT 3D print maskのように配置を変えれば印刷時間変わるかもしれない。

X方向を60°にしたら、いい感じになった。 約3時間


PITATT 3D print maskを印刷してみた



フィラメントが劣化してしまったのか、ガタガタになってしまったOrz
乾燥させないとなー。めんどー。
微速度撮影にチャレンジしてみたよ。



動画の編集には「OpenShot」を使ってみた。
だけど、日本語入力が出来ないOrz
それと、ハードウェアエンコードが出来ない・・・。
課題はたくさんある。

2020年4月15日水曜日

YouPHPTube(avideo)を試してみる

動画管理・・・気になってやってみたかった。
https://www.moongift.jp/2017/06/youphptube-php製のyoutubeクローン/
試すだけ、、、なのできっとDockerがいいんじゃないかなと思った。


↑はフリー素材の犬 かわいい
https://pixabay.com/ja/videos/犬-飲酒-ペット-食品-5631/

Dockerでやってみる

久しぶりです。
Docker自体のインストールもやらないとね

Docker自体のインストール

・docker-ce
https://docs.docker.com/engine/install/ubuntu/
LinuxMintの場合は、Ubuntuじゃないので、注意。
「$(lsb_release -cs)」の部分を「bionic」書き換える。
https://continue-to-challenge.blogspot.com/2019/07/redmine.html
・docker-composer
https://docs.docker.com/compose/install/

ubuntuイメージの取得

$ sudo docker pull ubuntu:18.04
18.04: Pulling from library/ubuntu
5bed26d33875: Pull complete
f11b29a9c730: Pull complete
930bda195c84: Pull complete
78bf9a5ad49e: Pull complete
Digest: sha256:bec5a2727be7fff3d308193cfde3491f8fba1a2ba392b7546b43a051853a341d
Status: Downloaded newer image for ubuntu:18.04
docker.io/library/ubuntu:18.04

$ sudo docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
ubuntu              18.04               4e5021d210f6        2 weeks ago         64.2MB
起動
$ sudo docker run -it -d --name YouPHPTube -p 127.0.0.1:10080:80 ubuntu:18.04
1e9996bda6d080f5c7697bacdefd5f0f817dc6303b15003726c2bc2cbb10178c
$ sudo docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                     NAMES
1e9996bda6d0        ubuntu:18.04        "/bin/bash"         18 seconds ago      Up 17 seconds       127.0.0.1:10080->80/tcp   YouPHPTube

環境の準備

起動したコンテナにアタッチする
$ sudo docker attach 1e9996bda6d0
<コンテナ側>
apt upate
apt upgrade
これで準備OKのはず

apacheのインストール

作成したコンテナにapacheをインストールしてみる
<コンテナ側>
apt install -y apache2 apache2-utils
service apache2 start
母艦側のでlocalhost:10080にアクセスしてみる


まずはOK

MariaDBのインストール

本当は、1コンテナ(イメージ)に複数のサービスを入れるのは推奨されないみたいだけど、今回はお試しということで、詰め込んじゃう。
公式の手順では、MySQLになっているけど、なんとなくMariaDBにしてみた。
apt install mariadb-server mariadb-client
service mysql start
mysql_secure_installation
アクセスできるかな?
mysql -u root
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 51
Server version: 10.1.44-MariaDB-0ubuntu0.18.04.1 Ubuntu 18.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)
OKそう

AVideo用のユーザー・データベース作成

データベース:AVideo
ユーザー:AVideo
mysql -u root
create database AVideo;
create user AVideo@localhost identified by '**********';
grant all privileges on AVideo.* to AVideo@localhost;
もうひとつEncoder用
データベース:AVideoEncoder
mysql -u root
create database AVideoEncoder;
grant all privileges on AVideoEncoder.* to AVideo@localhost;

その他必要なもの

apt install php libapache2-mod-php php-mysql php-curl php-gd php-intl ffmpeg git libimage-exiftool-perl php-mbstring php-gettext python curl
これで、下準備完了

YouPHPTube(AVideo)のインストール

手順書どおりにやってみる
cd /var/www/html
git clone https://github.com/WWBN/AVideo.git
git clone https://github.com/WWBN/AVideo-Encoder.git
curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
chmod a+rx /usr/local/bin/youtube-dl
a2enmod rewrite
phpenmod mbstring
service apache2 restart

apacheの設定

/etc/apache2/apache2.confで AllowOverride All に変更する
<Directory /var/www/>
          Options Indexes FollowSymLinks
          AllowOverride All
          Require all granted
</Directory>
そのあと更新
a2enmod rewrite
service apache2 restart

アクセスしてみよう

母艦から
http://localhost:10080/AVideo
にアクセスしてみる


ほう。
指示に従って解決していこう

Your videos directory must be writable

「>Details」を開くとやり方が出てきた
mkdir /var/www/html/AVideo/videos
chown www-data:www-data /var/www/html/AVideo/videos && chmod 755 /var/www/html/AVideo/videos

Your post_max_size is 8M, it must be at least 100M

POSTのサイズ
nano /etc/php/7.2/apache2/php.ini
; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
; http://php.net/post-max-size
post_max_size = 8M
とりあえず2Gにしてみた。

Your upload_max_filesize is 2M, it must be at least 100M

アップロードサイズ的なやつか
nano /etc/php/7.2/apache2/php.ini
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 2M
こちらも2Gにしてみた
変更後は、apacheの再起動を行う

セットアップを続けてみよう

あれー


もう一度やろうとすると、、起動しちゃったYO


こっちはこれでいいのかな

YouPHPTube(AVideo)-Encoder にアクセスしてみよう

セットアップウィザード

母艦から
http://localhost:10080/AVideo-Encoder
にアクセスしてみる


ほう。
指示に従って解決していこう
  • Your videos directory must be writable
  • Your max_execution_time is 30, it must be at least 7200
     とりあえず、7200にしてみた
  • Your memory_limit is 128M, it must be at least 512M
    とりあえず2Gにしてみた
これでよし


ここでのSteramerURLはDockerの中なので、**localhost:80/AVideo/**になるので注意

各種設定

基本設定

管理者でログインして
[設定]-[サイトの構成]から各種設定を行っていく

サインイン/アップ

[設定]-[一般的な設定]から
名称 説明 設定値
userMustBeLoggedIn Hide the website to non logged users 有効
doNotIndentifyByEmail Do not show user’s email on the site 有効
doNotIndentifyByUserName Do not show user’s username on the site 有効

プラグイン

[設定]-[その他]-[プラグイン]
名前 要約
Hotkeys Enable hotkeys for videos, like F for fullscreen, space for play/pause, etc…
SeekButton Add seek buttons to the control bar
VideoTags User interface for managing tags
これでしばらく使ってみようかね

コンテナの開始と終了など

忘れてたけど、まだアタッチで起動していただけだった。
アタッチで起動したものはコマンドプロンプトからCtrl+P → Ctrl+Qで抜ける
sudo docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                     NAMES
1e9996bda6d0        ubuntu:18.04        "/bin/bash"         3 days ago          Up 3 days           127.0.0.1:10080->80/tcp   YouPHPTube

#終了
sudo docker stop 1e9996bda6d0

#開始
sudo docker start 1e9996bda6d0

#各種サービス起動
sudo docker exec -it 1e9996bda6d0 service apache2 start
sudo docker exec -it 1e9996bda6d0 service mysql start

#アタッチ
sudo docker attach 1e9996bda6d0

参考

https://github.com/WWBN/AVideo/wiki/How-to-install-LAMP,-FFMPEG-and-Git-on-a-fresh-Ubuntu-18.x-for-AVideo-Platform-version-4.x-or-newer
https://qiita.com/tsumtsumyuma/items/de7678d7f118793ea3e0
http://enakai00.hatenablog.com/entry/20140628/1403933390