Personal Photos and Videos

Any questions? Need some help?
Post Reply
carloslozada
Posts: 14
Joined: 12 Jun 2016, 11:06

Personal Photos and Videos

Post by carloslozada »

Hi Guys,
I would like to know how could I Rename, Identify Duplicated files (Remove them) and Separate the Photos from the Video Files.
I have been using the following command so far in Windows and Mac

Code: Select all

H:\Plex\Photos\Carlos\{camera.model}\{dt.format('yyyy')}\{dt.format('MM')}\{dt.format('dd-MM-yyyy HH∶mm∶ss')}
Thanks for your help :)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Personal Photos and Videos

Post by rednoah »

1.
Depends on how you define "duplicate" but since duplicates are the same, your format will yield the same destination path, and so that'll automatically get rid of duplicates, cause they'll either get skipped or override previously processed copies.


2.
You can separate video files from photo files by adding a condition such as this:

Code: Select all

{f.video ? 'Videos' : 'Photos'}
:idea: Please read the FAQ and How to Request Help.
carloslozada
Posts: 14
Joined: 12 Jun 2016, 11:06

Re: Personal Photos and Videos

Post by carloslozada »

@rednoah Thanks for your prompt reply, I have tried the code but only works separating the photos but not the videos and also remain some photos left behind in the original folder which aren't duplicates and doesn't contains the camera details as I can see on the file properties but it does contain the date so either put these into the dated folder by year.

Code: Select all

H:\Plex\test\Carlos\{f.video ? 'Videos' : 'Photos'}\{camera.model}\{dt.format('yyyy')}\{dt.format('MM')}\{dt.format('dd-MM-yyyy HH∶mm∶ss')}
what I got as a result is something like

[Photos]/[2018]/[01]/01-02-2018 05:50:02.jpg
[Photos]/[NIKON D90]/[2015]/[01]/01-02-2015 05:50:02.jpg

Left Behind

[Original folder]/2013-01-14-17.18.53.jpg
[Original folder]/2013-01-14-17.19.53.png
[Original folder]/2013-01-14-17.20.53.mp4
[Original folder]/2013-01-14-17.21.53.MOV
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Personal Photos and Videos

Post by rednoah »

f.video is based on file extension, so it'll always work. However, {camera} and {dt} probably might not work as you might expect since mp4 / mov / etc files don't have exif metadata. So you format will like like yield an invalid destination path for those files.

You'll probably have to rethink and rewrite your format if you want to deal with photos and videos in the same batch. The information you seek might be available for video files via MediaInfo somehow, but not sure, depends on the application that wrote the file:
viewtopic.php?f=5&t=4285
:idea: Please read the FAQ and How to Request Help.
carloslozada
Posts: 14
Joined: 12 Jun 2016, 11:06

Re: Personal Photos and Videos

Post by carloslozada »

Didn't quite understood your answer @rednoah
when you say "it'll always works" isn't true for me as you can see still leaving all the videos and other images as jpeg and png behind in the original folder...
Even though I have read your posted topic above and check everything seems to be correct and the files have the metadata and file extension associated correctly.

I have also checked the filter toggle and managed to filter the main folder into all the types of Media - then send these folders to the renamer and apply the pattern.
Now this still not create the /videos/... folder as expected and recommended in the above code above.

Could you please help me out better on how to? or if you can pin point me the whole functions allowed to use for my case so I can play around with?.

Kind regards,
Carlos
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Personal Photos and Videos

Post by rednoah »

:idea: Please post screenshots. The process of creating a screenshot that illustrates the problem, usually also allows you to understand the problem. ;)


If you apply this format to a video file, then {camera} and {dt} like yield no result:

Code: Select all

H:\Plex\test\Carlos\{f.video ? 'Videos' : 'Photos'}\{camera.model}\{dt.format('yyyy')}\{dt.format('MM')}\{dt.format('dd-MM-yyyy HH∶mm∶ss')}
Now {f.video ? 'Videos' : 'Photos'} always works, but that just means you end up with destination paths such as this in your New Names list:

Code: Select all

H:\Plex\test\Carlos\Videos\
Now what's supposed to happen at this point? You'll either end up with a file called Videos H:\Plex\test\Carlos\Videos OR if that folder already exists, then nothing happens. Neither is what you want.

carloslozada wrote: 25 Sep 2018, 14:03 Could you please help me out better on how to? or if you can pin point me the whole functions allowed to use for my case so I can play around with?.
Now what can we do instead? I don't know. In my previous post I've linked the Media Inspector so you can have a look at a given video file, to see if it contains any video metadata is available, that you can use instead of exif information, i.e. The Media Inspector will show you all possible functions / properties that you can use and play with. Maybe there is no solution. Maybe there is a compromise. It really depends on your exact situation and use case, which nobody knows except you, especially if you don't share any screenshots. ;)


The easiest solution would be to just process the files differently, videos go into the video folder and keep their original file name, and photos are organized in the photos folder according to exif information:

Code: Select all

H:/Plex/{f.video ? "Videos/${fn}" : "Photos/${camera.model}/${dt.format('yyyy/MM/dd-MM-yyyy HH∶mm∶ss')}"}
:idea: Please read the FAQ and How to Request Help.
Post Reply