My wife and I record a lot of video on our phones. Some of it is just a quick clip of the dogs, but a big part is raw material: long takes that I later cut into a short video for my blog, YouTube or Facebook. Once the edit is done, those raw clips are useless. The problem is that by then they have long been copied to my QNAP NAS.

Every night, the DCIM folder of both phones is synced to the NAS, and from there Immich shows everything in one timeline. That works great for photos, but a single raw clip of ten minutes in 4K is easily 2 to 3 GB. A few busy weekends of filming and the NAS fills up with footage nobody will ever look at again, while Immich generates thumbnails and transcodes for all of it.

I didn’t want to change how we film, and I didn’t want any manual steps either. So I built a small Android app of my own: RawMover. It moves every camera video that is longer than a length I choose out of the synced folder, a few seconds after recording stops. Photos and short clips stay where they are and sync as normal.

In this post I’ll explain the problem, how RawMover works, why Qsync Pro’s folder watching got in the way, and the FolderSync setup that fixed it.

What RawMover does

  • Watches the camera folder (DCIM/Camera) for finished recordings
  • Moves every video longer than a length you choose (default 2 minutes but can be adjusted in the app) to a folder that isn’t synced, by default Movies/Raw
  • Optional second rule: also move videos larger than a size you choose, for short but heavy 4K clips
  • Only touches camera originals (by filename pattern), so edited exports stay where they are
  • Moves instantly, even multi-GB files, because it renames the file on the same storage instead of copying it
  • Shows a notification with what was moved, plus a list of recent moves in the app
  • No internet permission, no tracking, no ads, and no service running all the time
  • Android 11 and newer

The moved clips are still on the phone. The gallery and my video editor can open them as before, and once the edit is done I delete them myself.

Download

The app and its source code are on my GitHub. Always get the latest version from the releases page:

Download RawMover: github.com/rutgerbockholts/RawMover/releases/latest
Source code and README: github.com/rutgerbockholts/RawMover

Every release lists the SHA-256 checksum of the APK, so you can check that you have the original file. For version 1.0.2 that is:


00384FACBEF4CDD7FF99851FD4BF6CF487D180E0704A028E28F95E6859B5EF4A

On Windows you check it in PowerShell, in the folder where you saved the APK:


Get-FileHash ./RawMover-1.0.2.apk -Algorithm SHA256

The app is not on Google Play. It needs the “All files access” permission to move videos that belong to the camera app, and Google only allows that on Play for a small set of app types such as file managers. For an app on my own phones, installing the APK directly is simply easier.

The starting point: Qsync Pro and a full NAS

My setup was simple. On both phones, the QNAP app Qsync Pro had one paired folder: the phone’s DCIM folder to a folder per phone on the NAS, for example photos_videos/rutger/RutgerFlip8-DCIM. The sync was one-way (from the phone to the NAS) with Smart Delete enabled, so deleting something on the phone never removes it from the NAS. Immich reads those folders as an external library.

That’s a solid setup for photos. For raw video it’s a storage leak: everything we film ends up on the NAS within a day, and deleting it from the phone afterwards doesn’t help.

Ideas I dropped

Before writing any code, I looked at simpler options:

  • Record raw footage with a different camera app that saves to another folder. Works, but you have to remember to pick the right app before you start filming. Not going to happen with two people.
  • Move raw clips by hand to an unsynced folder. Same problem: it depends on discipline.
  • A grace period: only sync videos that are older than a week, so there’s time to edit and delete them. It works with some sync apps, but I didn’t want a delay on everything else.
  • A filter in Qsync Pro. Qsync Pro can only exclude files by extension. Raw clips and edited exports are both .mp4, so there’s nothing to filter on. There’s no filter on length, age or filename.

On top of that, QNAP has moved the sync function into Qfile Pro, and Qsync Pro only receives security updates since June 2024. Not a great base to build on.

What I really wanted was this: as soon as a video is saved and it’s longer than x minutes, move it automatically. A watchdog on the camera folder.

How RawMover works

