Skip to content

Commit

Permalink
TrackHash: speed up hashing
Browse files Browse the repository at this point in the history
  • Loading branch information
kojirou1994 committed Oct 23, 2023
1 parent 9cde7e3 commit b2163c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/choco-cli/Commands/TrackHash.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ struct TrackHash: ParsableCommand {
@Option(help: "Tool selection: \(Tool.allCases.map(\.rawValue)).")
var tool: Tool = .ffmpeg

@Option(help: "ffmpeg hash algorithm")
var hash: String = "murmur3"

@Flag(help: "Decode every video frames.")
var slowVideo: Bool = false

Expand Down Expand Up @@ -127,6 +130,7 @@ struct TrackHash: ParsableCommand {
}
outputOptions.append(.codec("copy", streamSpecifier: .streamType(.subtitle)))
outputOptions.append(.format("streamhash"))
outputOptions.append(.avOption(name: "hash", value: hash, streamSpecifier: nil))

var inputOptions: [FFmpeg.InputOutputOption] = []
ffmpegOptions?.split(separator: ",").forEach { inputOptions.append(.raw(String($0))) }
Expand Down

0 comments on commit b2163c2

Please sign in to comment.