Handbrake does not have permission to write to this folder.

HandBrake for Mac support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
tothebin
Posts: 6
Joined: Mon Oct 10, 2022 7:23 pm

Handbrake does not have permission to write to this folder.

Post by tothebin »

Every time I try to select files for a new encode I get the error message "HandBrake does not have permission to write to this folder. To allow HandBrake to write to this folder, click "Allow". Obviously clicking "Allow" lets Handbrake operate properly. But it does this every time I try to select files. I am the only one who uses this computer so I am always logged in with administrator privileges. The drive and all the folders are set to allow everyone "Full Access". I went into System Settings>Privacy & Security>Full Disk Access and HandBrake is turned ON. I just can't figure out what I am missing. I recently upgraded my computer from a 2009 MacPro running High Sierra to a 2023 Mac mini M2 pro running macOS Sonoma 14.5. Never had this issue until then.

I am running HandBrake Version 1.7.3 (2024021100)

I don't see any entries into the Activity Log in regards to this, but here it is anyway:

Code: Select all

HandBrake Activity Log for Session: 2024-06-08T22:03:45Z
Handbrake Version: 1.7.3 (2024021100)
[18:03:45] macgui: Handbrake Version: 1.7.3 (2024021100)
[18:03:45] Compile-time hardening features are enabled
[18:03:45] hb_init: starting libhb thread
[18:04:06] macgui: ScanCore scanning titles with a duration of 10 seconds or more
[18:04:06] CPU: Unknown
[18:04:06]  - logical processor count: 10
[18:04:06] hb_scan: path=/Volumes/2TB Media Main/Media Rips/_Movies/_New MKV Rips/_Cover art/Oats Studios (X) (XXXX_R_Action+Horror+Sci-Fi+Thriller_HD)/Oats Studios Videos/Oats Studios (001) Rakka (2017_R_Action+Horror+Sci-Fi+Thriller_HD).mp4, title_index=0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Volumes/2TB Media Main/Media Rips/_Movies/_New MKV Rips/_Cover art/Oats Studios (X) (XXXX_R_Action+Horror+Sci-Fi+Thriller_HD)/Oats Studios Videos/Oats Studios (001) Rakka (2017_R_Action+Horror+Sci-Fi+Thriller_HD).mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.83.100
  Duration: 00:21:52.90, start: 0.000000, bitrate: 1615 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 1481 kb/s, 24 fps, 24 tbr, 12288 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
[18:04:06] scan: decoding previews for title 1
[18:04:06] scan: audio 0x1: aac, rate=44100Hz, bitrate=127999 English (AAC LC, 2.0 ch, 127 kbps)
[18:04:06] using container PAR 1:1
[18:04:06] scan: 10 previews, 1920x1080, 24.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1, chroma location: left
[18:04:06] libhb: scan thread found 1 valid title(s)
[18:04:06] macgui: ScanCore scan done
[18:05:38] Compile-time hardening features are enabled
[18:05:38] hb_init: starting libhb thread
[18:05:38] macgui: fr.handbrake.HandBrakeXPCService scanning specifically for title: 1
[18:05:38] CPU: Unknown
[18:05:38]  - logical processor count: 10
[18:05:38] hb_scan: path=/Volumes/2TB Media Main/Media Rips/_Movies/_New MKV Rips/_Cover art/Oats Studios (X) (XXXX_R_Action+Horror+Sci-Fi+Thriller_HD)/Oats Studios Videos/Oats Studios (001) Rakka (2017_R_Action+Horror+Sci-Fi+Thriller_HD).mp4, title_index=1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Volumes/2TB Media Main/Media Rips/_Movies/_New MKV Rips/_Cover art/Oats Studios (X) (XXXX_R_Action+Horror+Sci-Fi+Thriller_HD)/Oats Studios Videos/Oats Studios (001) Rakka (2017_R_Action+Horror+Sci-Fi+Thriller_HD).mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.83.100
  Duration: 00:21:52.90, start: 0.000000, bitrate: 1615 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 1481 kb/s, 24 fps, 24 tbr, 12288 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
