-
Posts
56 -
Joined
-
Last visited
Content Type
Forums
Store
Crowdfunding
Applications
Events
Raffles
Community Map
Posts posted by hatahata
-
-
Hi all.
i say goodby rental server , hello orange pi .
by the way i run nginx as basic authentification .
/etc/nginx/nginx.conf is
-------------------------------
events {
worker_connections 800;
}
http {
include mime.types;
default_type application/octet-stream;
index index.html index.htm;
keepalive_timeout 65;
server_tokens off;
server {
listen 80;
server_name localhost; #<-for test
root /var/www/d1;
}
server {
listen 80;
server_name n------------a.dip.jp;
root /var/www/d0;
}
server {
listen 80;
server_name s-------------y.mydns.jp;
root /var/www/d1;
auth_basic "closed site";
auth_basic_user_file /var/www/1/.htpasswd;
}
}
n------------a.dip.jp is freely accessed.s-------------y.mydns.jp is protected by id and password .
and
whe we use nand ,
http://forum.armbian.com/index.php/topic/977-usrlibnand-sata-installnand-sata-installsh/?hl=nand
we get big root (in may case 250GB USB HDD) , so we do not need rental server .
df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 234171444 20189084 202087056 10% /
devtmpfs 381396 0 381396 0% /dev
tmpfs 512624 0 512624 0% /dev/shm
tmpfs 512624 7192 505432 2% /run
tmpfs 5120 4 5116 1% /run/lock
tmpfs 512624 0 512624 0% /sys/fs/cgroup
/dev/mmcblk0p1 2275348 79604 2080172 4% /boot
tmpfs 262144 8 262136 1% /tmp
tmpfs 102528 0 102528 0% /run/user/1000orange pi PC consumes 5W or so , i stop rental server and use orange pi PC as internet server ( www , sshd etc) .
perhaps money saving comes (my rental server was 1GB memory 100GB harddisk).
and cloneing USB-HDD to USB-HDD is (this is important for server's backup )
after mount /dev/sdb1 /mb1
clone-rsync-HDD2HDD.bat
-------------------------------
df
fdisk -l /dev/sda
fdisk -l /dev/sdbecho ' push a key '
read X
echo $x
cd /mb1
mkdir -p bin etc home lib opt root sbin srv usr var selinux boot
for x in /bin /etc /home /lib /opt /root /sbin /srv /usr /var /selinux /boot
do
rsync -avHx --delete $x/ /mb1$x/
done
cd /mb1
mkdir -p dev proc sys media mnt run tmp
---------
regards
-
hi all .
it is easy wired-wired bridge .
for example , next script
x=` ifconfig | grep 192.168 | cut -d ':' -f 2 | cut -d " " -f 1`
brctl addbr br0
brctl addif br0 eth0
brctl addif br0 eth1
ifconfig br0 $x netmask 255.255.255.0 broadcast 192.168.100.255 up
ifconfig eth0 0.0.0.0 up
ifconfig eth1 0.0.0.0 up
route add default gw 192.168.100.254 br0the information of wireless bridge itself is at https://wiki.debian.org/BridgeNetworkConnections#Bridging_with_a_wireless_NIC .
but this is difficult for me .
i want to make following bridge .
wifi router 192,168,100.254 .....wireless.....wlan0:[orange pi]:eth0---cross cable---TV
so TV looks at internet .
------
regards
-
thanks . i see script.bin.bak .
mkdir /OrangePi-boot-HDD
cp -aR /boot/* /OrangePi-boot-HDD
(i like backup for safe . the reason of the name of OrangePi-boot-HDD is that my environment is nand , namely root is in usb hard disk )
-
i manage to understand the commad of h3disp .
i think from experiment that origenal resolution is higher than 'h3disp -m 1080p60' .
how to restore origenal resolution by h3disp ?
in my case i backup /boot . so i can manage to restore origenal resolution .
ls -l /OrangePi-boot-HDD/
total 6928
-rw-r--r-- 1 root root 2107649 3月 9 04:03 System.map-3.4.110-sun8i
drwxr-xr-x 2 root root 4096 3月 15 13:20 bin
-rw-r--r-- 1 root root 6944 3月 9 04:23 boot.bmp
-rw-r--r-- 1 root root 2019 4月 9 23:35 boot.cmd
-rw-r--r-- 1 root root 2091 4月 9 23:35 boot.scr
-rw-r--r-- 1 root root 93944 3月 9 04:03 config-3.4.110-sun8i
lrwxrwxrwx 1 root root 24 3月 15 13:20 script.bin -> /boot/bin/orangepipc.bin
-rwxr-xr-x 1 root root 4866320 3月 9 04:03 vmlinuz-3.4.110-sun8i
lrwxrwxrwx 1 root root 21 3月 9 04:23 zImage -> vmlinuz-3.4.110-sun8i -
i managed to understand what rodolfo said at Posted 31 March 2016 - 10:10 PM .
two more steps is needed .
1) at terminal , wpa_passphrase MyPlace 7082446
this gives next info .
wpa_passphrase MyPlace 7082446
network={
ssid="MyPlace"
#psk="7082446"
psk=06d6f60771f44b0369f226c0ed4757cdc8939a2f3db
}
2)by using this info , rewrite /etc/network/interfaces
auto wlan0
iface wlan0 inet dhcp
wpa-ssid MyPlace
wpa-psk 06d6f60771f44b0369fb1ed4757cdc8939a2f3db
auto lo
iface lo inet loopback
then
ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 00:22:cf:ec:c8:05
inet addr:192.168.10.220 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::222:cfff:feec:c805/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:340 errors:0 dropped:0 overruns:0 frame:0
TX packets:281 errors:0 dropped:1 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:42290 (41.2 KiB) TX bytes:45931 (44.8 KiB)
splendid! orange pi PC can fly in the sky .
i heartly thanks for rodolfo .
-
i have the big space to save files ( about 217GB ).
so my OPIpc will become media server by minidlna
becasue i watch the movies in OPIpc by TV's function of link ( TV itself utilize media server automatically when LAN is attached ).
4GB sd card only spark armbian .
root is in 250GB usb hard disk .
without armbian i throw OPIpc into dustbox .
armbian is great .
df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 234171444 4433532 217842608 2% / <-----217G available
devtmpfs 381396 0 381396 0% /dev
tmpfs 512624 0 512624 0% /dev/shm
tmpfs 512624 58508 454116 12% /run
tmpfs 5120 4 5116 1% /run/lock
tmpfs 512624 0 512624 0% /sys/fs/cgroup
tmpfs 262144 8 262136 1% /tmp
/dev/mmcblk0p1 2275348 92352 2067424 5% /mp1<---2G available ( 92M used)
tmpfs 102528 0 102528 0% /run/user/1000/etc/fstab is
tmpfs /tmp tmpfs nodev,nosuid,size=256M 0 0
/dev/sda1 / ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 0
/dev/sda2 none swap sw 0 0
/dev/mmcblk0p1 /media/mmc ext4 defaults 0 0
/media/mmc/boot /boot none bind 0 0so i use big swap file (6GB)
free
total    used   free   shared buffers cached
Mem: 1025248   534864 490384 59412 41728 381028
-/+ buffers/cache:  112108   913140
Swap: 6291452 0     6291452 -
hi all .
the illustlation is
sd card's role is booting only .
detail is http://forum.armbian.com/index.php/topic/977-usrlibnand-sata-installnand-sata-installsh/
-
i have done home work .
the present state is that /boot is in 32GB sd .
i intend to change 32GB sd for 4GB sd .
with kali linux , i insert 4GB sd to kali linux PC .
dd if=/Armbian_5.05_Orangepih3_Debian_jessie_3.4.110_desktop.raw of=/dev/sdb bs=16M
and over internet , by sftp i get /boot of 32GB sd ,
and cp -pR {/boot/* of 32GB sd } /mb1
and
cd /mb1
rm -rf usr var .....and so on
so
the content of 4GB sd card is
ls -l /boot/
total 6964
-rw-r--r-- 1 root root 2107649 3月 9 04:03 System.map-3.4.110-sun8i
drwxr-xr-x 2 root root 4096 3月 15 13:20 bin
-rw-r--r-- 1 root root 6944 3月 9 04:23 boot.bmp
-rw-r--r-- 1 root root 2019 4月 9 23:35 boot.cmd
-rw-r--r-- 1 root root 2091 4月 9 23:35 boot.scr
-rw-r--r-- 1 root root 93944 3月 9 04:03 config-3.4.110-sun8i
lrwxrwxrwx 1 root root 24 3月 15 13:20 script.bin -> /boot/bin/orangepipc.bin
-rw-r--r-- 1 root root 35916 4月 20 18:19 script.bin.bak
-rwxr-xr-x 1 root root 4866320 3月 9 04:03 vmlinuz-3.4.110-sun8i
lrwxrwxrwx 1 root root 21 3月 9 04:23 zImage -> vmlinuz-3.4.110-sun8i
and i can boot armbian
now
250GB USB hard disk(this is /)-------[orange pi PC]---micro sd 4GB(this is /boot)
i spare 32 GB sd card and as / hard disk is more tough than sd card , so i think .
df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 234171444 4376704 217899436 2% /
devtmpfs 381396 0 381396 0% /dev
tmpfs 512624 0 512624 0% /dev/shm
tmpfs 512624 6976 505648 2% /run
tmpfs 5120 4 5116 1% /run/lock
tmpfs 512624 0 512624 0% /sys/fs/cgroup
/dev/mmcblk0p1 2275348 92352 2067424 5% /boot
tmpfs 262144 8 262136 1% /tmp
tmpfs 102528 0 102528 0% /run/user/1000
fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 3.7 GiB, 3951034368 bytes, 7716864 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: 0x000276fe
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 2048 4625127 4623080 2.2G 83 Linuxand 250GB hard disk cloning is easy .
250GB usb hdd-------
orange pi PC-----4GB micro sd card
250GB usb hdd-------
clone-rsync-HDD2HDD.bat
df
fdisk -l /dev/sda
fdisk -l /dev/sdb
read X
echo $x
cd /mb1
mkdir -p bin etc home lib opt root sbin srv usr var selinux boot
for x in /bin /etc /home /lib /opt /root /sbin /srv /usr /var /selinux /boot
do
rsync -avHx --delete $x/ /mb1$x/
done
cd /mb1
mkdir -p dev proc sys media mnt run tmp
-
i try nand-sata-install.sh .
namely
before nand-sata-install.sh
usb hard disk ----orange pi PI -----micro sd
(sda)
fdisk -l /dev/sda
Device Boot Start End Sectors Size Id Type
/dev/sda1 12584960 488397163 475812204 226.9G 83 Linux
/dev/sda2 2048 12584959 12582912 6G 82 Linux swap / Solaris---------------------------------------------------------------
after nand-sata-install.sh plus rewriting swap line of /etc/fstab
/etc/fstab
tmpfs /tmp tmpfs nodev,nosuid,size=256M 0 0
/dev/sda1 / ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 0
/dev/sda2 none swap sw 0 0
/dev/mmcblk0p1 /media/mmc ext4 defaults 0 0
/media/mmc/boot /boot none bind 0 0df is
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 234171444 4225628 218050512 2% /
devtmpfs 381396 0 381396 0% /dev
tmpfs 512624 0 512624 0% /dev/shm
tmpfs 512624 6980 505644 2% /run
tmpfs 5120 4 5116 1% /run/lock
tmpfs 512624 0 512624 0% /sys/fs/cgroup
tmpfs 262144 8 262136 1% /tmp
/dev/mmcblk0p1 14281204 4199032 9356720 31% /boot
tmpfs 102528 0 102528 0% /run/user/1000namely root is over 200GB ( in HDD)
i think hard disk is more sutable for hevy duty so nand-sata-install.sh is good tool for us .
{ ls /boot/ } is
System.map-3.4.110-sun8i bin boot.bmp boot.cmd boot.scr config-3.4.110-sun8i script.bin vmlinuz-3.4.110-sun8i zImageand
when gparted , /media/mmc apear .
and {ls /media/mmc} is
bin dev home lost+found media opt root sbin srv tmp var
boot etc lib ma1 mnt proc run selinux sys usrcan i erase /media/mmc folda except boot ?
( rm -rf /media/mmc/bin and so on)
if i get redundant sd card , i try experiment .
-------------
regards
-
i try but fail.soin order to connect wifi router on air , i used repeater , this was simple and saved usb port .so ifconfig -> eth0 only , namely no wlan . -
i have not do anyting special on orange pi PC .
uname -ar
Linux orangepipc 3.4.110-sun8i #18 SMP PREEMPT Tue Mar 8 20:03:32 CET 2016 armv7l GNU/Linuxcat .asoundrc
cat: .asoundrc: No such file or directoryaplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: audiocodec [audiocodec], device 0: SUNXI-CODEC sndcodec-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: sndhdmi [sndhdmi], device 0: SUNXI-HDMIAUDIO sndhdmi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
$ dpkg -l | grep alsa
ii alsa-utils 1.0.28-1 armhf Utilities for configuring and using ALSA
ii gstreamer0.10-alsa:armhf 0.10.36-2 armhf GStreamer plugin for ALSAaptitude search kodi ---> no response
so i did not install kodi .
-----
regards
-
 thanks for good information .
-------------------------------------
partclone also use rsync but i have not tried it yet in order to clone sd card's partition .
anyway it is easy to clone sd card , so we can take the risk of not booting armbian forever to improve armbian .
nothing ventured, nothing gained
---------------
my japanese home page is http://orange-pi-2.blogspot.jp/2016/01/orange-pi-2g.html
-
i also try the following .
then
orange pi PC also boot armbian .
clone-rsync.bat
umount /ma1
df
fdisk -l /dev/sda
read X
echo $xmkfs.ext4 /dev/sda1
mount /dev/sda1 /ma1
cd /ma1
mkdir -p bin etc home lib opt root sbin srv usr var selinux boot
for x in /bin /etc /home /lib /opt /root /sbin /srv /usr /var /selinux /boot
do
rsync -avHx --delete $x/ /ma1/$x/
done
cd /ma1
mkdir -p dev proc sys media mnt run tmp
touch /ma1/SWAP
dd if=/dev/zero of=/ma1/SWAP bs=1M count=1024
mkswap /ma1/SWAP-------------------------------
the next ,
umount /ma1
df
fdisk -l /dev/sda
read X
echo $xmount /dev/sda1 /ma1
cd /ma1
mkdir -p bin etc home lib opt root sbin srv usr var selinux boot
for x in /bin /etc /home /lib /opt /root /sbin /srv /usr /var /selinux /boot
do
rsync -avHx --delete $x/ /ma1/$x/
doneif this is right , fast cloning is done .
-------
regards
-
thanks for great advice .
i try another orange pi PC running armbian , this is ordinaly armbian which has 32GB micro sd card only .
( i do not stop armbian , make clone sd card on runnning machine )
i insert USB card reader which has 16GB micro sd card .
the chart is
after
mkfs.ext4 /dev/sda1
mount /dev/sda1 /ma1
run the next shell script
shell sctipt is
----------------
df
read X
echo $X
cd /ma1
cp --archive /bin /etc /home /lib /opt /root /sbin /srv /usr /var /selinux /boot /SWAP ./
cd /ma1
mkdir -p dev proc sys media mnt run tmp
i have made swap file as /SWAP 1 month ago on 32GB sd
after halt -p
i change 32GB for 16GB , armbian boots .
how to install boot loader into 16GB micro sd card is http://forum.armbian...backup-restore/ .
--------------------
tuyosi
-
hi all .
i try clone sd card on running orange pi (cone 32GB to 16GB).
original sd is 32GB , clone sd is 16GB .
1) insert USB sd converter ( 16GB sd is in ).
this is recognized as sdb because i alredy attach USB HDD.
2) i alredy install boot loader into sdb (16GB). see -> http://forum.armbian.com/index.php/topic/897-backup-restore/
so
mkfs.ext4 /dev/sdb1
3)mount /dev/sdb1 /mb1
and run the next shell script
----------------------------------------
cd /mb1
df
pwd
cp --archive /bin /etc /home /lib /opt /root /run /sbin /srv /tmp /usr /var /selinux /boot /media ./
mkdir -p boot dev sys mnt proc4) then halt , and replace sd card .
orange pi boot with new 16GB sd card .
if this is right , backup is easy and time sparing because this is done on running machine .
--------------------------------------------
tuyosi
-
icecast is also difficult for me .
i adopt nfs .
the chart is
orange pi(record sounds ) ---> debiandog(nfs server,192.168.100.105)
at debiandog
/etc/exports
---------------
/srv/homes 192.168.100.*(rw,sync,fsid=0,crossmnt,no_subtree_check)at orange pi
shell script as root
-------------------
mount.nfs 192.168.100.105:/srv/homes /mnt
rm /mnt/1.mp3
pkill -9 arecordarecord --device hw:0 -f S16_LE /mnt/1.mp3 &
then
at debiandog
mplayer /srv/homes/1.mp3
it is strange that /srv/homes/1.mp3 apears after 30 sec or so after recording .
name ly there is time lag .
in mplayer push right allow then sound is near to now .
but
Recording WAVE '/mnt/1.mp3' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
overrun!!! (at least 228.306 ms long)
overrun!!! (at least 37.292 ms long)
overrun!!! (at least 67.655 ms long)
overrun!!! (at least 115.382 ms long)
appear after sometime.something is wrong .
but reverse direction
orange pi(record sounds in pi's disk & nfs server ) <--- debiandog(nfs client , play pi's mp3 file )
is stable .
if you combinate with cheese over vnc , you can make video monitoring in another PC nevertheless sound is several seconds late .
---
regards
-
it is heard to consist of remote speaker with paprefs and pavucontrol for me and controll is difficult so orange pi sometomes lose sound .
so i give up .
i seek for more easy way .
my situation is
orange pi---------------------------------------> DELL PC
(record sound ) (hear sound )
1) at orange pi
shell script
-----------------
arecord --device hw:0 -r 44100 -f S16_LE /home/orange/1.mp3 &
while true
do
scp /home/orange/1.mp3 yuma@192.168.10.230:/home/yuma
sleep 180
done
and
2) at DELL PC
mplayer /home/yuma/1.mp3
surely i can hear sound at DELL PC .
but synclonization is poor .
i want to hear almost now sound ( 30 sec late or so is OK) .<- baby sitting
1.mp3 becames bigger and bigger , so scp take more times .
more better script can be .
are there any ideas ?
i do 'arecord' twice , then 'arecord: main:722: audio open error: Device or resource busy' appear .
sound is more difficult than image , so i think .
--------
regards
-
orange pi PC has only three USB ports .
so i look for ways to save USB ports .
one way is to use wireless keyboard & mouse , but this also occupy one USB port .
so i use vnc .
at orange pi
aptitude install x11vnc
and
/etc/rc.local
--------------------------
x11vnc &
exit 0
then
at debiandog linux 
xtightvncviewer 192.168.100.xxx (orange pi's address)
then
apear .
and more
i attach usb camera , and click cheese , the next scren appears.(camera aims at TV).
this is a monitoring camera .
i thik the conbination of drone and orange pi PC has big ability .
but debian dog has no sound .
how to get now sounds at debiandog linux ?
recorrding souds itself is posible by arecord --device hw:0 -r 44100 -f S16_LE /home/foge/1.wav
but this is the past sounds .
if both image and sound , baby monitoring is good .
one way is to use skype , but this may be heavy .
http://gihyo.jp/admin/serial/01/ubuntu-recipe/0106write about remote speaker , but i cannot find next figure .
remote speaker is hard tu use .
instead
at orange pi
1) arecord --device hw:0 -r 44100 -f S16_LE /home/orange/1.mp3
and2)
# 10 kb/sxy
scp -l 80 /home/orange/1.mp3 yuma@192.168.10.230:/home/yuthen
at 192.168.10.230 (kali linux)
mplayer /home/yu/1.mp3
but the number of speed is difficult to decide .
-
i read the post repetedly .
10 days ago , i tried with armbian of orange pi PC
dd if=/dev/mmcblk0 of=/ma1/mbr.img bs=512 count=1
dd if=/mnt/mbr.img of=/dev/mmcblk0 bs=446 count=1
but boot loader is not copied to 16G smaller sd card and i cannot boot orange pi with sd card .
so i did
---------
B)dd if=/Armbian_5.05_Orangepih3_Debian_jessie_3.4.110_desktop.raw of=/dev/sdb bs=16M
but when time laspe 15 second or so , i pus ' ctrl + z ' several times .-----------this can copy boot loader and only structure (sd card is composed with one ext4 partition ) .i understand
dd if=/dev/$card of=u-boot_spl_partition-table.img bs=1M count=1
by the way
does { dd if=u-boot_spl_partition-table.img o f=/dev/$card bs=1M count=1 } copy bootloader ?
and
is 1M ok or not ?
i heatfuly thanks for vast knowledge and talent .
-----
regards
-
i only do cloning of { 32GB micro sd card ) to { 16GB micro sd card } .
and { 16GB micro sd card } works on orange pi PC .
but this method is bad for raspberry pi 2 by unknown reasen (good for ordinal Linux & OpenBSD).
at raspberry pi 2 ,
killall gvfsd-fusecd {hard disk mount point }cp --archive /bin /etc /home /lib /opt /root /run /sbin /srv /tmp /usr /var ./mkdir -p boot dev sys mnt proc
but this forum is not for raspberry pi .
there must be more effective backup methods (backup to hard disk drive) using rsync ?
becasu sd card will be distroyed some day (sd card has shorter life time than harddisk , i think . ) .
for example
rsync -avHx --delete {sd card mount point}/ { hard disk folder }/
is this OK or not for link especially hard link ?
-----
my page is http://orange-pi-2.blogspot.jp/2016/01/orange-pi-2g.htmlbut written in Japanese .
if tool is permitted , see
http://forum.armbian.com/index.php/topic/897-backup-restore/?hl=backup .
i use ' partclone.ext4 -c -s /dev/sdc1 -o /mb1/OrangepiPC-armbian.pcl , then iget { 5822461748 3月 27 12:30 OrangepiPC-armbian.pcl } from 16GB micro sd ard .
-
for yonger newbees , i may contribute for ther progress .
i backup from 32G sd card , and restore it to 16G sd card .
-----------------------------------------------------------------------
i usually use debiandog linux (a kind of debian ) as backup and restore tool .
1) insert 32G sd card to sd card reader .
2)insert the sd card reader into usb interface of debiandog .
3) mount /dev/sdb1 /mb1
4) mkdir /ArmBack
5) ( cd /mb1 ; tar cvpf - .)|(cd /ArmBack ; tar xpf -)
6) umoun /mb1
7) remove sd card reader and then 32G sd card .
then i prepare 16G sd card .
A) insert 16G sd card to sd card reader and insert the sd card reader into the usb interface of debiandog
B)dd if=/Armbian_5.05_Orangepih3_Debian_jessie_3.4.110_desktop.raw of=/dev/sdb bs=16M
but when time laspe 15 second or so , i pus ' ctrl + z ' several times .
C)fdisk -l /dev/sdb ( only for certainnty)
D)mkfs.ext4 /dev/sdb1
E)mount /dev/sdb1 /mb1
F) ( cd /ArmBack ; tar cvpf - .)|(cd /mb1 ; tar xpf -)
G) umount /mb1
H) insert 16 G sd card into orange pi PC , then orange pi PC boots armbian .
this is very simple and stable method , i think .
but there are better methods .
please show them .
dd is bulky ,so i do not like dd and cannot do downsizing .
upsizing is easy only to use gparted on debiandog .
---------------
regards . by tuyosi
-
at last i found vlc is easy to record both video and movie .
start vlc
and
ctrl + R
cheese has no sound . , video only .
guvcview has no video , sound only .
vlc is great but is not commnd line .
-
i use oprange pi PC .
i do
ffmpeg -s 320x240 -f video4linux2 -i /dev/video0 /home/orange/out.mpg
then i get video .i doarecord --device hw:0 -r 44100 -f S16_LE /home/orange/1.wavthen i get sound .but i cannot get both at once .by using cheese , i have no sound .i guess alsamixer and i must do something , but i donot know the followings .aplay -L isnullDiscard all samples (playback) or generate zero samples (capture)sysdefault:CARD=audiocodecaudiocodec,Default Audio Devicedmix:CARD=audiocodec,DEV=0audiocodec,Direct sample mixing devicedsnoop:CARD=audiocodec,DEV=0audiocodec,Direct sample snooping devicehw:CARD=audiocodec,DEV=0audiocodec,Direct hardware device without any conversionsplughw:CARD=audiocodec,DEV=0audiocodec,Hardware device with all software conversionssysdefault:CARD=sndhdmisndhdmi,Default Audio Devicedmix:CARD=sndhdmi,DEV=0sndhdmi,Direct sample mixing devicedsnoop:CARD=sndhdmi,DEV=0sndhdmi,Direct sample snooping devicehw:CARD=sndhdmi,DEV=0sndhdmi,Direct hardware device without any conversionsplughw:CARD=sndhdmi,DEV=0sndhdmi,Hardware device with all software conversions-----regards -
RagnerBG's procedure is beyond amature.
i only do the followings on armbian of orange pi PC .
it takes long time (over 60 minites )
--------------------
aptitude install git yasm pkg-config
cd Downloads
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
./configure
make
sudo make install
------------------------
this procedure may lack something compared with RagnerBG's because of too simplicity .
ffmpeg -formats saysffmpeg version N-79121-gfe3de6b Copyright © 2000-2016 the FFmpeg developersbuilt with gcc 4.9.2 (Debian 4.9.2-10)configuration:libavutil 55. 19.100 / 55. 19.100libavcodec 57. 30.100 / 57. 30.100libavformat 57. 29.100 / 57. 29.100libavdevice 57. 0.101 / 57. 0.101libavfilter 6. 39.102 / 6. 39.102libswscale 4. 0.100 / 4. 0.100libswresample 2. 0.101 / 2. 0.101File formats:D. = Demuxing supported.E = Muxing supported--D 3dostr 3DO STRE 3g2 3GP2 (3GPP2 file format)E 3gp 3GP (3GPP file format)D 4xm 4X TechnologiesE a64 a64 - video for Commodore 64D aa Audible AA format filesD aac raw ADTS AAC (Advanced Audio Coding)DE ac3 raw AC-3D acm Interplay ACMD act ACT Voice file formatD adf Artworx Data FormatD adp ADPD ads Sony PS2 ADSE adts ADTS AAC (Advanced Audio Coding)DE adx CRI ADXD aea MD STUDIO audioD afc AFCDE aiff Audio IFFDE alaw PCM A-lawD alias_pix Alias/Wavefront PIX imageDE amr 3GPP AMRD anm Deluxe Paint AnimationD apc CRYO APCD ape Monkey's AudioDE apng Animated Portable Network GraphicsD aqtitle AQTitle subtitlesDE asf ASF (Advanced / Active Streaming Format)D asf_o ASF (Advanced / Active Streaming Format)E asf_stream ASF (Advanced / Active Streaming Format)DE ass SSA (SubStation Alpha) subtitleDE ast AST (Audio Stream)DE au Sun AUDE avi AVI (Audio Video Interleaved)E avm2 SWF (ShockWave Flash) (AVM2)D avr AVR (Audio Visual Research)D avs AVSD bethsoftvid Bethesda Softworks VIDD bfi Brute Force & IgnoranceD bfstm BFSTM (Binary Cafe Stream)D bin Binary textD bink BinkDE bit G.729 BIT file formatD bmp_pipe piped bmp sequenceD bmv Discworld II BMVD boa Black Ops AudioD brender_pix BRender PIX imageD brstm BRSTM (Binary Revolution Stream)D c93 Interplay C93DE caf Apple CAF (Core Audio Format)DE cavsvideo raw Chinese AVS (Audio Video Standard) videoD cdg CD GraphicsD cdxl Commodore CDXL videoD cine Phantom CineD concat Virtual concatenation scriptE crc CRC testingE dash DASH MuxerDE data raw dataDE daud D-Cinema audioD dcstr Sega DC STRD dds_pipe piped dds sequenceD dfa Chronomaster DFADE dirac raw DiracDE dnxhd raw DNxHD (SMPTE VC-3)D dpx_pipe piped dpx sequenceD dsf DSD Stream File (DSF)D dsicin Delphine Software International CIND dss Digital Speech Standard (DSS)DE dts raw DTSD dtshd raw DTS-HDDE dv DV (Digital Video)D dv1394 DV1394 A/V grabD dvbsub raw dvbsubD dvbtxt dvbtxtE dvd MPEG-2 PS (DVD VOB)D dxa DXAD ea Electronic Arts MultimediaD ea_cdata Electronic Arts cdataDE eac3 raw E-AC-3D epaf Ensoniq Paris Audio FileD exr_pipe piped exr sequenceDE f32be PCM 32-bit floating-point big-endianDE f32le PCM 32-bit floating-point little-endianE f4v F4V Adobe Flash VideoDE f64be PCM 64-bit floating-point big-endianDE f64le PCM 64-bit floating-point little-endianDE fbdev Linux framebufferDE ffm FFM (FFserver live feed)DE ffmetadata FFmpeg metadata in textD film_cpk Sega FILM / CPKDE filmstrip Adobe FilmstripDE flac raw FLACD flic FLI/FLC/FLX animationDE flv FLV (Flash Video)E framecrc framecrc testingE framemd5 Per-frame MD5 testingD frm Megalux FrameD fsb FMOD Sample BankDE g722 raw G.722DE g723_1 raw G.723.1D g729 G.729 raw format demuxerD genh GENeric HeaderDE gif GIF AnimationD gsm raw GSMDE gxf GXF (General eXchange Format)DE h261 raw H.261DE h263 raw H.263DE h264 raw H.264 videoE hds HDS MuxerDE hevc raw HEVC videoE hls Apple HTTP Live StreamingD hls,applehttp Apple HTTP Live StreamingD hnm Cryo HNM v4DE ico Microsoft Windows ICOD idcin id CinematicD idf iCE Draw FileD iff IFF (Interchange File Format)DE ilbc iLBC storageDE image2 image2 sequenceDE image2pipe piped image2 sequenceD ingenient raw Ingenient MJPEGD ipmovie Interplay MVEE ipod iPod H.264 MP4 (MPEG-4 Part 14)DE ircam Berkeley/IRCAM/CARL Sound FormatE ismv ISMV/ISMA (Smooth Streaming)D iss Funcom ISSD iv8 IndigoVision 8000 videoDE ivf On2 IVFD ivr IVR (Internet Video Recording)D j2k_pipe piped j2k sequenceDE jacosub JACOsub subtitle formatD jpeg_pipe piped jpeg sequenceD jpegls_pipe piped jpegls sequenceD jv Bitmap Brothers JVE latm LOAS/LATMD lavfi Libavfilter virtual input deviceD live_flv live RTMP FLV (Flash Video)D lmlm4 raw lmlm4D loas LOAS AudioSyncStreamDE lrc LRC lyricsD lvf LVFD lxf VR native stream (LXF)DE m4v raw MPEG-4 videoE matroska MatroskaD matroska,webm Matroska / WebME md5 MD5 testingD mgsts Metal Gear Solid: The Twin SnakesDE microdvd MicroDVD subtitle formatDE mjpeg raw MJPEG videoE mkvtimestamp_v2 extract pts as timecode v2 format, as defined by mkvtoolnixDE mlp raw MLPD mlv Magic Lantern Video (MLV)D mm American Laser Games MMDE mmf Yamaha SMAFE mov QuickTime / MOVD mov,mp4,m4a,3gp,3g2,mj2 QuickTime / MOVE mp2 MP2 (MPEG audio layer 2)DE mp3 MP3 (MPEG audio layer 3)E mp4 MP4 (MPEG-4 Part 14)D mpc MusepackD mpc8 Musepack SV8DE mpeg MPEG-1 Systems / MPEG program streamE mpeg1video raw MPEG-1 videoE mpeg2video raw MPEG-2 videoDE mpegts MPEG-TS (MPEG-2 Transport Stream)D mpegtsraw raw MPEG-TS (MPEG-2 Transport Stream)D mpegvideo raw MPEG videoDE mpjpeg MIME multipart JPEGD mpl2 MPL2 subtitlesD mpsub MPlayer subtitlesD msf Sony PS3 MSFD msnwctcp MSN TCP Webcam streamD mtv MTVDE mulaw PCM mu-lawD mv Silicon Graphics MovieD mvi Motion Pixels MVIDE mxf MXF (Material eXchange Format)E mxf_d10 MXF (Material eXchange Format) D-10 MappingE mxf_opatom MXF (Material eXchange Format) Operational Pattern AtomD mxg MxPEG clipD nc NC camera feedD nistsphere NIST SPeech HEader REsourcesD nsv Nullsoft Streaming VideoE null raw null videoDE nut NUTD nuv NuppelVideoE oga Ogg AudioDE ogg OggDE oma Sony OpenMG audioE opus Ogg OpusDE oss OSS (Open Sound System) playbackD paf Amazing Studio Packed Animation FileD pcx_pipe piped pcx sequenceD pictor_pipe piped pictor sequenceD pjs PJS (Phoenix Japanimation Society) subtitlesD pmp Playstation Portable PMPD png_pipe piped png sequenceE psp PSP MP4 (MPEG-4 Part 14)D psxstr Sony Playstation STRD pva TechnoTrend PVAD pvf PVF (Portable Voice Format)D qcp QCPD qdraw_pipe piped qdraw sequenceD r3d REDCODE R3DDE rawvideo raw videoD realtext RealText subtitle formatD redspark RedSparkD rl2 RL2DE rm RealMediaDE roq raw id RoQD rpl RPL / ARMovieD rsd GameCube RSDDE rso Lego Mindstorms RSODE rtp RTP outputE rtp_mpegts RTP/mpegts output formatDE rtsp RTSP outputDE s16be PCM signed 16-bit big-endianDE s16le PCM signed 16-bit little-endianDE s24be PCM signed 24-bit big-endianDE s24le PCM signed 24-bit little-endianDE s32be PCM signed 32-bit big-endianDE s32le PCM signed 32-bit little-endianDE s8 PCM signed 8-bitD sami SAMI subtitle formatDE sap SAP outputD sbg SBaGen binaural beats scriptD sdp SDPD sdr2 SDR2E segment segmentD sgi_pipe piped sgi sequenceD shn raw ShortenD siff Beam Software SIFFE singlejpeg JPEG single imageD sln Asterisk raw pcmDE smjpeg Loki SDL MJPEGD smk SmackerE smoothstreaming Smooth Streaming MuxerD smush LucasArts SmushD sol Sierra SOLDE sox SoX nativeDE spdif IEC 61937 (used on S/PDIF - IEC958)E spx Ogg SpeexDE srt SubRip subtitleD stl Spruce subtitle formatE stream_segment,ssegment streaming segment muxerD subviewer SubViewer subtitle formatD subviewer1 SubViewer v1 subtitle formatD sunrast_pipe piped sunrast sequenceD sup raw HDMV Presentation Graphic Stream subtitlesD svag Konami PS2 SVAGE svcd MPEG-2 PS (SVCD)DE swf SWF (ShockWave Flash)D tak raw TAKD tedcaptions TED Talks captionsE tee Multiple muxer teeD thp THPD tiertexseq Tiertex Limited SEQD tiff_pipe piped tiff sequenceD tmv 8088flex TMVDE truehd raw TrueHDD tta TTA (True Audio)D tty Tele-typewriterD txd Renderware TeXture DictionaryDE u16be PCM unsigned 16-bit big-endianDE u16le PCM unsigned 16-bit little-endianDE u24be PCM unsigned 24-bit big-endianDE u24le PCM unsigned 24-bit little-endianDE u32be PCM unsigned 32-bit big-endianDE u32le PCM unsigned 32-bit little-endianDE u8 PCM unsigned 8-bitE uncodedframecrc uncoded framecrc testingD v210 Uncompressed 4:2:2 10-bitD v210x Uncompressed 4:2:2 10-bitE v4l2 Video4Linux2 output deviceD vag Sony PS2 VAGDE vc1 raw VC-1 videoDE vc1test VC-1 test bitstreamE vcd MPEG-1 Systems / MPEG program stream (VCD)D video4linux2,v4l2 Video4Linux2 device grabD vivo VivoD vmd Sierra VMDE vob MPEG-2 PS (VOB)D vobsub VobSub subtitle formatDE voc Creative VoiceD vpk Sony PS2 VPKD vplayer VPlayer subtitlesD vqf Nippon Telegraph and Telephone Corporation (NTT) TwinVQDE w64 Sony Wave64DE wav WAV / WAVE (Waveform Audio)D wc3movie Wing Commander III movieE webm WebME webm_chunk WebM Chunk MuxerDE webm_dash_manifest WebM DASH ManifestE webp WebPD webp_pipe piped webp sequenceDE webvtt WebVTT subtitleD wsaud Westwood Studios audioD wsvqa Westwood Studios VQADE wtv Windows Television (WTV)DE wv raw WavPackD wve Psion 3 audioD x11grab X11 screen capture, using XCBD xa Maxis XAD xbin eXtended BINary text (XBIN)D xmv Microsoft XMVE xv XV (XVideo) output deviceD xvag Sony PS3 XVAGD xwma Microsoft xWMAD yop Psygnosis YOPDE yuv4mpegpipe YUV4MPEG pipe
nginx auth basic fail
in Amlogic meson
Posted
hi all .
i run odoroid-c2
foremaly i runed nginx with auth basic by next nginx.conf successfully in orange pi PC .
nginx.conf is
-------------
events {
worker_connections 800;
}
http {
include mime.types;
default_type application/octet-stream;
index index.html index.htm;
keepalive_timeout 65;
server_tokens off;
server {
listen 80;
server_name localhost; #<-for test
#root /var/www/d1;
root /var/www/d2;
}
server {
listen 80;
server_name n------------n.dip.jp;
root /var/www/d2;
auth_basic "closed site";
auth_basic_user_file /var/www/2/.htpasswd;
}
server {
listen 80;
server_name s----------------s.mydns.jp;
root /var/www/d1;
auth_basic "closed site";
auth_basic_user_file /var/www/1/.htpasswd;
}
}
but [ /etc/init.d/nginx restart ] fails in odoroid-c2 .
i love nginx but fail .
so i am forced to run apache2 .
head apache2.conf
----------------------------------------
NameVirtualHost *:80
<VirtualHost *:80>
ServerName s-----------------s.mydns.jp
DocumentRoot /var/www/d1
</VirtualHost>
<VirtualHost *:80>
ServerName n---------------n.dip.jp
DocumentRoot /var/www/d2
</VirtualHost>
<Directory "/var/www/d1">
AuthType Basic
AuthName "D1"
AuthUserFile /var/www/1/.htpasswd
Require user emi
</Directory>
<Directory "/var/www/d2">
AuthType Basic
AuthName "D2"
AuthUserFile /var/www/2/.htpasswd
Require user fuji
</Directory>
what is wrong with nginx.conf ?
-------------------------
regards