]> gitweb @ CieloNegro.org - youtube-dl.git/blobdiff - youtube_dl/YoutubeDL.py
Add a post processor for embedding subtitles in mp4 videos (closes #1052)
[youtube-dl.git] / youtube_dl / YoutubeDL.py
index 74e7b8de5829b8739de8434527ca02af2a126179..1fd610a6e7b2285a078fb18f1d059154c9a540c0 100644 (file)
@@ -497,7 +497,7 @@ class YoutubeDL(object):
                 if sub is None:
                     continue
                 try:
-                    sub_filename = filename.rsplit('.', 1)[0] + u'.' + sub_lang + u'.' + sub_format
+                    sub_filename = subtitles_filename(filename, sub_lang, sub_format)
                     self.report_writesubtitles(sub_filename)
                     with io.open(encodeFilename(sub_filename), 'w', encoding='utf-8') as subfile:
                             subfile.write(sub)