I built RawMover in Android Studio with Kotlin and Jetpack Compose, just like my earlier app InstallWatchdog. A few design choices make it reliable and battery friendly:

  • No service running all the time. RawMover registers a JobScheduler job with a content trigger on Android’s video collection. Android wakes the app when a new video appears in the media index, the same mechanism photo backup apps use. After each run the job re-arms itself.
  • Only finished recordings. It asks the media index for videos in DCIM/Camera that are no longer “pending”, so it never touches a file that is still being written.
  • The length comes from the media index. If Android hasn’t filled it in yet, RawMover reads it from the file itself. If neither works, it simply tries again on the next run.
  • Only camera originals. A filename pattern (regex) matches the names cameras use, such as 20261023_161544.mp4 on Samsung, PXL_... on Pixel and VID_... on many others. Edited exports have different names and are left alone. In the app you can test any filename against the pattern.
  • An instant move. The source and target are on the same storage, so the move is a rename. A 2.5 GB clip moves in a fraction of a second. Afterwards RawMover tells the media index about the change, so the gallery shows the clip in its new place right away.
  • A safety net. Every 3 hours a sweep job checks for anything a missed trigger let through. After a reboot or an app update, both jobs are scheduled again.
  • Only new videos. By default RawMover ignores everything recorded before you installed it. An “Include existing” button lifts that limit.

The settings

Everything fits on one screen:

Setting Default Notes
Move videos longer than 2:00 Slider from 0:30 to 10:00 in 15-second steps, or “Set exact” for anything from 0:05 to 60:00
Also move large videos Off, 500 MB A video is moved when it’s longer than the length OR larger than this size
Watch folder DCIM/Camera The folder your camera writes to
Move to Movies/Raw Must be outside the folder your sync app uploads
Camera filename pattern Samsung, Pixel, VID_ Only matching files are considered, with a built-in tester
Notify after moving On A pop-up with the moved clips, their length and size

Settings take effect on the next run, without a restart. Each phone has its own settings, so my wife and I can use different thresholds.

The first test, and the surprise

I recorded a test clip of 3:51. RawMover moved it to Movies/Raw immediately and the notification popped up. Exactly as planned.

A few minutes later, I found the same clip on the NAS anyway.

My first thought was that Qsync Pro synced more than just DCIM. But the paired folder was set to /storage/emulated/0/DCIM/ only, and the clip was really gone from DCIM/Camera. The answer was in Qsync Pro’s File Update Center. For my test clip it showed one entry: Local File renamed, 16:19:21, Uploaded.

That explained everything:

  1. Samsung’s camera app records into a temporary file and renames it to its final name when you stop recording.
  2. Qsync Pro saw that rename the moment it happened and started uploading right away.
  3. RawMover moved the file about 5 seconds later. But on Android, a file that another app already has open stays readable after it’s moved. So Qsync Pro simply finished its upload.

A classic race condition. I had switched off Qsync Pro’s 24-hour auto sync and replaced it with a Samsung routine that started the app at 02:00 and closed it at 03:00. That didn’t help either: as soon as I opened Qsync Pro during the day, it uploaded the clips I had just made, including screenshots taken seconds earlier.

Qsync Pro watches your folders in real time

QNAP actually documents this behaviour, in a FAQ about Qsync Pro that keeps running even when “WiFi only” or “Charging only” is enabled. In short: as long as the app is running, it monitors the paired folder for changes and records them. The Wi-Fi and charging conditions only delay the upload; they don’t stop the watching. Once the conditions are met, the queued changes are uploaded.

So any sync app that watches the folder will always beat RawMover by a few seconds. Qfile Pro, the successor of Qsync Pro, works the same way, so switching to it wouldn’t solve anything. What I needed was a sync app that only runs on a schedule and doesn’t watch the folder in between.

The solution: FolderSync on a schedule

I ended up with FolderSync. It’s actively maintained, connects to the QNAP over SMB, and its “instant sync” (folder watching) is an optional checkbox. Leave it off and FolderSync only syncs when its schedule says so.

These are my settings:

