RandomEngy / VidCoder

A Blu-ray, DVD and video file transcoder for Windows.
http://vidcoder.net
GNU General Public License v2.0
669 stars 42 forks source link

I want to make a Queue.vjqueue #1252

Closed JaydenFish closed 2 weeks ago

JaydenFish commented 2 weeks ago

Feature details

I have a python script to scan video of my disk, and generate a Queue.vjqueue file, and run vidcoder to compress them. I fill in some fileds just like SourcePath, FinalOutputPath, Width, Height, Length, Quality. But it doesn't work, I import the Queue.vjqueue, it load nothing. I guess those fileds are not enough, some error happens in vidcoder. What should I do? thanks.

RandomEngy commented 2 weeks ago

Can you share an example output of the script? I can help with identifying why it's not being imported correctly.

JaydenFish commented 2 weeks ago
[
  {
    "Job": {
      "SourceType": "File",
      "SourcePath": "D:\\\u65b0\u5efa\u6587\u4ef6\u5939\\[2024-06-16 17-58-14][99_][50\u79cd\u8ba4\u77e5\u504f\u5dee].FLV",
      "Title": 1,
      "Angle": 0,
      "RangeType": "All",
      "ChapterStart": 0,
      "ChapterEnd": 0,
      "SecondsStart": 0,
      "SecondsEnd": 0,
      "FramesStart": 0,
      "FramesEnd": 0,
      "AudioTracks": [
        {
          "TrackNumber": 1
        }
      ],
      "Subtitles": {
        "SourceSubtitles": [],
        "FileSubtitles": []
      },
      "UseDefaultChapterNames": true,
      "PassThroughMetadata": true,
      "FinalOutputPath": "D:\\\u65b0\u5efa\u6587\u4ef6\u5939\\[2024-06-16 17-58-14][99_][50\u79cd\u8ba4\u77e5\u504f\u5dee]_HEVC.FLV",
      "PartOutputPath": "D:\\\u65b0\u5efa\u6587\u4ef6\u5939\\[2024-06-16 17-58-14][99_][50\u79cd\u8ba4\u77e5\u504f\u5dee]part..FLV",
      "InProgressOutputPath": "D:\\\u65b0\u5efa\u6587\u4ef6\u5939\\[2024-06-16 17-58-14][99_][50\u79cd\u8ba4\u77e5\u504f\u5dee].part.hevc.FLV",
      "EncodingProfile": {
        "ContainerName": "av_mkv",
        "PreferredExtension": "Mp4",
        "IncludeChapterMarkers": true,
        "Optimize": false,
        "AlignAVStart": false,
        "IPod5GSupport": false,
        "SizingMode": "Automatic",
        "Width": 906,
        "Height": 1600,
        "CroppingType": "None",
        "CroppingMinimum": 2,
        "CroppingConstrainToOneAxis": false,
        "Cropping": {
          "Top": 0,
          "Bottom": 0,
          "Left": 0,
          "Right": 0
        },
        "Padding": {
          "Top": 0,
          "Bottom": 0,
          "Left": 0,
          "Right": 0,
          "IsZero": true
        },
        "PaddingMode": "None",
        "UseAnamorphic": true,
        "ScalingMode": "DownscaleOnly",
        "PixelAspectX": 0,
        "PixelAspectY": 0,
        "Rotation": "None",
        "FlipHorizontal": false,
        "FlipVertical": false,
        "Detelecine": "off",
        "DeinterlaceType": "Off",
        "DeinterlacePreset": "default",
        "CombDetect": "off",
        "DenoiseType": "Off",
        "ChromaSmoothPreset": "off",
        "SharpenType": "Off",
        "DeblockPreset": "off",
        "ColorspacePreset": "off",
        "Grayscale": false,
        "VideoEncoder": "x265",
        "VideoOptions": "",
        "VideoProfile": "main",
        "VideoPreset": "medium",
        "VideoTunes": [
          "fastdecode"
        ],
        "QsvDecode": false,
        "VideoEncodeRateType": "ConstantQuality",
        "Quality": 21,
        "TargetSize": 700,
        "VideoBitrate": 900,
        "TwoPass": true,
        "TurboFirstPass": true,
        "Framerate": 30,
        "ConstantFramerate": false,
        "AudioEncodings": [
          {
            "InputNumber": 0,
            "Encoder": "av_aac",
            "PassthroughIfPossible": false,
            "EncodeRateType": "Quality",
            "Bitrate": 0,
            "Quality": 7,
            "Compression": -1,
            "Mixdown": "dpl2",
            "SampleRateRaw": 0,
            "Gain": 0,
            "Drc": 0
          }
        ],
        "AudioCopyMask": [],
        "Changing": {},
        "Changed": {},
        "ThrownExceptions": {}
      },
      "Length": 62500
    },
    "ManualOutputPath": false,
    "PresetName": "h265",
    "PickerName": "\u9009\u53d6\u5668 1",
    "VideoSource": {
      "Titles": [
        {
          "AngleCount": 1,
          "AudioList": [
            {
              "TrackNumber": 1,
              "BitRate": 192030,
              "ChannelLayout": 3,
              "Description": "Unknown (AAC LC, 2.0 ch, 192 kbps)",
              "Language": "Unknown",
              "LanguageCode": "und",
              "SampleRate": 44100,
              "Codec": 65536,
              "CodecParam": 86018,
              "CodecName": "aac",
              "LFECount": 0,
              "ChannelLayoutName": "stereo",
              "ChannelCount": 2,
              "Attributes": {
                "AltCommentary": false,
                "Commentary": false,
                "Default": true,
                "Normal": false,
                "Secondary": false,
                "VisuallyImpaired": false
              }
            }
          ],
          "ChapterList": [
            {
              "Duration": {
                "Hours": 2,
                "Minutes": 32,
                "Seconds": 26,
                "Ticks": 823201201
              },
              "Name": ""
            }
          ],
          "Color": {
            "BitDepth": 8,
            "ChromaLocation": 1,
            "ChromaSubsampling": "4:2:0",
            "Format": 0,
            "Matrix": 1,
            "Primary": 1,
            "Range": 1,
            "Transfer": 1
          },
          "Container": "mov,mp4,m4a,3gp,3g2,mj2",
          "Crop": [
            0,
            0,
            0,
            0
          ],
          "LooseCrop": [
            0,
            0,
            0,
            0
          ],
          "Duration": {
            "Hours": 2,
            "Minutes": 32,
            "Seconds": 26,
            "Ticks": 823201201
          },
          "FrameRate": {
            "Den": 900900,
            "Num": 27000000
          },
          "Geometry": {
            "Height": 1080,
            "PAR": {
              "Num": 1,
              "Den": 1
            },
            "Width": 1920
          },
          "Index": 1,
          "InterlaceDetected": false,
          "Name": "[2024-06-16 17-58-14][99_][50\u79cd\u8ba4\u77e5\u504f\u5dee].FLV",
          "Path": "D:\\\u65b0\u5efa\u6587\u4ef6\u5939\\[2024-06-16 17-58-14][99_][50\u79cd\u8ba4\u77e5\u504f\u5dee].FLV",
          "Playlist": -1,
          "SubtitleList": [],
          "Type": 3,
          "VideoCodec": "h264"
        }
      ],
      "FeatureTitle": 0
    },
    "VideoSourceMetadata": {}
  }
]
RandomEngy commented 2 weeks ago

It's the "Length" property: it expects it to be formatted like "Length": "00:04:01.9500000"

You have it as a number. You can export a sample queue and compare the two to see where the differences are.