Possible to change the "Save As" location to be same as source file?

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
Dougmeister
Posts: 9
Joined: Tue Dec 29, 2020 10:38 pm

Possible to change the "Save As" location to be same as source file?

Post by Dougmeister »

Description of problem or question:

Every time I load a file into Handbrake, it defaults back to "C:\Users\<username>\Videos" for the "Save As" (i.e., output) folder.

I know that I can go into:

Tools
Preferences
Output Files
Default Path, Click 'Browse' to set the default location

But that would just set a different "fixed" path.

Is it possible to have Handbrake default to the same folder as the source file?

Steps to reproduce the problem (If Applicable):

N/A


HandBrake version (e.g., 1.0.0):

1.3.3 (2020061300)


Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):

Windows 10 64-bit


HandBrake Activity Log ***required*** (see How-to get an activity log)

Code: Select all

HandBrake 1.3.3 (2020061300)
OS: Microsoft Windows NT 10.0.19041.0
CPU: AMD FX(tm)-6300 Six-Core Processor             
Ram: 24542 MB, 
GPU Information:
  NVIDIA GeForce GT 610 - 23.21.13.9135
Screen: 1920x1080
Temp Dir: C:\Users\Doug\AppData\Local\Temp\
Install Dir: D:\Program Files\HandBrake
Data Dir: C:\Users\Doug\AppData\Roaming\HandBrake

-------------------------------------------


# Starting Encode ...

[08:44:41] base preset: Fast 1080p30
[08:44:41] hb_init: starting libhb thread
[08:44:41] Starting work at: Thu Jan 07 08:44:41 2021
[08:44:41] 1 job(s) to process
[08:44:41] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 160,
        "DRC": 0.0,
        "Encoder": "av_aac",
        "Gain": 0.0,
        "Mixdown": 4,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      "copy:aac",
      "copy:ac3",
      "copy:dtshd",
      "copy:dts",
      "copy:eac3",
      "copy:flac",
      "copy:mp3",
      "copy:truehd"
    ],
    "FallbackEncoder": "ac3"
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      },
      {
        "Name": "Chapter 2"
      },
      {
        "Name": "Chapter 3"
      },
      {
        "Name": "Chapter 4"
      },
      {
        "Name": "Chapter 5"
      },
      {
        "Name": "Chapter 6"
      },
      {
        "Name": "Chapter 7"
      },
      {
        "Name": "Chapter 8"
      },
      {
        "Name": "Chapter 9"
      },
      {
        "Name": "Chapter 10"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": true,
    "File": "C:\\Users\\Doug\\Videos\\S2e07 Monsters-1.m4v",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "av_mp4"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 4,
        "Settings": {
          "mode": "7"
        }
      },
      {
        "ID": 3,
        "Settings": {
          "block-height": "16",
          "block-thresh": "40",
          "block-width": "16",
          "filter-mode": "2",
          "mode": "3",
          "motion-thresh": "1",
          "spatial-metric": "2",
          "spatial-thresh": "1"
        }
      },
      {
        "ID": 12,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "1080",
          "width": "1920"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "2",
          "rate": "27000000/900000"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 10
    },
    "Title": 1,
    "Path": "D:\\Video\\Agent Carter, Season 2\\Edited\\s2e07 Monsters.mkv"
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x264",
    "Level": "4.0",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "fast",
    "Profile": "main",
    "Quality": 22.0,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[08:44:41] CPU:
