-1

我想要与此匹配的 FFmpeg cli 设置(这是手刹预设)

在此处输入图像描述

这是预设文件,我不明白这些对ffmpeg是什么。

{
    "AlignAVStart": false,
    "AudioCopyMask": [
      "copy:aac",
      "copy:ac3",
      "copy:dtshd",
      "copy:dts",
      "copy:mp3",
      "copy:truehd",
      "copy:flac",
      "copy:eac3"
    ],
    "AudioEncoderFallback": "ac3",
    "AudioLanguageList": [],
    "AudioList": [
      {
        "AudioBitrate": 160,
        "AudioCompressionLevel": 0.0,
        "AudioDitherMethod": null,
        "AudioEncoder": "av_aac",
        "AudioMixdown": "stereo",
        "AudioNormalizeMixLevel": false,
        "AudioSamplerate": "auto",
        "AudioTrackQualityEnable": false,
        "AudioTrackQuality": -1.0,
        "AudioTrackGainSlider": 0.0,
        "AudioTrackDRCSlider": 0.0
      },
      {
        "AudioBitrate": 640,
        "AudioCompressionLevel": 0.0,
        "AudioDitherMethod": null,
        "AudioEncoder": "copy:ac3",
        "AudioMixdown": "none",
        "AudioNormalizeMixLevel": false,
        "AudioSamplerate": "auto",
        "AudioTrackQualityEnable": false,
        "AudioTrackQuality": -1.0,
        "AudioTrackGainSlider": 0.0,
        "AudioTrackDRCSlider": 0.0
      }
    ],
    "AudioSecondaryEncoderMode": true,
    "AudioTrackSelectionBehavior": "first",
    "ChapterMarkers": true,
    "ChildrenArray": [],
    "Default": false,
    "FileFormat": "av_mp4",
    "Folder": false,
    "FolderOpen": false,
    "Mp4HttpOptimize": false,
    "Mp4iPodCompatible": false,
    "PictureAutoCrop": true,
    "PictureBottomCrop": 0,
    "PictureLeftCrop": 0,
    "PictureRightCrop": 0,
    "PictureTopCrop": 0,
    "PictureDARWidth": 0,
    "PictureDeblockPreset": "off",
    "PictureDeblockTune": "medium",
    "PictureDeblockCustom": "strength=strong:thresh=20:blocksize=8",
    "PictureDeinterlaceFilter": "decomb",
    "PictureCombDetectPreset": "default",
    "PictureCombDetectCustom": "",
    "PictureDeinterlacePreset": "default",
    "PictureDeinterlaceCustom": "",
    "PictureDenoiseCustom": "",
    "PictureDenoiseFilter": "off",
    "PictureDenoisePreset": "light",
    "PictureDenoiseTune": "none",
    "PictureSharpenCustom": "",
    "PictureSharpenFilter": "off",
    "PictureSharpenPreset": "medium",
    "PictureSharpenTune": "none",
    "PictureDetelecine": "off",
    "PictureDetelecineCustom": "",
    "PictureItuPAR": false,
    "PictureKeepRatio": true,
    "PictureLooseCrop": false,
    "PictureModulus": 2,
    "PicturePAR": "auto",
    "PicturePARWidth": 0,
    "PicturePARHeight": 0,
    "PictureRotate": null,
    "PictureWidth": 1280,
    "PictureHeight": 720,
    "PictureForceHeight": 0,
    "PictureForceWidth": 0,
    "PresetDescription": "H.264 video (up to 720p30), AAC stereo audio, and Dolby Digital (AC-3) surround audio, in an MP4 container. Compatible with Apple iPhone 4, 4S, and later; iPod touch 4th, 5th Generation and later; iPad 1st Generation, iPad 2, and later; Apple TV 2nd Generation and later.",
    "PresetName": "Apple 720p30 Surround",
    "Type": 0,
    "UsesPictureFilters": true,
    "UsesPictureSettings": 1,
    "SubtitleAddCC": false,
    "SubtitleAddForeignAudioSearch": true,
    "SubtitleAddForeignAudioSubtitle": false,
    "SubtitleBurnBehavior": "foreign",
    "SubtitleBurnBDSub": false,
    "SubtitleBurnDVDSub": false,
    "SubtitleLanguageList": [],
    "SubtitleTrackSelectionBehavior": "none",
    "VideoAvgBitrate": 3000,
    "VideoColorMatrixCode": 0,
    "VideoEncoder": "x264",
    "VideoFramerate": "30",
    "VideoFramerateMode": "pfr",
    "VideoGrayScale": false,
    "VideoScaler": "swscale",
    "VideoPreset": "medium",
    "VideoTune": "",
    "VideoProfile": "high",
    "VideoLevel": "3.1",
    "VideoOptionExtra": "",
    "VideoQualityType": 2,
    "VideoQualitySlider": 21.0,
    "VideoQSVDecode": false,
    "VideoQSVAsyncDepth": 4,
    "VideoTwoPass": true,
    "VideoTurboTwoPass": false,
    "x264Option": null,
    "x264UseAdvancedOptions": false
  },
4

1 回答 1

1
ffmpeg -i input.mp4 -c:v libx264 -crf 21 -preset medium -vf scale=-2:720 -r 30 -c:a aac -ac 2 output.mp4
选项 它能做什么
-c:v libx264 选择视频编码器libx264输出 H.264 视频
-crf 21 选择品质
-preset medium 选择 x264 编码预设
-vf scale=-2:720 使用缩放过滤器使视频高 720 像素,自动缩放宽度以匹配纵横比
-r 30 将帧速率设置为 30 fps
-c:a aac 选择音频编码器aac输出 AAC 音频
-ac 2 输出立体声音频

更多信息:

于 2020-12-10T17:39:47.710 回答