[ffmpeg] check for - file name in _ffmpeg_filename_argument
authorremitamine <remitamine@gmail.com>
Sat, 16 Apr 2016 18:45:56 +0000 (19:45 +0100)
committerremitamine <remitamine@gmail.com>
Sat, 16 Apr 2016 18:45:56 +0000 (19:45 +0100)
youtube_dl/downloader/external.py
youtube_dl/postprocessor/ffmpeg.py

index cda39fe9785a5a3d92aba2d4bc0309ec664241a4..8d642fc3e60594f10a057847cf5702f715941326 100644 (file)
@@ -235,10 +235,7 @@ class FFmpegFD(ExternalFD):
             args += ['-f', EXT_TO_OUT_FORMATS.get(info_dict['ext'], info_dict['ext'])]
 
         args = [encodeArgument(opt) for opt in args]
-        if tmpfilename == '-':
-            args.append('pipe:1')
-        else:
-            args.append(encodeFilename(ffpp._ffmpeg_filename_argument(tmpfilename), True))
+        args.append(encodeFilename(ffpp._ffmpeg_filename_argument(tmpfilename), True))
 
         self._debug_cmd(args)
 
index b64cd396bca6f2ec4457e64a294ec7bc9208bbf1..30af6eb5a5ee16774858f3da37b4d91bf647dd30 100644 (file)
@@ -175,7 +175,7 @@ class FFmpegPostProcessor(PostProcessor):
         # Always use 'file:' because the filename may contain ':' (ffmpeg
         # interprets that as a protocol) or can start with '-' (-- is broken in
         # ffmpeg, see https://ffmpeg.org/trac/ffmpeg/ticket/2127 for details)
-        return 'file:' + fn
+        return 'file:' + fn if fn != '-' else fn
 
 
 class FFmpegExtractAudioPP(FFmpegPostProcessor):