diff --git a/CHANGELOG.md b/CHANGELOG.md index afc9d2d..92b5a26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Twitch Downloader change log ------------ * Fix speed calculation when resuming download (#75, thanks CroquetteTheThe) +* Add artist and title metadata to resulting video (#80) 1.16.1 (2021-07-31) ------------------- diff --git a/twitchdl/commands/download.py b/twitchdl/commands/download.py index 2ac9a5d..ccbd6c5 100644 --- a/twitchdl/commands/download.py +++ b/twitchdl/commands/download.py @@ -48,14 +48,17 @@ def _select_playlist_interactive(playlists): return uri -def _join_vods(playlist_path, target, overwrite): +def _join_vods(playlist_path, target, overwrite, video): command = [ "ffmpeg", "-i", playlist_path, "-c", "copy", - target, + "-metadata", "artist={}".format(video["creator"]["displayName"]), + "-metadata", "title={}".format(video["title"]), + "-metadata", "encoded_by=twitch-dl", "-stats", "-loglevel", "warning", + target, ] if overwrite: @@ -275,7 +278,7 @@ def _download_video(video_id, args): print_out("\n\nJoining files...") target = _video_target_filename(video, args.format) - _join_vods(playlist_path, target, args.overwrite) + _join_vods(playlist_path, target, args.overwrite, video) if args.keep: print_out("\nTemporary files not deleted: {}".format(target_dir))