lossless-cut icon indicating copy to clipboard operation
lossless-cut copied to clipboard

Support timecodes

Open mifi opened this issue 4 years ago • 8 comments

Timecode can be embedded in a file.

Possible features

  • [x] Set custom time offset automatically to the read timecode when loading a file
  • [x] View timecode in a file (stream info for video stream)
  • [x] Edit timecode in a file (stream tag editor for video stream)

Separate stream

For example in GoPros

Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
Metadata:
  creation_time   : 2016-03-22T20:29:00.000000Z
  handler_name    : GoPro TCD
  timecode        : 00:36:32:10

Other example:

Stream #0:2(und): Data: none (rtmd / 0x646D7472), 736 kb/s (default)
Metadata:
  creation_time   : 2019-10-15T12:06:02.000000Z
  handler_name    : Timed Metadata Media Handler
  timecode        : 00:13:17:24

Inside video stream

See example files from this site

ffprobe -v error -show_frames -of json tc_25fps_01min.m2v | grep timecode

"side_data_type": "GOP timecode",
"timecode": "00:00:00:00"
"side_data_type": "GOP timecode",
"timecode": "00:00:00:10"
...

Separate audio track

Timecodes can also be a separate audio track with a special LTC encoded sound. See libltc

mifi avatar Nov 18 '20 19:11 mifi

I'm trying to ingest a bunch of GoPro video, which has a built in timecode. When I trim the video, it still shows the same starting timecode, even though the start of the clip has changed. Am I doing something wrong, or is this still a WIP?

Timvrakas avatar Apr 21 '22 21:04 Timvrakas

probably a shortcoming in ffmpeg. you could try with ffmpeg v5 and see if it's fixed

mifi avatar May 09 '22 18:05 mifi

It looks like ffmpeg definitely does the wrong thing here (tested with 5.0), but it might be worth considering calculating the appropriate timecode for a given cut and adjusting it automatically when calling ffmpeg to do its thing. It would be a -very- useful feature.

alinsavix avatar Aug 23 '22 21:08 alinsavix

I wonder if ffmpeg ignores timecode when cutting only for some files or all files

mifi avatar Sep 29 '22 11:09 mifi