deckerst / aves

Aves is a gallery and metadata explorer app, built for Android with Flutter.
BSD 3-Clause "New" or "Revised" License
2.7k stars 103 forks source link

Add a new type for slow motion videos #585

Closed xmha97 closed 4 months ago

xmha97 commented 1 year ago

Hi, how I can filter for slow motion videos?

Screenshot_2023-04-14-08-32-38-141_deckers.thibault.aves.jpg

deckerst commented 1 year ago

What is a slow motion video? Does it have some specific metadata? Please share a sample.

xmha97 commented 1 year ago

What is a slow motion video? Does it have some specific metadata? Please share a sample.

I think slow motion videos are 120 FPS without any specific metadata:

Screenshot_2023-04-14-10-11-41-976_deckers.thibault.aves.jpg

A sample taken on Xiaomi 11T: https://www.dropbox.com/s/63v39ducoszxwxo/VID_20230414_031236_HSR_120.mp4?dl=1

deckerst commented 1 year ago

Thanks for the sample. I see that this video has a flag among the metadata: com.xiaomi.slow_moment

I also see some mcvr metadata, but i don't know whether it's related to the slow motion. Even if it is, the content seems proprietary and unreadable.

So, with this, i could identify slow motion files from Xiaomi, but I don't know the way other manufacturers do it.

xmha97 commented 1 year ago

Thanks for your review, I'll try to check other devices to see if we can find a solution.

xmha97 commented 1 year ago

Tests on Samsung S21 FE

Samsung Pro Video FHD 120FPS https://www.dropbox.com/s/5si70c6n6p0j1i6/Samsung%20Pro%20Video%20FHD%20120FPS.mp4?dl=1

Samsung Super Slow Motion 960FPS https://www.dropbox.com/s/ngxseqytiqmpgos/Samsung%20Super%20Slow%20Motion%20960FPS.mp4?dl=1

Samsung Slow Motion 240FPS https://www.dropbox.com/s/5knz7cjzrtbeame/Samsung%20Slow%20Motion%20240FPS.mp4?dl=1

xmha97 commented 1 year ago

Xiaomi Gallery

IMG_20230414_184050_929.jpg

Google Photos

IMG_20230414_184048_708.jpg

deckerst commented 1 year ago
Video Capture FPS Stream FPS Google Photos Xiaomi Gallery Samsung Gallery Samsung Video Player
Samsung Pro Video FHD 120FPS 120 120.019 slow-mo id / editable slow-mo id normal n/a
Samsung Super Slow Motion 960FPS none 30.0 normal normal slow-mo id slow-mo editable
Samsung Slow Motion 240FPS 240 29.884 slow-mo id / editable normal slow-mo id n/a
Xiaomi Slow Motion 120FPS 120 119.346 slow-mo id / editable slow-mo id normal n/a
deckerst commented 1 year ago

Apparently there's no standard, different manufacturers have different interpretations, and I don't see any characteristic metadata (besides com.xiaomi.slow_moment). The capture rate could be used, though:

Honestly I don't know whether it's worth it, because that kind of special videos are features quickly developed and quickly forgotten by manufacturers. Also, even if I add the identification, I'm unlikely to allow playback tuning as requested in #583 because the current video engine used by Aves is not so performant/convenient.

xmha97 commented 1 year ago

Hi Thibault Thank you for your explanation and time on this issue.

I downloaded some slow-motion videos from several Telegram groups. (Modified versions of Google Camera are discussed in these groups)

These videos are displayed in Google Photos as slow-motion videos: https://www.dropbox.com/s/bknq94b3a6w998f/Fan.mp4?dl=1 https://www.dropbox.com/s/s3uobuunrw8j1sx/Flower.mp4?dl=1 https://www.dropbox.com/s/yuy4gi7abohmg6h/Train.mp4?dl=1

This video is displayed in the Xiaomi gallery as a slow-motion video: https://www.dropbox.com/s/enxtv2pag7yybuo/PowerStrip.mp4?dl=1

I hope the following conclusions are correct:

Xiaomi only checks the frame rate tag, on my brother's Samsung phone, I took a 120 fps video (which was not slow motion) but Xiaomi displayed it as a slow motion video! I downloaded a 120 fps video (which I think does not have any special metadata) and saw that Xiaomi also recognized it as a slow-motion video! https://archive.org/download/4-k-120fps/%E9%9B%AA%E5%9C%B0%204K%40120fps.mp4

image

Please don't follow Xiaomi's method to detect slow-motion videos, although I use Xiaomi devices.

I think the standard of Google and Samsung is the same because Samsung's slow-motion videos are displayed in Google Photos as a slow-motion videos.

Not so in the case of Xiaomi, Xiaomi's slow-motion videos are not recognized as slow-motion videos in Google Photos.

I looked at the tags of the videos and noticed an issue. The videos taken by the Xiaomi camera, only have the frame rate tag.

image

But in the videos that are saved by Google Camera and Samsung Camera, in addition to the frame rate tag, there is also the real frame rate tag.

image

I think the detection is done through these two tags, although on the computer I am not able to make a video whose frame rate tag is different from the real frame rate tag and I can't understand the detection method.

(Sorry for my bad English)

deckerst commented 1 year ago

Thanks for digging into this.

You're right, this real frame rate could be a good indicator to identify slow-motion videos. Unfortunately, I don't know yet how I can read it (or derive it). In the table above, I wrote the capture frame rate and stream frame rate, which already show some differences. But it's not exact science, as you can see the capture rate is missing for the super slow-mo 960FPS Samsung video.

xmha97 commented 1 year ago

Unfortunately, I don't know yet how I can read it (or derive it).

It is possible through Exiftool, although I know it is not useful for you: image

But it's not an exact science, as you can see the capture rate is missing for the super slow-mo 960FPS Samsung video.

Samsung's Super Slow Motion saves the video as a normal video and nowhere is it identified as a specific video.

Also this video is an edited video (by the Samsung Camera app automatically), The beginning and the end are the normal video and only the middle is slow motion video.

Please do not consider Samsung's Super Slow Motion.

xmha97 commented 1 year ago

Do not pay attention to this part, maybe it will be useful in the future:

Time Lapse

Xiaomi Camera

com.xiaomi.fast_moment : 1

Google Camera

SpecialTypeID : com.google.android.apps.camera.gallery.specialtype.SpecialType-TIMELAPSE

Samsung Camera

N/A

image

deckerst commented 1 year ago

Did you send me a sample for the Google Camera timelapse video? You talk about it but I can't find it among my samples.