Version 15 (modified by jazz, 19 months ago) (diff) |
---|
2021-04-18
homebrew
~$ brew tap coursier/formulas homebrew/cask homebrew/cask-fonts homebrew/cask-versions homebrew/core homebrew/services jlhonora/lsusb
~$ brew list --formula bash-completion coreutils dos2unix gettext git git-extras htop jq libdvdcss libidn2 libunistring mosh mtr ncurses nmap oniguruma openssl@1.1 p7zip pcre2 pidof protobuf readline tig tree unrar wget
~$ brew list --cask firefox font-hack google-chrome intellij-idea-ce joplin messenger mpv skype slack spectacle visual-studio-code zulu8
mencoder
mencoder dvd://2 -ovc xvid -xvidencopts vhq=2:bvhq=1:chroma_opt:quant_type=mpeg:bitrate=1225 -oac mp3lame -lameopts br=128 -nosub -o track2.avi
1401 apt-cache search mencoder 1402 sudo apt-get -y install mencoder 1404 mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate="1200" -vf scale -zoom -xy 640 -oac mp3lame -lameopts br=128 -o /nas/videos/my-movies/example/track2.avi 1419 mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate="1200" -vf scale -zoom -xy 640 -oac mp3lame -lameopts br=128 -o /nas/videos/my-movies/example/track2.avi 1435 mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate="1200" -vf scale -zoom -xy 640 -oac mp3lame -lameopts br=128 -o /nas/videos/my-movies/example/track2.avi 1436 sudo mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate="1200" -vf scale -zoom -xy 640 -oac mp3lame -lameopts br=128 -o track2.avi 1446 mencoder dvd://1 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate="1200" -oac mp3lame -lameopts br=128 -o track1.avi 1448 mencoder dvd://1 -ovc copy -oac mp3lame -lameopts br=128 -o track1.avi 1450 mencoder dvd://1 -ovc copy -oac mp3lame -lameopts br=128 -o track1.avi 1451 mencoder dvd://1 -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:vpass=2 -oac mp3lame -lameopts br=128 -o track1.avi 1452 mencoder dvd://1 -ovc lavc -lavcopts vcodec=mpeg4:vhq -oac mp3lame -lameopts br=128 -o track1.avi 1454* mencoder dvd://1 -ovc xvid - -oac mp3lame -lameopts br=128 -o track1.avi 1456* mencoder dvd://3 -o track3.avi 1459 mencoder -ovc copy -oac help 1461 mencoder dvd://3 -ovc copy -oac copy -sid 1 -o temp.avi 1473 mencoder dvd://1 -ovc xvid -lavcopts vhq=2:bvhq=1:chroma_opt:quant_type=mpeg -oac mp3lame -lameopts br=128 -o track1.avi 1474 mencoder dvd://1 -ovc xvid -lavcopts vhq=2:chroma_opt:quant_type=mpeg -oac mp3lame -lameopts br=128 -o track1.avi 1477 mencoder dvd://1 -ovc xvid -lavdopts vhq=2:bvhq=1:chroma_opt:quant_type=mpeg -oac mp3lame -lameopts br=128 -o track1.avi 1478 mencoder dvd://1 -ovc xvid -xvidencopts vhq=2:bvhq=1:chroma_opt:quant_type=mpeg -oac mp3lame -lameopts br=128 -o track1.avi 1480 mencoder dvd://1 -ovc xvid -xvidencopts vhq=2:bvhq=1:chroma_opt:quant_type=mpeg -oac mp3lame -lameopts br=128 -o track1.avi 1481 mencoder dvd://2 -ovc xvid -xvidencopts vhq=2:bvhq=1:chroma_opt:quant_type=mpeg:pass=2 -oac mp3lame -lameopts br=128 -o track2.avi 1482 mencoder dvd://2 -ovc xvid -xvidencopts vhq=2:bvhq=1:chroma_opt:quant_type=mpeg:pass=2:bitrate=3000 -oac mp3lame -lameopts br=128 -o track2.avi 1512 mencoder dvd://3 -ovc xvid -xvidencopts vhq=2:bvhq=1:chroma_opt:quant_type=mpeg:bitrate=2400 -oac mp3lame -lameopts br=128 -o track2.avi 1516 mencoder dvd://2 -ovc xvid -xvidencopts vhq=2:bvhq=1:chroma_opt:quant_type=mpeg:pass=2:bitrate=1600 -oac mp3lame -lameopts br=128 --nosub -o track2.avi 1517 mencoder dvd://2 -ovc xvid -xvidencopts vhq=2:bvhq=1:chroma_opt:quant_type=mpeg:pass=2:bitrate=1600 -oac mp3lame -lameopts br=128 -nosub -o track2.avi 1518 mencoder dvd://2 -ovc xvid -xvidencopts vhq=2:bvhq=1:chroma_opt:quant_type=mpeg:bitrate=1225 -oac mp3lame -lameopts br=128 -nosub -o track2.avi
dvdbackup
dvdbackup -M -g -n "${強制給 Title 名稱}" -i "${來源目錄(如果沒有 /dev/dvd 的話)}" -o "${目標目錄}"
- 在 macOS 上用 docker 來跑 dvdbackup
~$ docker run -it --name mencoder -v /Volumes/DVD:/DVD -v /Volumes/USB_DISK/:/data debian /bin/bash root@9892093989fe:/# apt-get update; apt-get -y install dvdbackup root@9892093989fe:/# dvdbackup -M -g -n "DISC_02" -i /DVD/ -o /data/Video/
- 看起來可能也不必這麼麻煩,因為 Homebrew 就有 dvdbackup
~$ brew info dvdbackup dvdbackup: stable 0.4.2 (bottled) Rip DVD's from the command-line https://dvdbackup.sourceforge.io Not installed From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/dvdbackup.rb ==> Dependencies Required: libdvdread ✘ ==> Analytics install: 35 (30 days), 131 (90 days), 739 (365 days) install-on-request: 35 (30 days), 131 (90 days), 695 (365 days) build-error: 0 (30 days)
- (2021-07-17) 備忘:macOS 版指令不支援 -g 其他一樣。用 mount 指令看光碟機獨到的裝置名稱(Ex. /dev/disk3)
/Volumes/JazzMacBookAir/Video$ dvdbackup -M -g -n "DISC_01" -i /dev/disk3 -o DVD_01
- 結果目錄結構
DVD_01/ └── DISC_01 └── VIDEO_TS
- 結果目錄結構
- (2021-07-18) 常常 dvdbackup 跑很久,用 dd 會快一點。
- How to make a backup copy (ISO image) of a CD or DVD using the MacOS dd command
$ mount $ diskutil list $ sudo umount /deve/disk3 jazzwang:/Volumes/JazzMacBookAir/Video$ sudo time dd if=/dev/disk3 of=filename.iso bs=4m 13488+0 records in 13488+0 records out 55246848 bytes transferred in 21.555367 secs (2563021 bytes/sec)
- 有時候光碟機會一直在反覆讀又沒有讀出多少,懷疑有點類似運用壞軌機制來防拷,所以在 dd 指令中加入 conv=sync,noerror 參數會有幫助
- [參考] https://unix.stackexchange.com/q/651444
jazzwang:/Volumes/JazzMacBookAir/Video$ sudo time dd if=/dev/disk3 of=filename.iso conv=sync,noerror
- [參考] https://unix.stackexchange.com/q/651444
- 有時候光碟機會一直在反覆讀又沒有讀出多少,懷疑有點類似運用壞軌機制來防拷,所以在 dd 指令中加入 conv=sync,noerror 參數會有幫助
- How to Mount an ISO Image in Mac OS X
hdiutil mount filename.iso
ddrescue
- https://www.bitsgalore.org/2015/11/13/preserving-optical-media-from-the-command-line
ddrescue -b 2048 -r4 -v /dev/sr0 mydisk.iso mydisk.log
lsdvd
lsdvd "${DVD 掛載目錄}"
- macOS 看樣子 Homebrew 有 libdvdcss, dvdbackup, dvdauthor, libdvdread, lsdvd 這些常用的工具
~$ brew search dvd ==> Formulae dvd+rw-tools dvd-vr dvdauthor dvdbackup dvdrtools libdvdcss libdvdnav libdvdread lsdvd ==> Casks dvdstyler macx-dvd-ripper-mac-free-edition macx-dvd-ripper-pro
Debian
- 用 apt-key 直接加某個 public key 的語法
apt-key adv --keyserver keyserver.ubuntu.com --recv-key 6B73A36E6026DFCA
- https://sleeplessbeastie.eu/2018/08/08/how-to-download-public-key-used-to-verify-gnupg-signature-for-the-repository/
macOS - Linux 互通 - hfsplus
- https://askubuntu.com/questions/332315/how-to-read-and-write-hfs-journaled-external-hdd-in-ubuntu-without-access-to-os
- 一般來說,HFS+ 的磁區,在 Ubuntu 底下掛載會是 read-only。看樣子要給參數 mount -t force,rw 才有辦法變成可讀寫。
sudo apt-get install hfsprogs
sudo mount -t hfsplus -o force,rw /dev/sdXY /media/mntpoint
or
sudo mount -t hfsplus -o remount,force,rw /mount/point
sudo fsck.hfsplus -f /dev/sdXY