Rename only QuickTime videos

Started by Mike55, April 05, 2023, 02:51:15 AM

Previous topic - Next topic

Mike55

Hello,

is there a way to rename only QuickTime videos?
For example, this is a Quicktime video and has the extension mp4:
exiftool -ext mp4 "-FileName<CreateDate" -d "%Y%m%d_%H%M%S.%%e" "2018-09-22 12-31-00.mp4"

However, I want to make sure that only Quicktime videos are renamed and not all MP4 videos.

Thanks a lot.

Phil Harvey

I don't think you understand the question.

Technically, MP4 videos are not QuickTime videos.  MP4 is based on the QuickTime format, but it isn't the same thing.  Actual QuickTime videos have a .MOV extension.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

I went looking for something that could tell the difference and it looks like even ffmpeg considers them to be the same.

I used the command from this SuperUser answer, every MOV and MP4 I threw at it gave the same answer
format_name=mov,mp4,m4a,3gp,3g2,mj2
format_long_name=QuickTime / MOV

Similarly, every Webm and MKV gave the same result. Looking more into this, I find the line "All WebM files are MKV files, but not all MKV files are WebM".  So TIL.

Going further down the rabbit hole, this SuperUser answer says that ffmpeg uses the same muxer/demuxer for MOV/MP4 and you have to look at the MajorBrand tag to tell the difference.

But of course, one of my test files doesn't have MajorBrand tag, even testing with ffprobe.  Just to be complete, this is the ffprobe command I used
ffprobe -loglevel error -show_entries format_tags=major_brand -of default=nw=1 file.mp4
"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

wywh

I have considered .mp4, .m4v and .mov files all as 'QuickTime' files as far as metadata goes (although some apps like Google Photos treat metadata such as pre-1921 'Keys:CreationDate' slightly differently in .mp4 vs .m4v and .mov before 1921-0501-00-00 at least in my location).

AFAIK .mp4 and .m4v are very close cousins, and if some app insists, .m4v can usually simply be renamed as .mp4 because .m4v only has some DRM add-ons. Please correct if I am wrong.

- Matti