aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-11-15 01:25:47 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-11-15 01:25:47 +0530
commitf279aaee8e246f510e56fe35b163520f35085338 (patch)
treed59c9d1b18901398413ada1a830117df833dbc6b
parentd0e6121adf4f82b266c82d7e632f7fe79f05096c (diff)
downloadhypervideo-pre-f279aaee8e246f510e56fe35b163520f35085338.tar.lz
hypervideo-pre-f279aaee8e246f510e56fe35b163520f35085338.tar.xz
hypervideo-pre-f279aaee8e246f510e56fe35b163520f35085338.zip
Add compat-option embed-metadata
-rw-r--r--README.md1
-rw-r--r--yt_dlp/options.py2
-rw-r--r--yt_dlp/postprocessor/ffmpeg.py3
3 files changed, 5 insertions, 1 deletions
diff --git a/README.md b/README.md
index 7a4ec55bb..1612bda5a 100644
--- a/README.md
+++ b/README.md
@@ -137,6 +137,7 @@ Some of yt-dlp's default options are different from that of youtube-dl and youtu
* `--ignore-errors` is enabled by default. Use `--abort-on-error` or `--compat-options abort-on-error` to abort on errors instead
* When writing metadata files such as thumbnails, description or infojson, the same information (if available) is also written for playlists. Use `--no-write-playlist-metafiles` or `--compat-options no-playlist-metafiles` to not write these files
* `--add-metadata` attaches the `infojson` to `mkv` files in addition to writing the metadata when used with `--write-infojson`. Use `--compat-options no-attach-info-json` to revert this
+* Some metadata are embedded into different fields when using `--add-metadata` as compared to youtube-dl. Most notably, `comment` field contains the `webpage_url` and `synopsis` contains the `description`. You can [use `--parse-metadata`](https://github.com/yt-dlp/yt-dlp#modifying-metadata) to modify this to your liking or use `--compat-options embed-metadata` to revert this
* `playlist_index` behaves differently when used with options like `--playlist-reverse` and `--playlist-items`. See [#302](https://github.com/yt-dlp/yt-dlp/issues/302) for details. You can use `--compat-options playlist-index` if you want to keep the earlier behavior
* The output of `-F` is listed in a new format. Use `--compat-options list-formats` to revert this
* All *experiences* of a funimation episode are considered as a single video. This behavior breaks existing archives. Use `--compat-options seperate-video-versions` to extract information from only the default player
diff --git a/yt_dlp/options.py b/yt_dlp/options.py
index 89401910e..209f199bd 100644
--- a/yt_dlp/options.py
+++ b/yt_dlp/options.py
@@ -278,7 +278,7 @@ def parseOpts(overrideArguments=None):
'allowed_values': {
'filename', 'format-sort', 'abort-on-error', 'format-spec', 'no-playlist-metafiles',
'multistreams', 'no-live-chat', 'playlist-index', 'list-formats', 'no-direct-merge',
- 'no-youtube-channel-redirect', 'no-youtube-unavailable-videos', 'no-attach-info-json',
+ 'no-youtube-channel-redirect', 'no-youtube-unavailable-videos', 'no-attach-info-json', 'embed-metadata',
'embed-thumbnail-atomicparsley', 'seperate-video-versions', 'no-clean-infojson', 'no-keep-subs',
}, 'aliases': {
'youtube-dl': ['-multistreams', 'all'],
diff --git a/yt_dlp/postprocessor/ffmpeg.py b/yt_dlp/postprocessor/ffmpeg.py
index b2f28d658..d6734e8d9 100644
--- a/yt_dlp/postprocessor/ffmpeg.py
+++ b/yt_dlp/postprocessor/ffmpeg.py
@@ -721,6 +721,9 @@ class FFmpegMetadataPP(FFmpegPostProcessor):
add('season_number')
add('episode_id', ('episode', 'episode_id'))
add('episode_sort', 'episode_number')
+ if 'embed-metadata' in self.get_param('compat_opts', []):
+ add('comment', 'description')
+ metadata.pop('synopsis', None)
for key, value in info.items():
if value is not None and key != meta_prefix and key.startswith(meta_prefix):