Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "Name": "2pass",
- "Type": 0,
- "Revision": 5,
- "Properties": {
- "Description": "A blank video file template with a single \u0022Video File\u0022 input flow element.",
- "Tags": [
- "Video",
- "Basic"
- ],
- "Author": "FileFlows",
- "Fields": [],
- "Variables": {}
- },
- "Parts": [
- {
- "Uid": "8476a054-b364-4be9-add4-1ad3c602bf84",
- "Name": "",
- "ReadOnly": false,
- "FlowElementUid": "FileFlows.VideoNodes.VideoFile",
- "xPos": 160,
- "yPos": 60,
- "Icon": "fas fa-video",
- "Label": "",
- "Inputs": 0,
- "Outputs": 1,
- "OutputConnections": [
- {
- "Input": 1,
- "Output": 1,
- "InputNode": "f0ab5ada-c38e-4e2d-abab-bf7d9fcf464c"
- }
- ],
- "Type": 0,
- "Model": {
- "ProbeSize": 25
- }
- },
- {
- "Uid": "f0ab5ada-c38e-4e2d-abab-bf7d9fcf464c",
- "Name": "Run 1st pass",
- "Color": "",
- "ReadOnly": false,
- "FlowElementUid": "FileFlows.BasicNodes.Functions.Function",
- "xPos": 160,
- "yPos": 170,
- "Icon": "fas fa-code",
- "Label": "",
- "Inputs": 1,
- "Outputs": 1,
- "OutputConnections": [
- {
- "Input": 1,
- "Output": 1,
- "InputNode": "c1fd57c3-3988-412e-874f-b952dcf847c1"
- }
- ],
- "Type": 3,
- "Model": {
- "Outputs": 1,
- "Code": "let output = Flow.TempPath \u002B \u0027/\u0027 \u002B Flow.NewGuid() \u002B \u0027.mkv\u0027;\nlet ffmpeg = Flow.GetToolPath(\u0027ffmpeg\u0027);\nlet process = Flow.Execute({\n\tcommand: ffmpeg,\n\targumentList: [\n\t\t\u0027-y\u0027,\n\t\t\u0027-i\u0027, Variables.file.FullName,\n\t\t\u0027-map\u0027, \u00270\u0027, \u0027-map\u0027, \u0027-0:d\u0027,\n\t\t\u0027-c:v\u0027, \u0027libx265\u0027,\n\t\t\u0027-preset\u0027, \u0027slow\u0027,\n\t\t\u0027-profile:v\u0027, \u0027main10\u0027,\n\t\t\u0027-x265-params\u0027, \u0027pass=1\u0027,\n\t\t\u0027-b:v\u0027, \u00273000k\u0027,\n\t\t\u0027-minrate\u0027, \u00272000k\u0027,\n\t\t\u0027-maxrate\u0027, \u00275000k\u0027,\n\t\t\u0027-bufsize\u0027, \u002710000k\u0027,\n\t\t\u0027-c:a\u0027, \u0027copy\u0027,\n\t\t\u0027-c:s\u0027, \u0027copy\u0027,\n\t\t\u0027-f\u0027, \u0027matroska\u0027, \u0027/dev/null\u0027\n\t],\n\tworkingDirectory: Flow.TempPath \u002B \u0027/\u0027,\n});\n\nif(process.standardOutput)\n\tLogger.ILog(\u0027Standard output: \u0027 \u002B process.standardOutput);\nif(process.standardError)\n\tLogger.ILog(\u0027Standard error: \u0027 \u002B process.standardError);\n\nif(process.exitCode !== 0){\n\tLogger.ELog(\u0027Failed processing ffmpeg: \u0027 \u002B process.exitCode);\n\treturn -1;\n}\n\nreturn 1;"
- }
- },
- {
- "Uid": "c1fd57c3-3988-412e-874f-b952dcf847c1",
- "Name": "Run 2nd pass",
- "Color": "",
- "ReadOnly": false,
- "FlowElementUid": "FileFlows.BasicNodes.Functions.Function",
- "xPos": 160,
- "yPos": 300,
- "Icon": "fas fa-code",
- "Label": "",
- "Inputs": 1,
- "Outputs": 1,
- "OutputConnections": [
- {
- "Input": 1,
- "Output": 1,
- "InputNode": "31f913b2-e7ab-4016-be2e-490efa83a83e"
- }
- ],
- "Type": 3,
- "Model": {
- "Outputs": 1,
- "Code": "let output = Flow.TempPath \u002B \u0027/\u0027 \u002B Flow.NewGuid() \u002B \u0027.mkv\u0027;\nlet ffmpeg = Flow.GetToolPath(\u0027ffmpeg\u0027);\nlet process = Flow.Execute({\n\tcommand: ffmpeg,\n\targumentList: [\n\t\t\u0027-y\u0027,\n\t\t\u0027-i\u0027, Variables.file.FullName,\n\t\t\u0027-map\u0027, \u00270\u0027, \u0027-map\u0027, \u0027-0:d\u0027,\n\t\t\u0027-c:v\u0027, \u0027libx265\u0027,\n\t\t\u0027-preset\u0027, \u0027slow\u0027,\n\t\t\u0027-profile:v\u0027, \u0027main10\u0027,\n\t\t\u0027-x265-params\u0027, \u0027pass=2\u0027,\n\t\t\u0027-b:v\u0027, \u00273000k\u0027,\n\t\t\u0027-minrate\u0027, \u00272000k\u0027,\n\t\t\u0027-maxrate\u0027, \u00275000k\u0027,\n\t\t\u0027-bufsize\u0027, \u002710000k\u0027,\n\t\t\u0027-c:a\u0027, \u0027copy\u0027,\n\t\t\u0027-c:s\u0027, \u0027copy\u0027,\n\t\toutput\n\t],\n\tworkingDirectory: Flow.TempPath \u002B \u0027/\u0027,\n});\n\nif(process.standardOutput)\n\tLogger.ILog(\u0027Standard output: \u0027 \u002B process.standardOutput);\nif(process.standardError)\n\tLogger.ILog(\u0027Standard error: \u0027 \u002B process.standardError);\n\nif(process.exitCode !== 0){\n\tLogger.ELog(\u0027Failed processing ffmpeg: \u0027 \u002B process.exitCode);\n\treturn -1;\n}\n\nFlow.SetWorkingFile(output);\nreturn 1;"
- }
- },
- {
- "Uid": "31f913b2-e7ab-4016-be2e-490efa83a83e",
- "Name": "",
- "Color": "",
- "ReadOnly": false,
- "FlowElementUid": "FileFlows.BasicNodes.File.MoveFile",
- "xPos": 160,
- "yPos": 410,
- "Icon": "fas fa-file-export",
- "Label": "",
- "Inputs": 1,
- "Outputs": 2,
- "Type": 2,
- "Model": {
- "InputFile": null,
- "DestinationPath": "/media/testfileflows/output",
- "DestinationFile": null,
- "MoveFolder": false,
- "DeleteOriginal": false,
- "AdditionalFiles": null,
- "AdditionalFilesFromOriginal": false,
- "PreserverOriginalDates": false
- }
- }
- ]
- }
Advertisement
Add Comment
Please, Sign In to add comment