want to move videos under imagesize folder name

Started by fuyang, May 14, 2022, 06:15:08 PM

Previous topic - Next topic

fuyang

Hello, I am new here. I am learning the super powerful exiftool.

I tried to re-organized files on a recovered NAS drive. So far I have been successfully re-ordered over 100k JPG photos using model/year/date/photos structure with super powerful exiftool. Now is time to re-organize videos.

I tried to use the following command:
exiftool -r  "-directory<$ImageSize/$CreateDate" -d %Y/%Y-%m-%d  .

But I found it works on photos, video mov, mp4, 3GP, but not on video avi, wmv, mts, mpg, flv, mkv.
I have checked the metadata of the test videos with extension avi, wmv, mpg, flv, mkv. They all have a imagesize value under composite group. But the command above doesn't work on those video files.

I don't see imagesize on mts with exiftool. But imagesize show up in the windows explorer file property.

The question is what is the proper way to move all video files to the folders using this structure imagesize/year/date/videos?

Many thanks!


StarGeek

Quote from: fuyang on May 14, 2022, 06:15:08 PM
But I found it works on photos, video mov, mp4, 3GP, but not on video avi, wmv, mts, mpg, flv, mkv.

This would be FAQ #16.

QuoteI don't see imagesize on mts with exiftool. But imagesize show up in the windows explorer file property.

I'm not sure why this would be, unless the video isn't formatted correctly or has some other error in the streams.  My test mts file (the only one I have, it appears), shows the size.
C:\>exiftool -G1 -a -s Y:\!temp\ccccc\g\testbelow.MTS -*image*
[H264]          ImageWidth                      : 1920
[H264]          ImageHeight                     : 1080
[H264]          ImageStabilization              : On (0x3f)
[Composite]     ImageSize                       : 1920x1080
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

fuyang

Hello StarGeek, thanks for your big help! Now I am able to organize the video files I want using this command:
exiftool -ext "*" -r  "-directory<ImageSize"  .

I used this command in the mts video folder as well. Some video files have imagesize matadata. Some don't. Because all the files I am working on are recovered from erased NAS, I guess some files may not be fully recovered.

exiftool greatly reduced the time I spend to re-organize recovered files.

Thanks again!