Showing posts with label Shotcut. Show all posts
Showing posts with label Shotcut. Show all posts

Sort Photos & Videos by Capture Date and Time for Editing

How to Sort Hundreds of Photos and Videos by Capture Date for Shotcut Editing

If you've ever come back from a trip with a phone full of photos and a drone full of clips, you know the problem: everything is mixed together, file names don't match the order things happened, and Windows "Date modified" is often wrong. This guide walks through a real example — sorting hundreds of files from a folder called Alicante julio 2026 — into a clean, chronological set ready to drop into Shotcut. You'll see two ways to do it: a safe copy into a new folder, and a rename in place that uses no extra disk space.

Why "Date Modified" Isn't Enough

Windows Explorer's "Date modified" timestamp reflects when the file was last written to disk, not necessarily when the photo or video was actually captured. This becomes a real problem when you're combining footage from different devices — for example, DJI drone videos and smartphone photos — because copying, syncing, or transferring files can change that timestamp. The result is a sort order that looks chronological but isn't. For a trip video where the sequence of events matters, this small discrepancy can throw off the whole story.

The more reliable approach is to read the actual capture date/time embedded in the file's metadata (EXIF data for photos, creation metadata for videos) rather than relying on the file system's modified date.

Which Option Should You Choose?

Both options use the same naming pattern and the same file types. The difference is what happens to your original files and how much disk space you need.

  • Option A – Copy to a new SORTED folder: the safest choice, because your originals are never touched. The trade-off is that every photo and video is duplicated, so you need as much free space as the whole folder takes. With large drone and 4K clips, that can be many gigabytes.
  • Option B – Rename in place: no new folder and no duplicates, so it takes no extra disk space. The trade-off is that the original file names are replaced, so the script saves a log file that lets you trace every old name.

If you have limited disk space or very large video files, Option B is the better fit.

Option A: Copy Into a New SORTED Folder

This PowerShell script copies your files into a new folder, renamed and sorted by timestamp. It never touches your original files — it only creates copies.

Here's what the script does:

  • 📷 Includes JPG, JPEG, PNG, and HEIC photos
  • 🎥 Includes MP4, MOV, AVI, M4V, MTS, and M2TS videos
  • 🕐 Sorts everything by timestamp
  • 🔢 Renames copies sequentially, e.g. 0001_20260710_101523.jpg
  • 📁 Places all copies in a new SORTED subfolder
  • ✅ Leaves your original files completely untouched
  • ⚠️ Uses extra disk space equal to the size of all copied files

Step 1: Open PowerShell

Press the Windows key, type PowerShell, and open Windows PowerShell.


Step 2: Copy and paste this command

Enter your folder address. This is an example: C:\Users\Videos\Alicante julio 2026
$src="C:\Users\Videos\Alicante julio 2026"; $dst="$src\SORTED"; New-Item -ItemType Directory -Force -Path $dst | Out-Null; Get-ChildItem $src -File | Where-Object {$_.Extension -match '\.(jpg|jpeg|png|heic|mp4|mov|avi|m4v|mts|m2ts)$'} | Sort-Object LastWriteTime | ForEach-Object -Begin {$i=1} -Process {$ext=$_.Extension.ToLower(); $name="{0:D4}_{1:yyyyMMdd_HHmmss}{2}" -f $i,$_.LastWriteTime,$ext; Copy-Item $_.FullName (Join-Path $dst $name); $i++}

Step 3: Check the result

The script creates a new folder:

C:\Users\Videos\Alicante julio 2026\SORTED

Inside, you'll find your photos and videos copied and renamed in order, like this:

0001_20260710_101523.jpg
0002_20260710_101601.mp4
0003_20260710_101745.jpg
0004_20260710_102012.mp4

Once you've confirmed everything is correct in SORTED folder, then you can use it. At last you can decided to delete either the SORTED folder or your originals to free up the duplicated space — but only after checking the result.

Option B: Rename in Place (No Extra Disk Space)

If you don't want duplicates, rename the files directly in the same folder. Renaming only changes the name written in the file system — the photo or video data is not copied or moved — so it uses no additional space, and each file keeps its original "Date modified" value.

A simple one-pass rename can fail when a new name already exists in the folder (for example after a previous partial run, or if the script stopped halfway). To avoid this, this version renames in two passes: first every file gets a unique temporary name, then each file gets its final name. Name clashes become impossible.

Here's what this version does:

  • 📷🎥 Handles the same photo and video formats as Option A
  • 🕐 Sorts everything by timestamp (and by name when two files have the same timestamp), then renames in that order
  • 🔢 Uses the same naming pattern, e.g. 0001_20260710_101523.jpg
  • 🔁 Renames in two passes (temporary names first), so it never fails because of duplicate names
  • 💾 Creates no new folder and no copies, so there is no extra disk usage
  • 🧾 Saves a log file (rename_log_DATE_TIME.csv) with every old and new name, written before any file is renamed
  • 🧪 Offers a preview mode that shows the old and new names in a table without changing anything