[18:05:38] scan: decoding previews for title 1
[18:05:38] scan: audio 0x1: aac, rate=44100Hz, bitrate=127999 English (AAC LC, 2.0 ch, 127 kbps)
[18:05:39] using container PAR 1:1
[18:05:39] scan: 10 previews, 1920x1080, 24.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1, chroma location: left
[18:05:39] libhb: scan thread found 1 valid title(s)
[18:05:39] macgui: fr.handbrake.HandBrakeXPCService scan done
[18:05:39] macgui: fr.handbrake.HandBrakeXPCService started encoding Oats Studios (001) Rakka (2017_R_Action+Horror+Sci-Fi+Thriller_HD).mkv
[18:05:39] macgui: fr.handbrake.HandBrakeXPCService with preset Small size, Gain=0, No subs
[18:05:39] Starting work at: Sat Jun  8 18:05:39 2024

[18:05:39] 1 job(s) to process
[18:05:39] Starting Task: Encoding Pass
[18:05:39] work: skipping crop/scale filter
[18:05:39] job configuration:
[18:05:39]  * source
[18:05:39]    + /Volumes/2TB Media Main/Media Rips/_Movies/_New MKV Rips/_Cover art/Oats Studios (X) (XXXX_R_Action+Horror+Sci-Fi+Thriller_HD)/Oats Studios Videos/Oats Studios (001) Rakka (2017_R_Action+Horror+Sci-Fi+Thriller_HD).mp4
[18:05:39]    + title 1, chapter(s) 1 to 1
[18:05:39]    + container: mov,mp4,m4a,3gp,3g2,mj2
[18:05:39]    + data rate: 1615 kbps
[18:05:39]  * destination
[18:05:39]    + /Volumes/2TB Media Main/Media Rips/_Movies/_New MKV Rips/_Cover art/Oats Studios (X) (XXXX_R_Action+Horror+Sci-Fi+Thriller_HD)/Oats Studios Videos/Compressed/Oats Studios (001) Rakka (2017_R_Action+Horror+Sci-Fi+Thriller_HD).mkv
[18:05:39]    + container: Matroska (libavformat)
[18:05:39]  * video track
[18:05:39]    + decoder: h264 8-bit (yuv420p)
[18:05:39]      + bitrate 1481 kbps
[18:05:39]    + filters
[18:05:39]      + 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)
[18:05:39]      + Decomb (mode=39)
[18:05:39]      + Framerate Shaper (mode=0:rate=27000000/1125000)
[18:05:39]        + frame rate: same as source (around 24.000 fps)
[18:05:39]    + Output geometry
[18:05:39]      + storage dimensions: 1920 x 1080
[18:05:39]      + pixel aspect ratio: 1 : 1
[18:05:39]      + display dimensions: 1920 x 1080
[18:05:39]    + encoder: H.264 (libx264)
[18:05:39]      + preset:  medium
[18:05:39]      + profile: main
[18:05:39]      + level:   4.0
[18:05:39]      + quality: 28.00 (RF)
[18:05:39]      + color profile: 1-1-1
[18:05:39]      + chroma location: left
[18:05:39]  * audio track 1
[18:05:39]    + decoder: English (AAC LC, 2.0 ch, 127 kbps) (track 1, id 0x1)
[18:05:39]      + bitrate: 127 kbps, samplerate: 44100 Hz
[18:05:39]    + mixdown: Stereo
[18:05:39]    + encoder: AAC (Apple AudioToolbox)
[18:05:39]      + bitrate: 160 kbps, samplerate: 44100 Hz
[18:05:39]  * audio track 2
[18:05:39]    + decoder: English (AAC LC, 2.0 ch, 127 kbps) (track 1, id 0x1)
[18:05:39]      + bitrate: 127 kbps, samplerate: 44100 Hz
[18:05:39]    + AAC Passthru
[18:05:39] sync: expecting 31509 video frames
[18:05:39] encx264: min-keyint: 24, keyint: 240
[18:05:39] encx264: encoding at constant RF 28.000000
[18:05:39] encx264: unparsed options: level=4.0:8x8dct=0:vbv-bufsize=25000:vbv-maxrate=20000
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: ARMv8 NEON
x264 [info]: profile Main, level 4.0, 4:2:0, 8-bit
[18:05:39] sync: first pts video is 0
[18:05:39] sync: Chapter 1 at frame 1 time 0
[18:05:39] sync: first pts audio 0x1 is 0
[18:05:39] sync: first pts audio 0x1 is 0
[18:09:54] reader: done. 1 scr changes
[18:09:54] work: average encoding speed for job is 123.174026 fps
[18:09:54] comb detect: heavy 14 | light 94 | uncombed 31400 | total 31508
[18:09:54] decomb: deinterlaced 14 | blended 94 | unfiltered 31400 | total 31508
[18:09:54] vfr: 31508 frames output, 0 dropped
[18:09:54] vfr: lost time: 0 (0 frames)
[18:09:54] vfr: gained time: 0 (0 frames) (0 not accounted for)
[18:09:54] aac-decoder done: 56542 frames, 0 decoder errors
[18:09:54] aac-decoder done: 56542 frames, 0 decoder errors
[18:09:54] h264-decoder done: 31508 frames, 0 decoder errors
[18:09:54] sync: got 31508 frames, 31509 expected
[18:09:54] sync: framerate min 24.000 fps, max 24.000 fps, avg 24.000 fps
x264 [info]: frame I:437   Avg QP:20.50  size: 43309
x264 [info]: frame P:12455 Avg QP:22.85  size: 11365
x264 [info]: frame B:18616 Avg QP:23.65  size:  3145
x264 [info]: consecutive B-frames:  8.8% 23.5% 41.6% 26.2%
x264 [info]: mb I  I16..4: 68.5%  0.0% 31.5%
x264 [info]: mb P  I16..4: 20.8%  0.0%  2.3%  P16..4: 27.1%  2.7%  0.8%  0.0%  0.0%    skip:46.2%
x264 [info]: mb B  I16..4:  1.4%  0.0%  0.1%  B16..8: 21.3%  0.8%  0.1%  direct: 0.9%  skip:75.4%  L0:38.2% L1:60.8% BI: 1.0%
x264 [info]: coded y,uvDC,uvAC intra: 9.1% 23.2% 0.3% inter: 1.6% 3.4% 0.0%
x264 [info]: i16 v,h,dc,p: 47% 25% 13% 15%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 21% 28%  6%  7%  5%  6%  4%  4%
x264 [info]: i8c dc,h,v,p: 68% 16% 14%  1%
x264 [info]: Weighted P-Frames: Y:2.5% UV:1.2%
x264 [info]: ref P L0: 68.5% 13.5% 12.5%  5.3%  0.1%
x264 [info]: ref B L0: 87.3% 11.0%  1.7%
x264 [info]: ref B L1: 99.1%  0.9%
x264 [info]: kb/s:1334.73
[18:09:54] mux: track 0, 31508 frames, 219019323 bytes, 1334.51 kbps, fifo 4096
[18:09:54] mux: track 1, 56545 frames, 26972575 bytes, 164.35 kbps, fifo 8192
[18:09:54] mux: track 2, 56542 frames, 21006442 bytes, 127.99 kbps, fifo 8192
[18:09:54] Finished work at: Sat Jun  8 18:09:54 2024

