» 您尚未登录:请 登录 | 注册 | 标签 | 帮助 | 小黑屋 |


 20 12
发新话题
打印

推荐一个 Unix/MAC 下方便的youtube下载器(20楼更新mac装机宝典)

posted by wap, platform: MAC OS X
吧 下面的copy 然后

放入 conf file 里 肯定行的

# Lines starting with # are comments

# Always extract audio
#-x

# Do not copy the mtime
#--no-mtime

# Use this proxy
#--proxy 127.0.0.1:3128

# Save all videos under Movies directory in your home directory
-o ~/Movies/youtube/%(uploader)s_%(title)s_%(id)s.%(ext)s

# Download Best MP4
-f 'bestvideo[ext=mp4][fps>30]+bestaudio[ext=m4a]/bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best'

# Description
--write-description
--write-info-json
--write-annotations

# Subtitle
--all-subs
--sub-format "srt/best"

#
--prefer-ffmpeg
--ffmpeg-location /usr/local/bin/


TOP

引用:
原帖由 beterhans 于 2018-3-7 22:25 发表
posted by wap, platform: MAC OS X
吧 下面的copy 然后

放入 conf file 里 肯定行的

# Lines starting with # are comments

# Always extract audio
#-x

# Do not copy the mtime
#--no-mtime

# U ...
搞了一下午,貌似都不行
附件: 您所在的用户组无法下载或查看附件



TOP

posted by wap, platform: MAC OS X
标题有问题。。
Homebrew 是 macOS/Linux 下的包管理器,不支持 FreeBSD / System V 等常见 Unix


TOP

posted by wap, platform: MAC OS X
引用:
原帖由 @Pollux_zy  于 2019-7-15 16:48 发表
搞了一下午,貌似都不行
我更新了下 可以啊
Last login: Mon Jul 15 19:21:39 on ttys000
MacMini2018:~ hans$ youtube-dl https://www.youtube.com/watch?v=xi__6j-rGhY
[youtube] xi__6j-rGhY: Downloading webpage
[youtube] xi__6j-rGhY: Downloading video info webpage
WARNING: video doesn't have subtitles
[youtube] xi__6j-rGhY: Downloading annotations
[info] Writing video description to: /Users/hans/Movies/youtube/82电玩大叔_这画面招式,还有手感,可以说是山寨街霸的巅峰了吧_xi__6j-rGhY.description
[info] Writing video annotations to: /Users/hans/Movies/youtube/82电玩大叔_这画面招式,还有手感,可以说是山寨街霸的巅峰了吧_xi__6j-rGhY.annotations.xml
[info] Writing video description metadata as JSON to: /Users/hans/Movies/youtube/82电玩大叔_这画面招式,还有手感,可以说是山寨街霸的巅峰了吧_xi__6j-rGhY.info.json
[download] Destination: /Users/hans/Movies/youtube/82电玩大叔_这画面招式,还有手感,可以说是山寨街霸的巅峰了吧_xi__6j-rGhY.f136.mp4
[download] 100% of 158.77MiB in 00:07
[download] Destination: /Users/hans/Movies/youtube/82电玩大叔_这画面招式,还有手感,可以说是山寨街霸的巅峰了吧_xi__6j-rGhY.f140.m4a
[download] 100% of 14.12MiB in 00:00
[ffmpeg] Merging formats into "/Users/hans/Movies/youtube/82电玩大叔_这画面招式,还有手感,可以说是山寨街霸的巅峰了吧_xi__6j-rGhY.mp4"
Deleting original file /Users/hans/Movies/youtube/82电玩大叔_这画面招式,还有手感,可以说是山寨街霸的巅峰了吧_xi__6j-rGhY.f136.mp4 (pass -k to keep)
Deleting original file /Users/hans/Movies/youtube/82电玩大叔_这画面招式,还有手感,可以说是山寨街霸的巅峰了吧_xi__6j-rGhY.f140.m4a (pass -k to keep)
MacMini2018:~ hans$

楼下 Share 下我的装机宝典! 你可以完全参照试试看

