15

I'm a novice data hoarder, and have a few hundred videos archived from YouTube, using the following youtube-dl config file:

-i
-o "%(uploader)s (%(uploader_id)s)/%(upload_date)s - %(title)s - (%(duration)ss) [%(resolution)s] [%(id)s].%(ext)s"

# Archive Settings
--download-archive youtube-dl-archive.txt
-a youtube-dl-channels.txt

# Uniform Format
--prefer-ffmpeg
--merge-output-format mkv

# Get All Subs to SRT
--write-sub
--all-subs
--convert-subs srt

# Get metadata
--add-metadata
--write-description
--write-thumbnail

# Debug
-v

I just recently realized that I should really be including the --write-info-json option.

How can I go back through and download just the info-json files for all the videos without re-downloading the videos themselves? I've been using the -a option to keep track of what videos I've already archived, and thus I can easily use that file as a list of all the videos I need to download the info-json file for.

But I still don't know how to download just the info-json. Thanks for any pointers here.

2 Answers 2

17

I found the approach while searching for solutions

--dump-json only prints the info without writing to the disk

youtube-dl provides another two separate parameters, --write-info-json and --skip-download

If you just use --write-info-json you'll get the json written but also the video, which is not wanted

If you just use --skip-download you'll get nothing downloaded

Use both the params, you will get only json downloaded. i.e. youtube-dl [URL] --write-info-json --skip-download

It also supports -a to read URLs from files

7

Not a fully fledged answer, but as I am new and cannot add a comment, I have to use this

Have you tried the -j, --dump-json option, or one of the other ones listed in the manual at https://github.com/ytdl-org/youtube-dl/blob/master/README.md#verbosity--simulation-options ?

I just tried it and it seemed to work fine on a single video

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .