View Single Post
  #957  
Old 04.10.2019, 10:37
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 707
Default

Quote:
Originally Posted by Tom View Post
thx, great idea mgpai ;-)
this command works fine:

ffmpeg.exe -i path\file -map 0:0 -map 0:1 -c:v copy -c:s copy -c:a: ac3 -b:a 640k -c:s copy outputfile
Replace the command in the script with then new command. Enclose the parameters in quotes separating them with ',' (comma) instead of 'space'.

Example:
Code:
callAsync(function(error) {
       if (!error) getPath(file).delete();
   }, ffmpeg, "-i", file, "-map", "0:0", "-map", "0:1", "-c:v", "copy", "-c:s", "copy", "-c:a:", "ac3", "-b:a", "640k", "-c:s", "copy", file.replace(ext, "_ac3." + ext));

Above command replaces the file extension with 'ac3', but look like the example provided by you only copies the stream and does not convert it. You may need to adjust the output file pattern accordingly.

Also, the audio stream map specified may not always be 'german', so you may also need to map the stream by language parameter, instead of stream ID.
Reply With Quote