Skip to content

Commit

Permalink
- [!] ffcvt enable parallel execution
Browse files Browse the repository at this point in the history
  • Loading branch information
suntong committed Dec 19, 2022
1 parent 83c4038 commit 2be7c55
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions ffcvt.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ const _encodedExt = "_.mkv"
// Global variables definitions

var (
version = "1.8.0"
date = "2022-02-12"
version = "1.8.1"
date = "2022-12-18"

encodedExt string = _encodedExt
totalOrg int64 = 1
Expand Down Expand Up @@ -130,7 +130,6 @@ cut_ok:
getDefault()
//fmt.Fprintf(os.Stderr, "Defaults: '%+v'\n", Defaults)


encodedExt = Opts.Ext
// Sanity check
if Opts.WDirectory != "" {
Expand Down Expand Up @@ -209,8 +208,8 @@ func appendVideo(fname string) {
if strings.Index(Opts.Exts, fext) < 0 {
// None-video files, dup to dest, hardlink 1st else copy
if Opts.WDirectory != "" {
src := Opts.Directory+ "/" + fname
dst := Opts.WDirectory+ "/" + fname
src := Opts.Directory + "/" + fname
dst := Opts.WDirectory + "/" + fname
err := linkFile(src, dst)
if err != nil {
copyFile(src, dst)
Expand Down Expand Up @@ -273,6 +272,12 @@ func transcodeVideos(startTime time.Time) {
videosTotal := len(videos)
for i, inputName := range videos {
videoNdx := i + 1

if Opts.NoClobber && fileExist(getOutputName(inputName)) {
debug("Encoded file exist for: "+inputName, 1)
continue
}

fmt.Printf("\n== Transcoding [%d/%d]: '%s'\n under %s\n",
videoNdx, videosTotal, filepath.Base(inputName), filepath.Dir(inputName))
transcodeFile(inputName)
Expand Down

0 comments on commit 2be7c55

Please sign in to comment.