forked from j62/ctbrec
Disguise FFmpeg as normal browser
This commit is contained in:
parent
23c97cd2c0
commit
1e95872cb7
|
@ -55,10 +55,13 @@ public class FFmpegDownload extends AbstractHlsDownload {
|
|||
String chunkPlaylist = getSegmentPlaylistUrl(model);
|
||||
|
||||
String[] args = config.getSettings().ffmpegMergedDownloadArgs.split(" ");
|
||||
String[] argsPlusFile = new String[args.length + 3];
|
||||
System.arraycopy(args, 0, argsPlusFile, 2, args.length);
|
||||
argsPlusFile[0] = "-i";
|
||||
argsPlusFile[1] = chunkPlaylist;
|
||||
String[] argsPlusFile = new String[args.length + 5];
|
||||
int i = 0;
|
||||
argsPlusFile[i++] = "-headers";
|
||||
argsPlusFile[i++] = "User-Agent: " + config.getSettings().httpUserAgent;
|
||||
argsPlusFile[i++] = "-i";
|
||||
argsPlusFile[i++] = chunkPlaylist;
|
||||
System.arraycopy(args, 0, argsPlusFile, i, args.length);
|
||||
argsPlusFile[argsPlusFile.length-1] = targetFile.getAbsolutePath();
|
||||
String[] cmdline = OS.getFFmpegCommand(argsPlusFile);
|
||||
LOG.debug("Command line: {}", Arrays.toString(cmdline));
|
||||
|
|
Loading…
Reference in New Issue