[08:44:41]  - logical processor count: 6
[08:44:41] Intel Quick Sync Video support: no
[08:44:41] hb_scan: path=D:\Video\Agent Carter, Season 2\Edited\s2e07 Monsters.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image D:\Video\Agent Carter, Season 2\Edited\s2e07 Monsters.mkv
src/libbluray/disc/disc.c:424: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:424: error opening file BDMV\BACKUP\index.bdmv
src/libbluray/bluray.c:2585: nav_get_title_list(D:\Video\Agent Carter, Season 2\Edited\s2e07 Monsters.mkv\) failed
[08:44:41] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.1
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[08:44:41] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'D:\Video\Agent Carter, Season 2\Edited\s2e07 Monsters.mkv':
  Metadata:
    ENCODER         : VideoReDo (Lavf58.29.100)
  Duration: 00:43:00.61, start: 0.200000, bitrate: 26994 kb/s
    Chapter #0:0: start 0.000000, end 287.077229
    Metadata:
      title           : Chapter 1
    Chapter #0:1: start 287.078229, end 763.677973
    Metadata:
      title           : Chapter 2
    Chapter #0:2: start 763.678973, end 1073.987725
    Metadata:
      title           : Chapter 3
    Chapter #0:3: start 1073.988725, end 1248.995752
    Metadata:
      title           : Chapter 4
    Chapter #0:4: start 1248.996752, end 1484.188855
    Metadata:
      title           : Chapter 5
    Chapter #0:5: start 1484.189855, end 1543.247808
    Metadata:
      title           : Chapter 6
    Chapter #0:6: start 1543.248808, end 1934.805329
    Metadata:
      title           : Chapter 7
    Chapter #0:7: start 1934.806329, end 2288.783671
    Metadata:
      title           : Chapter 8
    Chapter #0:8: start 2288.784671, end 2535.655099
    Metadata:
      title           : Chapter 9
    Chapter #0:9: start 2535.656099, end 2574.611651
    Metadata:
      title           : Chapter 10
    Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
    Metadata:
      DURATION        : 00:42:54.772000000
    Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s32p (24 bit) (default)
    Metadata:
      DURATION        : 00:43:00.605000000
    Stream #0:2(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
    Metadata:
      DURATION        : 00:43:00.605000000
[08:44:41] scan: decoding previews for title 1
[08:44:41] scan: audio 0x1: dca, rate=48000Hz, bitrate=1 English (DTS-HD MA) (5.1 ch)
[08:44:41] scan: audio 0x2: dca, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch) (1536 kbps)
[08:44:43] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[08:44:43] scan: supported video decoders: avcodec qsv
[08:44:43] libhb: scan thread found 1 valid title(s)
[08:44:43] Skipping subtitle scan.  No suitable subtitle tracks.
[08:44:43] Starting Task: Encoding Pass
[08:44:43] Skipping crop/scale filter
[08:44:43] job configuration:
[08:44:43]  * source
[08:44:43]    + D:\Video\Agent Carter, Season 2\Edited\s2e07 Monsters.mkv
[08:44:43]    + title 1, chapter(s) 1 to 10
[08:44:43]    + container: matroska,webm
[08:44:43]    + data rate: 26994 kbps
[08:44:43]  * destination
[08:44:43]    + C:\Users\Doug\Videos\S2e07 Monsters-1.m4v
[08:44:43]    + container: MPEG-4 (libavformat)
[08:44:43]      + align initial A/V stream timestamps
[08:44:43]      + chapter markers
[08:44:43]  * video track
[08:44:43]    + decoder: h264
[08:44:43]    + filters
[08:44:43]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[08:44:43]      + Decomb (mode=39)
[08:44:43]      + Framerate Shaper (mode=2:rate=27000000/900000)
[08:44:43]        + frame rate: 23.976 fps -> peak rate limited to 30.000 fps
[08:44:43]    + Output geometry
[08:44:43]      + storage dimensions: 1920 x 1080
[08:44:43]      + pixel aspect ratio: 1 : 1
[08:44:43]      + display dimensions: 1920 x 1080
[08:44:43]    + encoder: H.264 (libx264)
[08:44:43]      + preset:  fast
[08:44:43]      + profile: main
[08:44:43]      + level:   4.0
[08:44:43]      + quality: 22.00 (RF)
[08:44:43]      + color profile: 1-1-1
[08:44:43]  * audio track 1
[08:44:43]    + decoder: English (DTS-HD MA) (5.1 ch) (track 1, id 0x1)
[08:44:43]      + samplerate: 48000 Hz
[08:44:43]    + mixdown: Stereo
[08:44:43]    + dither: none
[08:44:43]    + encoder: AAC (libavcodec)
[08:44:43]      + bitrate: 160 kbps, samplerate: 48000 Hz
[08:44:43] sync: expecting 61872 video frames
[08:44:43] encx264: min-keyint: 24, keyint: 240
[08:44:43] encx264: encoding at constant RF 22.000000
[08:44:43] encx264: unparsed options: level=4.0:ref=2:8x8dct=0:weightp=1:subme=6:vbv-bufsize=25000:vbv-maxrate=20000:rc-lookahead=30
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX XOP FMA3 BMI1
x264 [info]: profile Main, level 4.0, 4:2:0, 8-bit
[08:44:43] sync: first pts video is 0
[08:44:43] sync: "Chapter 1" (1) at frame 1 time 0
[08:44:43] sync: first pts audio 0x1 is 0