[18:09:54] libhb: work result = 0

User avatar
Ritsuka
HandBrake Team
Posts: 1690
Joined: Fri Jan 12, 2007 11:29 am

Re: Handbrake does not have permission to write to this folder.

Post by Ritsuka »

It's asking because you selected the "Same as destination as source" in the preferences.
HandBrake is sandboxed, and tries to keep as few permission as possible. Full Disk Access won't help.
tothebin
Posts: 6
Joined: Mon Oct 10, 2022 7:23 pm

Re: Handbrake does not have permission to write to this folder.

Post by tothebin »

Ah, thank you very much. I knew I was missing something. This still seems a little off to me. Not just because it didn't used to do this with High Sierra. What's the point of having a selection to use the same folder if you have to "Allow" it every time?

I actually write to a subfolder named "Compressed", but have to select the files before telling it where to write. Maybe HandBrake shouldn't test the write path until after the user chooses one? I kept "Use same folder as source when possible" so that it would start me in the correct parent folder and I would only have to browse down to the Compressed folder. Without that I have to browse out of whichever folder I was in for the last encode, then over to the new folder. This led me to an interesting experiment.

In HandBrake settings:
I kept "Use same folder as source when possible".
Under "Automatically name output files" I added "/Compressed/" in front of [Source][Title].

