diff options
author | pukkandan <pukkandan@users.noreply.github.com> | 2021-01-08 01:08:21 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-08 01:08:21 +0530 |
commit | 6c40e33c9e97bd32cece9b12e5e90ed66fa1fcb8 (patch) | |
tree | b7457812e5498f5c67244c330724ce4314f0cb90 | |
parent | c82fc65d039a28b0b370718572e32ca83a2a709a (diff) | |
parent | e0da59fe5447fbc08041e89081d7587e0a887e1b (diff) | |
download | hypervideo-pre-6c40e33c9e97bd32cece9b12e5e90ed66fa1fcb8.tar.lz hypervideo-pre-6c40e33c9e97bd32cece9b12e5e90ed66fa1fcb8.tar.xz hypervideo-pre-6c40e33c9e97bd32cece9b12e5e90ed66fa1fcb8.zip |
ffmpeg: ignore extra data streams #9 by jbruchon
closes #2, blackjack4494#291
Authored by jbruchon
-rw-r--r-- | youtube_dlc/postprocessor/embedthumbnail.py | 2 | ||||
-rw-r--r-- | youtube_dlc/postprocessor/ffmpeg.py | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/youtube_dlc/postprocessor/embedthumbnail.py b/youtube_dlc/postprocessor/embedthumbnail.py index 94e3eca98..50678669f 100644 --- a/youtube_dlc/postprocessor/embedthumbnail.py +++ b/youtube_dlc/postprocessor/embedthumbnail.py @@ -96,7 +96,7 @@ class EmbedThumbnailPP(FFmpegPostProcessor): os.rename(encodeFilename(old_thumbnail_filename), encodeFilename(thumbnail_filename)) options = [ - '-c', 'copy', '-map', '0', + '-c', 'copy', '-map', '0', '-dn', '-attach', thumbnail_filename, '-metadata:s:t', 'mimetype=image/jpeg'] self._downloader.to_screen('[ffmpeg] Adding thumbnail to "%s"' % filename) diff --git a/youtube_dlc/postprocessor/ffmpeg.py b/youtube_dlc/postprocessor/ffmpeg.py index c7071d73d..35939dbb0 100644 --- a/youtube_dlc/postprocessor/ffmpeg.py +++ b/youtube_dlc/postprocessor/ffmpeg.py @@ -359,7 +359,7 @@ class FFmpegVideoRemuxerPP(FFmpegPostProcessor): if information['ext'] == self._preferedformat: self._downloader.to_screen('[ffmpeg] Not remuxing video file %s - already is in target format %s' % (path, self._preferedformat)) return [], information - options = ['-c', 'copy', '-map', '0'] + options = ['-c', 'copy', '-map', '0', '-dn'] prefix, sep, ext = path.rpartition('.') outpath = prefix + sep + self._preferedformat self._downloader.to_screen('[' + 'ffmpeg' + '] Remuxing video from %s to %s, Destination: ' % (information['ext'], self._preferedformat) + outpath) @@ -428,7 +428,7 @@ class FFmpegEmbedSubtitlePP(FFmpegPostProcessor): input_files = [filename] + sub_filenames opts = [ - '-c', 'copy', '-map', '0', + '-c', 'copy', '-map', '0', '-dn', # Don't copy the existing subtitles, we may be running the # postprocessor a second time '-map', '-0:s', @@ -498,7 +498,7 @@ class FFmpegMetadataPP(FFmpegPostProcessor): filename = info['filepath'] temp_filename = prepend_extension(filename, 'temp') in_filenames = [filename] - options = ['-map', '0'] + options = ['-map', '0', '-dn'] if info['ext'] == 'm4a': options.extend(['-vn', '-acodec', 'copy']) @@ -578,7 +578,7 @@ class FFmpegFixupStretchedPP(FFmpegPostProcessor): filename = info['filepath'] temp_filename = prepend_extension(filename, 'temp') - options = ['-c', 'copy', '-map', '0', '-aspect', '%f' % stretched_ratio] + options = ['-c', 'copy', '-map', '0', '-dn', '-aspect', '%f' % stretched_ratio] self._downloader.to_screen('[ffmpeg] Fixing aspect ratio in "%s"' % filename) self.run_ffmpeg(filename, temp_filename, options) @@ -596,7 +596,7 @@ class FFmpegFixupM4aPP(FFmpegPostProcessor): filename = info['filepath'] temp_filename = prepend_extension(filename, 'temp') - options = ['-c', 'copy', '-map', '0', '-f', 'mp4'] + options = ['-c', 'copy', '-map', '0', '-dn', '-f', 'mp4'] self._downloader.to_screen('[ffmpeg] Correcting container in "%s"' % filename) self.run_ffmpeg(filename, temp_filename, options) @@ -612,7 +612,7 @@ class FFmpegFixupM3u8PP(FFmpegPostProcessor): if self.get_audio_codec(filename) == 'aac': temp_filename = prepend_extension(filename, 'temp') - options = ['-c', 'copy', '-map', '0', '-f', 'mp4', '-bsf:a', 'aac_adtstoasc'] + options = ['-c', 'copy', '-map', '0', '-dn', '-f', 'mp4', '-bsf:a', 'aac_adtstoasc'] self._downloader.to_screen('[ffmpeg] Fixing malformed AAC bitstream in "%s"' % filename) self.run_ffmpeg(filename, temp_filename, options) |