# Encode Stopped

[08:44:59] work: average encoding speed for job is 19.748997 fps
[08:44:59] comb detect: heavy 55 | light 87 | uncombed 154 | total 296
[08:45:00] decomb: deinterlaced 55 | blended 87 | unfiltered 145 | total 287
[08:45:00] vfr: 279 frames output, 0 dropped and 0 duped for CFR/PFR
[08:45:00] vfr: lost time: 0 (0 frames)
[08:45:00] vfr: gained time: 0 (0 frames) (0 not accounted for)
[08:45:00] dca-decoder done: 1439 frames, 0 decoder errors
[08:45:00] h264-decoder done: 351 frames, 0 decoder errors
[08:45:00] sync: got 314 frames, 61872 expected
[08:45:00] sync: framerate min 23.976 fps, max 23.976 fps, avg 23.976 fps
x264 [info]: frame I:12    Avg QP:21.24  size:231576
x264 [info]: frame P:85    Avg QP:21.78  size: 36007
x264 [info]: frame B:135   Avg QP:21.09  size: 17213
x264 [info]: consecutive B-frames: 16.7% 12.0% 11.5% 59.8%
x264 [info]: mb I  I16..4: 24.4%  0.0% 75.6%
x264 [info]: mb P  I16..4: 15.0%  0.0% 14.4%  P16..4: 31.7%  5.9%  5.2%  0.0%  0.0%    skip:27.7%
x264 [info]: mb B  I16..4:  8.6%  0.0%  1.9%  B16..8: 14.2%  3.3%  0.2%  direct:17.9%  skip:53.9%  L0:45.8% L1:43.9% BI:10.3%
x264 [info]: coded y,uvDC,uvAC intra: 52.9% 64.4% 20.8% inter: 9.9% 29.7% 0.4%
x264 [info]: i16 v,h,dc,p: 38% 25% 18% 19%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 17% 22%  7%  7%  6%  6%  7%  5%
x264 [info]: i8c dc,h,v,p: 47% 24% 23%  6%
x264 [info]: Weighted P-Frames: Y:4.7% UV:2.4%
x264 [info]: ref P L0: 67.8% 32.2%
x264 [info]: ref B L0: 83.1% 16.9%
x264 [info]: ref B L1: 95.3%  4.7%
x264 [info]: kb/s:6749.00
[08:45:00] mux: track 0, 231 frames, 8156694 bytes, 4935.40 kbps, fifo 256
[08:45:00] mux: track 1, 618 frames, 246523 bytes, 149.16 kbps, fifo 1024
[08:45:00] Finished work at: Thu Jan 07 08:45:00 2021
[08:45:00] libhb: work result = 1

# Encode Completed ...


Woodstock
Veteran User
Posts: 3939
Joined: Tue Aug 27, 2013 6:39 am

Re: Possible to change the "Save As" location to be same as source file?

Post by Woodstock »

Preferences->Output files, there is a macro you can use to write to the source path, {source_path}.

Beware that it can create output file names that will overwrite your source, if you are not careful!
Dougmeister
Posts: 9
Joined: Tue Dec 29, 2020 10:38 pm

Re: Possible to change the "Save As" location to be same as source file?

Post by Dougmeister »

Thank you!

Extra credit: is there a way to append autonumbering or something to delineate the output files from the original source...?
Silent_Strider
Posts: 31
Joined: Tue Dec 17, 2019 9:31 pm

Re: Possible to change the "Save As" location to be same as source file?

Post by Silent_Strider »

Same page in the preferences.

"Filename collision behaviour"
Dougmeister
Posts: 9
Joined: Tue Dec 29, 2020 10:38 pm

Re: Possible to change the "Save As" location to be same as source file?

Post by Dougmeister »

Wow. Don't know how I missed that. Thanks!
Post Reply