It still asks me to "Allow", but clicking that is quicker than navigating to the correct subfolder. If the "Compressed" folder exists it writes to it, if not it doesn't write but doesn't give an error message either. But even though the output name is different than the input name, it still adds a "1" in front of ".mkv"

This would be a great way for me to automatically write to the compressed folder if it weren't for the added "1". It might still be faster for me to do it this way and remove the "1" than to do it any other way, maybe I'll just add an Automator script to the folder that removes the "1".

Thanks again for your help. In the long run this will probably speed up my process a little...
User avatar
Ritsuka
HandBrake Team
Posts: 1690
Joined: Fri Jan 12, 2007 11:29 am

Re: Handbrake does not have permission to write to this folder.

Post by Ritsuka »

The point is that HandBrake is sandboxed, and can read and write only to the folders you manually open or select using the open and save panels, or dragged over. Without manually clicking "allow", HandBrake wouldn't be able to write to the folder.

It adds "1" because you set it add the Title number to the file name

"Automatically name output files" is not meant to work like that, it's not a path, it's meant just the name of the file. I guess it works by mistake
tothebin
Posts: 6
Joined: Mon Oct 10, 2022 7:23 pm

Re: Handbrake does not have permission to write to this folder.

Post by tothebin »

I'm old and sometimes not as bright as I'd like to be...
In the few minutes I took to experiment it didn't occur to me to remove [Title]. I took a chance with adding the Compressed path to the filename. I thought it probably wouldn't work, was relatively certain it wouldn't create the folder, but decided it was worth a try. To my happy surprise it works! This is going to be so much faster for me now. Select the source file, select "Allow", and I'm good to go. I don't need to change the output folder each time.

I think I mostly understand how sandboxing works, but this still seems off to me. To be clear, I'm not running HandBrake from the command line. I am manually selecting the folder from the open panel, as you said, but still getting the error dialog. It never did this before (older computer, older OS, older Handbrake). Does this mean that they way it is supposed to work now is that I click on the "Open Source" button in the GUI, select the file/folder in the dialog box, click "Open" then click "Allow" in the next dialog box that opens? That still seems like an extra step that shouldn't be there.
User avatar
Ritsuka
HandBrake Team
Posts: 1690
Joined: Fri Jan 12, 2007 11:29 am

Re: Handbrake does not have permission to write to this folder.

Post by Ritsuka »

If you select a single file in the open panel, HandBrake can only read and write that file, it can't write to the enclosing folder, so it will ask you to allow writing the the enclosing folder. This happens only if you have "Use the same destination as source" option selected.
Probably before you didn't have this option enabled, it was introduced recently.

I think it can be improved to avoid asking when a folder is selected instead of a file.
tothebin
Posts: 6
Joined: Mon Oct 10, 2022 7:23 pm

Re: Handbrake does not have permission to write to this folder.

Post by tothebin »

I really appreciate the time and effort you have given to try to explain this to me. I'm trying not to be a whining pain in the @#$, but it's hard for me to understand that this is the way macOS works with sandboxed applications. Yes, I probably didn't have that option enabled in my previous version of HandBrake. But if this is how sandboxing works now, I can't understand why there is not a single app on my computer that acts this way except HandBrake. I have other muxing apps, Automator scripts, programs I've written in BASIC (then compiled in C++), Photoshop, and endless other apps. Some required special permission the first time I ran them, but not one of them requires permission every time except HandBrake. If this really is the way HandBrake is supposed to work, I can live with that. The insight I gained from you will actually allow me to process my files more easily now, with the compressed files automatically going to a subfolder. But I can't get rid of that little voice in my head saying there is more to this than what I am seeing. Maybe I need to go to a shrink instead. Thanks again for your help.
User avatar
Ritsuka
HandBrake Team
Posts: 1690
Joined: Fri Jan 12, 2007 11:29 am

Re: Handbrake does not have permission to write to this folder.

Post by Ritsuka »

Most Mac app outside the App Store are not sandboxed, so they don't have these limitations. But then again they can write and read almost everything on your disk, which it's not always an advantage.
Post Reply