gyroflow / gyroflow

Video stabilization using gyroscope data
https://gyroflow.xyz
GNU General Public License v3.0
6.22k stars 264 forks source link

mkv file format not supported #823

Closed siefkenj closed 1 month ago

siefkenj commented 1 month ago

Is there an existing issue for this?

Have you tried the latest build?

Do you have latest GPU drivers installed?

Have you checked the documentation?

Gyroflow version

git head

What operating system are you using?

gentoo x86_64

What GPU are you using?

No response

What happened?

Loading an mkv video, the video appears partially cropped in the player and "Auto sync" fails to work.

image

The same video in an mp4 container works perfectly. Attached is an mp4 and mkv sample (created with AviDemux)

sample_960x540.zip

Relevant log output

No response

AdrianEddy commented 1 month ago

why would you want to use mkv? As far as I know, no camera records in this format, and after transcoding or re-muxing it's very likely to lose the gyro data, so supporting mkv is not very useful in Gyroflow

siefkenj commented 1 month ago

I have video that has no gyro data that I have trimmed and saved as in the mkv format. I could convert everything to mp4 and then apply gyroflow, but it seem like mkv support might not be hard to add.

AdrianEddy commented 1 month ago

You need to load a lens profile to be able to click autosync for optical-only analysis

AdrianEddy commented 1 month ago

@wang-bin looks like this sample mkv file doesn't report duration in mdk, any idea why?

wang-bin commented 1 month ago

@wang-bin looks like this sample mkv file doesn't report duration in mdk, any idea why?

which duration do you read? duration from container is correct

Format: matroska,webm, range: 0 +13346ms, bitrate: 303214, size: 0
Metadata:
  ENCODER: Lavf58.76.100
Streams: 1
 Video:
  stream#0, range: 0 +0ms, frames: 0
  codec: h264 tag: 0 profile: 100 level: 31, yuv420p, bpc:8, bpp:12(8,8,8), channels:(1,1,1), map: 0 1 2 0, bitrate: 0, 960x540, fps: 29.97, bframes: 0
  extra data(55): 01 64 00 1F FF E1 00 24 67 64 00 1F AC 2B 20 1E 02 2F DE 02 20 00 00 7D 20 00 1D 4C 1C 00 00 03 01 55 CC 00 00 0D 59 F8 5D E5 C1 40 01 00 04 68 EB 8F 2C FD F8 F8 00 
  Metadata:
   DURATION: 00:00:13.346000000
AdrianEddy commented 1 month ago

@wang-bin I'm using player->mediaInfo().video[0].duration

wang-bin commented 1 month ago

@wang-bin I'm using player->mediaInfo().video[0].duration

the latest build will read duration from metadata

AdrianEddy commented 1 month ago

thanks, I can confirm it works fine in latest dev build: https://gyroflow.xyz/devbuild/