diff options
author | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2013-10-11 11:19:09 +0200 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2013-10-11 11:19:09 +0200 |
commit | bc4f29170f7fe1088f63fdc42f225656d3680c5e (patch) | |
tree | 936d97686501cf9912effc55cb2bdaa5c32ba5fb /youtube_dl/__init__.py | |
parent | cb354c8f6218ecd722b218a08935f7bd7eecabd3 (diff) | |
download | youtube-dl-bc4f29170f7fe1088f63fdc42f225656d3680c5e.zip youtube-dl-bc4f29170f7fe1088f63fdc42f225656d3680c5e.tar.gz youtube-dl-bc4f29170f7fe1088f63fdc42f225656d3680c5e.tar.bz2 |
Add a PostProcessor for adding metadata to the file (closes #1570)
It currently sets the title, the date and the author values.
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r-- | youtube_dl/__init__.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index 3ff78da..3513d71 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -358,6 +358,8 @@ def parseOpts(overrideArguments=None): help='do not overwrite post-processed files; the post-processed files are overwritten by default') postproc.add_option('--embed-subs', action='store_true', dest='embedsubtitles', default=False, help='embed subtitles in the video (only for mp4 videos)') + postproc.add_option('--add-metadata', action='store_true', dest='addmetadata', default=False, + help='add metadata to the files') parser.add_option_group(general) @@ -651,6 +653,9 @@ def _real_main(argv=None): ydl.add_default_info_extractors() # PostProcessors + # Add the metadata pp first, the other pps will copy it + if opts.addmetadata: + ydl.add_post_processor(FFmpegMetadataPP()) if opts.extractaudio: ydl.add_post_processor(FFmpegExtractAudioPP(preferredcodec=opts.audioformat, preferredquality=opts.audioquality, nopostoverwrites=opts.nopostoverwrites)) if opts.recodevideo: |