Setting Value
Account SMB, the NAS IP address, my NAS user, SMB2/3
Local folder /storage/emulated/0/DCIM
Remote folder The same NAS folder Qsync Pro used, so Immich sees no difference
Sync type To remote folder (upload only)
Instant sync (monitor device folder) Off
Sync deletions Off, the same as Qsync’s Smart Delete
Schedule Daily at 02:00
Conditions Home Wi-Fi only (SSID allowlist), while charging

On the QNAP side nothing new was needed. In Control Panel, Network & File Services, Win/Mac/NFS/WebDAV, the Microsoft Networking (SMB) service must be enabled. Under Advanced Options I have the highest SMB version set to SMB 3 and the lowest to SMB 2. The NAS user needs read/write access to the shared folder.

Now the order of events is always the same. During the day, RawMover moves long clips out of DCIM/Camera within seconds. At 02:00, FolderSync uploads what’s left: photos and short clips. There’s nothing watching the folder in between, so there’s no race anymore.

Installing and setting up RawMover

  1. Download RawMover-1.0.2.apk from the releases page and install it. Android will ask you to allow installs from your browser or file manager.
  2. Open the app. The Status card at the top shows what still needs attention, each with a button that takes you to the right setting:
    • All files access: needed to move videos owned by the camera app without a confirmation for each file
    • Notifications: for the summary of moved clips and warnings if something breaks
    • Battery: unrestricted: Samsung in particular delays background work otherwise. Also check Settings, Apps, RawMover, Battery
  3. Record a short clip, then type its filename into Test a filename to check that the pattern matches your camera.
  4. Record a clip longer than your threshold. Within a few seconds it’s in Movies/Raw and the notification appears.
  5. Set up a scheduled sync without folder watching, like the FolderSync setup above. If your current sync app uploads instantly, RawMover can’t win the race.

Things to know

  • Existing videos. By default only videos recorded after installation are moved. With a one-way sync without deletions, older raw clips that were already uploaded stay on the NAS. I deleted those by hand. With a two-way sync, moving them on the phone may also delete them from the server.
  • Long edits. If your editor exports long videos into DCIM/Camera with a camera-style filename, they would be moved too. Check your editor’s export name with the filename tester.
  • Samsung’s “Videos” view. In My Files, Videos is a category view of every video on the phone, so the moved clips appear there as well as in Movies/Raw. They are not duplicates.

Building it yourself

The full source is on GitHub under the MIT license. I build it in Android Studio on Windows with Gradle 8.7, AGP 8.5.2, Kotlin 1.9.24 and JDK 17, the same toolchain as InstallWatchdog. For a signed release build:

  1. Create a keystore once via Build, Generate Signed App Bundle / APK, Create new. Keep the file and its passwords safe: every future update must be signed with the same key.
  2. Copy keystore.properties.example to keystore.properties in the project root. This file is git-ignored, so your passwords never end up on GitHub:

storeFile=D:/Android Studio Keys/rawmover-release.jks
storePassword=your-password
keyAlias=rawmover
keyPassword=your-password
  1. Select the release build variant and choose Build APK(s).
  2. Check the signature with apksigner verify --print-certs and calculate the SHA-256 checksum with Get-FileHash.

One tip if you’re on Windows with a third-party antivirus: my first Gradle sync failed again and again with “Could not move temporary workspace … to immutable location”. Sophos real-time protection was locking Gradle’s cache folders while Gradle tried to rename them. Folder exceptions didn’t help. Pausing real-time protection for the first sync did, and after that the cache was filled and normal builds worked with protection on.

Conclusion

What started as “move long videos out of the way” turned into a small lesson in how sync apps really work. RawMover itself does exactly what I wanted: fully automatic, no extra steps for my wife or me, and the raw footage stays on the phone until I’ve finished editing. The key was realising that Qsync Pro watches the folder in real time, and replacing it with a sync that only runs at night.

Since then, our NAS only receives photos and short clips, and Immich stays clean. If you have the same problem, give RawMover a try. Feedback and issues are welcome on GitHub.

A video of installation and walkthrough:

Youtube: https://www.youtube.com/shorts/4dEITvrxnG0

Facebook: https://www.facebook.com/share/r/1NjgyXa1GL/

Privacy Preference Center