====== Random Notes ======
Out-of-place stuffs...
===== Computer Network IP Addresses =====
In the original IPV4 scheme, there are 5 classes for IP addresses. NA= Network address, HA = host address. NA = 0 implies local network, HA = 0 implies broadcast, HA = 1 usually for gateways (router @ interface address).
- **CLASS A** Format: 1-bit ID [0] | 7-bit NA | 3-byte HA ; Range: 1.x.x.x - 126.x.x.x (0.x.x.x & 127.x.x.x reserved) ; Net-Mask: 255.0.0.0
- **CLASS B** Format: 2-bit ID [10] | 14-bit NA | 2-byte HA ; Range: 128.x.x.x - 191.x.x.x ; Net-Mask: 255.255.0.0
- **CLASS C** Format: 3-bit ID [110] | 21-bit NA | 1-byte HA ; Range: 192.x.x.x - 223.x.x.x ; Net-Mask: 255.255.255.0
- **CLASS D** Format: 4-bit ID [1110] | 28-bit multicast address
- **CLASS E** Format: 5-bit ID [11110] | 27-bit reserved
- **Private Net Addresses (RFC1918)** Range1: 10.0.0.0 - 10.255.255.255 ; Range2: 172.16.0.0 - 172.31.255.255 ; Range3: 192.168.0.0 - 192.168.255.255
**Subnet Mask** is a method used to obtain more network groups from existing classes. HA is masked with a //subnet mask// and used as NA.
In the newer IPv4 implementation, masks are no longer fixed - classes are no longer used to define a network. IPV4 notation takes the form of x.x.x.x/y where x is an 8-bit number and y gives the number of bits used to mask out the network address.
===== Video Notes =====
| **NTSC** |
* used mainly in US, Japan
* 60 Hz, 525 lines at 30 fps (480i)
* resolution => 720 x 480 (DVD-NTSC?)
| **PAL** |
* used mainly in UK, Europe, SE Asia
* 50 Hz, 625 lines at 25 fps (576i)
* resolution => 720 x 576 (DVD-PAL?)
^ Standard ^ Supported Aspect Ratio ^
| MPEG | 1:1 4:3 2.11:1 16:9 |
| TV | 4:3 16:9 |
^ Settings ^ Resolution ^
| Fullscreen (Std) | 4:3 |
| Widescreen | 16:9 (LetterBox) |
| Widescreen | 16:9 (Anamorphic) |
====== Issue Running ImageMagick's Convert ======
I got the following error message
convert-im6.q16: attempt to perform an operation not allowed by the security policy `EPS'
I got the solution from [[https://askubuntu.com/questions/1127260/imagemagick-convert-not-allowed|here]]. It turns out, there is a security feature that we need to grant. Edit file ''/etc/ImageMagick-6/policy.xml''. Find the following line,
and change the ''rights'' value to ''read|write''.
====== Live Video Streaming using ffmpeg ======
Dumping this here as it is for now...
# may run on ramdisk?
- hls?
ffmpeg -f v4l2 -i /dev/video0 -strict experimental -pix_fmt yuv420p playlist.m3u8
- generic segmenter?
ffmpeg -f v4l2 -framerate 25 -video_size 640x480 -i /dev/video0 -f segment -segment_time 10 -segment_format_options movflags=+faststart out%03d.mp4
- option to place keyframe every 2s (every 50 frames at 25fps)
-c:v libx264 -r 25 -g 50
*note: segment_time should be multiple of keyframe interval
We need to modify /etc/apache2/mods-available/mime.conf
AddType application/x-mpegURL .m3u8
AddType video/MP2T .ts
====== Analysis of Android (cheap, china made) disk parition layout ======
Dumped...
https://spflashtool.com/download/
SP_Flash_Tool-5.1916_Linux.zip
=> ./adb shell
$ cat /proc/mtd
dev: size erasesize name
$ cat /proc/dumchar_info
Part_Name Size StartAddr Type MapTo
preloader 0x0000000000880000 0x0000000000000000 2 /dev/misc-sd
mbr 0x0000000000080000 0x0000000000000000 2 /dev/block/mmcblk0
ebr1 0x0000000000080000 0x0000000000080000 2 /dev/block/mmcblk0p1
pro_info 0x0000000000300000 0x0000000000100000 2 /dev/block/mmcblk0
nvram 0x0000000000500000 0x0000000000400000 2 /dev/block/mmcblk0
protect_f 0x0000000000a00000 0x0000000000900000 2 /dev/block/mmcblk0p2
protect_s 0x0000000000a00000 0x0000000001300000 2 /dev/block/mmcblk0p3
seccfg 0x0000000000020000 0x0000000001d00000 2 /dev/block/mmcblk0
uboot 0x0000000000060000 0x0000000001d20000 2 /dev/block/mmcblk0
bootimg 0x0000000000600000 0x0000000001d80000 2 /dev/block/mmcblk0
recovery 0x0000000000600000 0x0000000002380000 2 /dev/block/mmcblk0
sec_ro 0x0000000000040000 0x0000000002980000 2 /dev/block/mmcblk0
misc 0x0000000000080000 0x00000000029c0000 2 /dev/block/mmcblk0
logo 0x0000000000300000 0x0000000002a40000 2 /dev/block/mmcblk0
expdb 0x0000000000a00000 0x0000000002d40000 2 /dev/block/mmcblk0
android 0x0000000035200000 0x0000000003740000 2 /dev/block/mmcblk0p4
cache 0x000000000e200000 0x0000000038940000 2 /dev/block/mmcblk0p5
usrdata 0x000000009e360000 0x0000000046b40000 2 /dev/block/mmcblk0p6
bmtpool 0x0000000001500000 0x00000000ff7700a8 2 /dev/block/mmcblk0
Part_Name:Partition name you should open;
Size:size of partition
StartAddr:Start Address of partition;
Type:Type of partition(MTD=1,EMMC=2)
MapTo:actual device you operate
$ getprop ro.build.ab_update
- returns nothing... so, using A-only partition scheme (instead of newer A-B scheme)