View Single Post
  #9  
Old 28.08.2019, 11:33
Tom Tom is offline
JD Adviser
 
Join Date: Jun 2018
Posts: 104
Default

ok
original script
Code:
// Convert dts to ac3 and create new video file
// Trigger Required: A new file has been created
// Forum Topic: https://board.jdownloader.org/showpost.php?p=427834&postcount=489

var ffmpeg = callAPI("config", "get", "org.jdownloader.controlling.ffmpeg.FFmpegSetup", null, "binarypath");
var ffprobe = callAPI("config", "get", "org.jdownloader.controlling.ffmpeg.FFmpegSetup", null, "binarypathprobe");

files.forEach(function(file) {
    if (getPath(file).getLinkInfo().group != "VideoExtensions") return;
    if (callSync(ffprobe, "-i", file).indexOf("Audio: dts") == -1) return;
    var ext = getPath(file).getExtension();
    callAsync(function(error) {
        if (!error) getPath(file).delete();
    }, ffmpeg, "-i", file, "-map", "0", "-vcodec", "copy", "-scodec", "copy", "-acodec", "ac3", "-b:a", "640k", file.replace(ext, "_ac3." + ext));
});
workaround script
Code:
// Convert dts to ac3 and create new video file
// Trigger Required: A new file has been created
// Forum Topic: https://board.jdownloader.org/showpost.php?p=427834&postcount=489

var ffmpeg = callAPI("config", "get", "org.jdownloader.controlling.ffmpeg.FFmpegSetup", null, "binarypath");
var ffprobe = callAPI("config", "get", "org.jdownloader.controlling.ffmpeg.FFmpegSetup", null, "binarypathprobe");

files.forEach(function(file) {
    if (getPath(file).getLinkInfo().group != "VideoExtensions") return;
    var dts = null;
    callAsync(function(exitCode, stdOut, errOut) {
        dts = errOut.indexOf("Audio: DTS") == -1;
    }, ffprobe, "-i", file);
    while (!dts) sleep(1000);
    if (!dts) return;
    var ext = getPath(file).getExtension();
    callAsync(function(error) {
        if (!error) getPath(file).delete();
    }, ffmpeg, "-i", file, "-map", "0", "-vcodec", "copy", "-scodec", "copy", "-acodec", "ac3", "-b:a", "640k", file.replace(ext, "_ac3." + ext));
});
dann einfach **External links are only visible to Support Staff****External links are only visible to Support Staff** runterladen und mit ersten script wird keine MKV mit AC3 erstellt, nur mit dem workaround.

vielleicht findest du ja was....

Last edited by Tom; 02.09.2019 at 10:21.
Reply With Quote