This commit is contained in:
parent
e7fe739b49
commit
9c9fb37a0e
|
@ -25,6 +25,10 @@ Download, compress, and send your YouTube videos.
|
|||
3. Install jq
|
||||
|
||||
1. `sudo apt-get install jq`
|
||||
|
||||
4. Install ffmpeg
|
||||
|
||||
1. `sudo apt install ffmpeg`
|
||||
|
||||
### Usage
|
||||
|
||||
|
|
|
@ -67,6 +67,8 @@ fh.setFormatter(formatter)
|
|||
logging.StreamHandler(stream=sys.stderr)
|
||||
logger.addHandler(fh)
|
||||
|
||||
os.system('youtube-dl --rm-cache-dir')
|
||||
|
||||
# since youtube-dl updates so much check for updates
|
||||
# if not args.no_update:
|
||||
# print('checking for updates...')
|
||||
|
@ -135,7 +137,7 @@ def checkSize(url):
|
|||
def getUrls(playlist):
|
||||
proc = subprocess.run(['bash', 'get-urls.sh', playlist], capture_output=True, encoding="utf-8")
|
||||
if proc.stdout == '':
|
||||
logger.error('missing get-urls.sh')
|
||||
logger.error('')
|
||||
print('missing get-urls.sh')
|
||||
sys.exit(1)
|
||||
if proc.stdout.find('get-urls.sh: line 1: jq: command not found') == -1:
|
||||
|
@ -194,7 +196,7 @@ ydl_opts = {
|
|||
'allsubtitles': True,
|
||||
'logtostderr': True,
|
||||
'format': ytdlFormat,
|
||||
'outtmpl': 'downloads/%(title)s - %(id)s.%(ext)s',
|
||||
'outtmpl': 'downloads/\'%(title)s\' - (\'%(uploader)s\' - \'%(uploader_id)s\') - %(id)s',
|
||||
'postprocessors': [{
|
||||
'key': 'FFmpegMetadata',
|
||||
'key': 'EmbedThumbnail',
|
||||
|
@ -203,8 +205,7 @@ ydl_opts = {
|
|||
'logger': ytdlLogger(),
|
||||
'progress_hooks': [my_hook],
|
||||
}
|
||||
ytdlCMD = 'youtube-dl -i --add-metadata --all-subs --embed-subs --embed-thumbnail -f "{}" --merge-output-format mkv -o "downloads/%(title)s - %(id)s.%(ext)s" --write-annotations --write-info-json --write-description --write-all-thumbnails --write-sub --sub-format "best" --geo-bypass'.format(
|
||||
ytdlFormat)
|
||||
ytdlCMD = 'youtube-dl -i --add-metadata --all-subs --embed-subs --embed-thumbnail -f "{}" --merge-output-format mkv -o "downloads/%(title)s - %(id)s.%(ext)s" --write-annotations --write-info-json --write-description --write-all-thumbnails --write-sub --sub-format "best" --geo-bypass'.format(ytdlFormat)
|
||||
|
||||
videoInc = 1
|
||||
if not isURL:
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
pip3 list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U
|
Reference in New Issue