Step 1: Preview first (recommended)

Open PowerShell and run this preview. It only prints a table of old and new names and changes nothing. If PowerShell warns you about pasting multiple lines, choose Paste anyway — that's a normal Windows prompt.

$src = "C:\Users\Videos\Alicante julio 2026"
$files = @(Get-ChildItem -LiteralPath $src -File |
  Where-Object { $_.Extension -match '^\.(jpg|jpeg|png|heic|mp4|mov|avi|m4v|mts|m2ts)$' } |
  Sort-Object LastWriteTime, Name)
$i = 1
$map = foreach ($f in $files) {
  [pscustomobject]@{
    Path = $f.FullName
    Old  = $f.Name
    Tmp  = "tmp_" + [guid]::NewGuid().ToString("N") + $f.Extension.ToLower()
    New  = "{0:D4}_{1:yyyyMMdd_HHmmss}{2}" -f $i, $f.LastWriteTime, $f.Extension.ToLower()
  }
  $i++
}
$map | Select-Object Old, New | Format-Table -AutoSize

Step 2: Run the real rename

If the new names look right, run this version. It saves the log first, then renames every file to a temporary name, then to its final name.

$src = "C:\Users\Videos\Alicante julio 2026"
$files = @(Get-ChildItem -LiteralPath $src -File |
  Where-Object { $_.Extension -match '^\.(jpg|jpeg|png|heic|mp4|mov|avi|m4v|mts|m2ts)$' } |
  Sort-Object LastWriteTime, Name)
$i = 1
$map = foreach ($f in $files) {
  [pscustomobject]@{
    Path = $f.FullName
    Old  = $f.Name
    Tmp  = "tmp_" + [guid]::NewGuid().ToString("N") + $f.Extension.ToLower()
    New  = "{0:D4}_{1:yyyyMMdd_HHmmss}{2}" -f $i, $f.LastWriteTime, $f.Extension.ToLower()
  }
  $i++
}
$stamp = Get-Date -Format yyyyMMdd_HHmmss
$map | Select-Object Old, New | Export-Csv "$src\rename_log_$stamp.csv" -NoTypeInformation -Encoding UTF8
foreach ($m in $map) { Rename-Item -LiteralPath $m.Path -NewName $m.Tmp }
foreach ($m in $map) { Rename-Item -LiteralPath (Join-Path $src $m.Tmp) -NewName $m.New }

Step 3: Check the result

Open the folder in Explorer. Your photos and videos are still in the same place, now numbered in chronological order:

0001_20260710_101523.jpg
0002_20260710_101601.mp4
0003_20260710_101745.jpg
0004_20260710_102012.mp4
rename_log_20261025_183012.csv

Important notes for Option B

  • Safe to repeat, but keep the first log. Because of the two-pass method, running it again no longer causes duplicate-name errors. Each run creates a new log file, and only the first log contains your true original names, so don't delete it.
  • If the script stops halfway, some files may be left with a tmp_ name. Just run the script again: those files are included and get their final names. The log from the first run still has the original names.
  • Renaming cannot be undone automatically. Keep the first rename_log_...csv if you may need the original names later.
  • Files with the same timestamp (for example, burst photos) are ordered by their file name, so the result is always consistent.
  • Already ran Option A by mistake? Check that your originals are still in the main folder, delete the SORTED folder, and empty the Recycle Bin if you deleted it from Explorer — the space isn't freed until then. Then use Option B.
  • Not sure? Back up the folder to an external drive first, or use Option A.

Generate the Command for Your Own Folder

Paste your folder path below, choose the option you want, and the tool builds the PowerShell command for you.

Paste a folder path above to generate the command...

A More Accurate Option: Reading Real Capture Metadata

The scripts above sort by file timestamp, which works well for most single-device situations. But if your files came from multiple sources — a DJI drone, a phone, maybe a separate camera — and you need the exact capture time down to the second, a more advanced version reads the embedded metadata directly instead of relying on the file system. This is the recommended approach when timestamps must be perfectly accurate across mixed devices.

Getting the Sorted Files Into Shotcut

Once your files are sorted (in the SORTED folder for Option A, or in the original folder for Option B), the next question is how to bring hundreds of ordered files into Shotcut without losing that order. A few notes on this:

  • Shotcut's Open File button (top-left) is designed for opening media files, but selecting hundreds of files at once through this dialog can scramble the order you worked hard to create.
  • Instead, for large batches, use View → Playlist to open the Playlist panel, then add your sorted files there. Because they're already numbered sequentially, they'll load in the correct order.
  • From the Playlist, you can then drag the files onto the Timeline in that same order, ready for editing.

