ynput / ayon-frontend

Codebase of AYON server web interface
Apache License 2.0
15 stars 14 forks source link

Viewer: Use video's timecode metadata as start frame instead of starting at zero #610

Open BigRoy opened 1 month ago

BigRoy commented 1 month ago

Story

As an artist and producer it would be nice if the current frame indicator in the viewer would represent the frame number as in the video file, so that if the frame is 1001 within the shot that it lists 1001 instead of assuming all videos start at 0.

Problems

With the wrong frame indicator people may be mentioning the wrong timecode or frame for certain reviews (especially if a video file may be lacking burnins)

Proposal

Find the right start timecode for the video from its metadata. FFMPEG can e.g. encode video files with the -timecode argument.

Maybe, if the video has no timecode metadata we could have it start at the current context's start frame, e.g. the representation, or version, or task/folder/project start frame metadata. (Question then becomes, should it include or exclude handles?) so maybe such a fallback is a bad idea.

Attachments

image

BigRoy commented 1 month ago

keep in mind that timecode is stored at different places depending on the container.... https://github.com/nebulabroadcast/nebula-worker/blob/develop/nebula/mediaprobe.py#L77