TOP

posted by wap, platform: MAC OS X
Mac 装机宝典 你可以参考下


# Install Xcode command line
xcode-select --install

#------- Install homebrew
--------
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

# Uninstall homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

# Update list
brew update

# Upgrade everything
brew upgrade

# Or upgrade a specific formula with:
brew upgrade <formula>

# Remove old version of an formula (By default, Homebrew does not uninstall old versions of a formula)
brew cleanup <formula>
or
brew cleanup

# Where does stuff get downloaded?
brew --cache

Search an app
brew search mpv
#will give both cli and gui


brew cask app
#will install gui app


# ------------ Must have apps -----------
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python get-pip.py
pip install --upgrade pip

brew cask install homebrew/cask-versions/adoptopenjdk8

brew install python3
pip3 install --upgrade pip


# --------- Medias ----
# --------- All the base FFMPEG must have others depend on it-------
brew install ffmpeg
brew cask install homebrew/cask/mkvtoolnix


# --------- Youtube downloader must have others depend on it ------
brew install youtube-dl
or
brew update
brew upgrade youtube-dl


# You need to upgrade it every 2-3 month! youtube don't like you to download it's video..
# put following into /etc/youtube-dl.conf
# to enable auto download best mp4 60fps video.

##### START CONFIG FILE
# Lines starting with # are comments

# Always extract audio
#-x

# Do not copy the mtime
#--no-mtime

# Use this proxy
#--proxy 127.0.0.1:3128

# Save all videos under Movies directory in your home directory
-o ~/Movies/youtube/%(uploader)s_%(title)s_%(id)s.%(ext)s

# Download Best MP4
-f 'bestvideo[ext=mp4][fps>30][height <=? 1080]+bestaudio[ext=m4a]/bestvideo[ext=mp4][height <=? 1080]+bestaudio[ext=m4a]/best[ext=mp4]/best'

# Description
--write-description
--write-info-json
--write-annotations

# Subtitle
--all-subs
--sub-format "srt/best"

#
--prefer-ffmpeg
--ffmpeg-location /usr/local/bin/
#### End config file



------- Install Best Mac Media Player mpv and best config --------
brew cask install mpv
# put following config file into /usr/local/etc/mpv/mpv.conf
# to enable best config


### Config Begin
# General
input-media-keys=yes                     # enable/disable OSX media keys

screenshot-format=png
screenshot-png-compression=8
screenshot-template='~/Pictures/%F (%P) %n'

# Video
autofit-larger=100%x90%
autofit-smaller=640x480
framedrop=vo

# Audio
audio-file-auto=fuzzy                                        # external audio doesn't has to match the file name exactly to autoload
audio-pitch-correction=no                                # automatically insert scaletempo when playing with higher speed
volume-max=100                                                        # maximum volume in %, everything above 100 results in amplification
volume=100                                                                # default volume, 100 = unchanged

# OSD
osd-bar-h=1.5
osd-border-size=2
osd-color='#CCFFFFFF'
osd-border-color='#99000000'
osd-duration=2000
osd-font='PingFangSC-Regular'
sub-text-font='PingFangSC-Regular'
# Font pre El Capitan
#osd-font='STHeiti'
#sub-text-font='STHeiti'

# No window border
no-border

# Save the current playback position on quit and resume on next run.
save-position-on-quit

# load config file from file directory, useful for overriding ass styles for entire series
use-filedir-conf=yes

# Subtitles
sub-auto=fuzzy
embeddedfonts=yes                                                # use embedded fonts for SSA/ASS subs
sub-file-paths-append=ass               # search for external subs in these relative subdirectories
sub-file-paths-append=srt
sub-file-paths-append=sub
sub-file-paths-append=subs
sub-file-paths-append=subtitles

# Languages
alang=en,eng,jp,jap,zh,cmn,chi,zho
slang=en,eng,jp,jap,cmn,chi,zho,zh,eng,en

# Youtube
#ytdl
#ytdl-format=best
# Config END

TOP

 20 12
发新话题
     
官方公众号及微博