Quick Recap

  1. Choose your method: Option A copies files into a new SORTED folder (safest, but needs extra disk space); Option B renames files in place (no duplicates, no extra space).
  2. For Option B, run the -WhatIf preview first, then the real rename once, and keep rename_log.csv as a record of the original names.
  3. Open Shotcut and use View → Playlist rather than Open File for large batches.
  4. Add the sorted files to the Playlist, then drag them to the Timeline in order.

With this workflow, a folder of hundreds of mixed photos and videos becomes a clean, chronological sequence ready for editing — no manual renaming, no guesswork about what happened first, and, if you choose Option B, no duplicate files eating up your disk.

Watch the Final Result

Here's the finished video, edited from the sorted footage described above:

Shotcut can repair video file

 Shotcut is primarily a free and open-source video editing software, and it is not designed specifically for repairing damaged or corrupted video files. 

If you have a video file that is corrupted or not playing correctly, Shotcut may not have built-in features for repairing such files.

For repairing video files, you might want to consider using specialized video repair tools. 

These tools are specifically designed to analyze and fix issues in video files, such as corruption, missing headers, or other types of damage. Some popular video repair tools include:

Understanding Pitch Compensation in Shotcut

Understanding Pitch Compensation in Shotcut: Maintaining Natural Audio When Slowing Down Videos

In Shotcut, when you use the "Speed" filter to slow down a video, there is an option called "Pitch Compensation." 

The pitch of a sound is related to its frequency, and when you slow down or speed up a video, the audio pitch may also be affected. 

Pitch compensation is a feature that attempts to maintain the original pitch of the audio while adjusting the speed of the video.

Here's a breakdown of what pitch compensation means:

Sort Order Issue Troubleshooting of Shotcut Video Editing Software


It sounds like you're experiencing an issue with the way files are being sorted within the Shotcut video editing software. 

Shotcut itself may not directly control the sorting order of files within a folder; instead, it typically relies on the file system's sorting order. 

However, there are a few things you can try to address this issue:

1. Change File Explorer/Finder Sorting:

Difference between stabilise and 360 stabilise in Shotcut


In Shotcut, the terms "Stabilize" and "360 Stabilize" refer to different types of video stabilization features designed for specific use cases:

Stabilize:

The "Stabilize" feature in Shotcut is designed for traditional, non-360-degree videos. 

How to insert an audio file in Shotcut



Insert Audio in Shotcut

Shotcut is a free and open-source video editing software. 

To insert another audio file into a video using Shotcut, you can follow these general steps:

Open Shotcut:

Video Stabilization Tutorial: A Step-by-Step Guide to Using Shotcut

Shotcut does have a video stabilization feature. 

Here's how to stabilize a video using Shotcut:

1. Download and install Shotcut on your computer if you haven't already.

How to Rotate Clip in Shotcut

Shotcut is a free and open-source video editing software that allows you to rotate clips easily. 

Here's how you can rotate a clip in Shotcut:

test

Book & Save: Tiqets Kiwi GetYourGuide Amazon
Advertisement
AI Advisor — Ask me anything
Stays active all session
Hi! Ask me about travel, immigration, Spain, India, or any topic on Latestfoto.com. I find posts, affiliate deals, and follow-up questions for you.
Best places in Spain? Cheap flights Madrid US immigration 2026 India travel guide Free tours Europe
✨ Free AI Skin Analysis! Try Now →

✈️ Flight Deals

Error fares & cheap flights — updated daily

Loading flight deals…

Flight

facebook

Featured Post

GKS Write — Guía completa

📖 Guía del usuario · Versión 1.2.3 GKS Write — Guía completa Todo lo que necesitas para gestionar referencias, escribir manuscritos con...

Last 30 days' visitors

AI Advisor
AI Advisor ❌

Look what is published:

Try Desktop
Purchase from

chat

Ask a Question

Enhance Your Success with Increased Visitor Engagement!
Ready to leave your mark? Partner with us and witness your business flourish!

7 Days-Popular Articles


How to Find Articles Relevant to Your Interest.

Top Internet Search Topics.

Join Our Writing Community!

🚀✍️ Embrace your passion for words and turn your free time into an exciting writing adventure & earning! Collaborate with us and elevate your writing game. 🌟

🚀✍️ Explore the world of guest writing and enjoy the added bonus of a backlink to your blog. Let's create captivating content together! 🌟

Scan QR code. Buy me a coffee.

Enjoying This Website?

Give Us Your Vote!

Follow Us on Facebook

Follow Us on Facebook

Follow Us Now!

Buy & Sell Your Video

Have an interesting video? Earn money by sharing it with us.

Learn a Language for Travel, PR, or Citizenship

Offer Your Own Language
-------------------------
See More. Do More. Share More.
Join Our Newsletter

Get exclusive discounts & travel tips straight to your inbox.

Please type this word to confirm you're human:

© Latestfoto.com — Questions. Curiosity. Discoveries.