olive icon indicating copy to clipboard operation
olive copied to clipboard

[CODEC] LTC support

Open sobotka opened this issue 5 years ago • 10 comments

It doesn’t appear that Olive’s master supports LTC? Timecode support across frames for use with including reading and writing metadata, LTC, burn in, etc.

sobotka avatar Mar 13 '19 13:03 sobotka

https://github.com/x42/libltc good choice?

alcomposer avatar Mar 13 '19 14:03 alcomposer

That seems the only choice, and indeed appears to work.

sobotka avatar Mar 15 '19 03:03 sobotka

#629 is only one aspect of this request, setting the timecode of clip from metadata already present in clip.

I interpreted this request as being for LTC as outlined here: https://en.wikipedia.org/wiki/Linear_timecode

Timecode embedded in the audio track of a media file can allow cameras that are not able to receive timecode input to be synced together: https://www.cinema5d.com/get-your-multi-camera-dslr-or-mirrorless-shoots-in-sync-with-ltc-convert/

It would be fantastic, even for my workflow, to send each camera a timecode audio signal, and allow Olive to easily translate that into a start timecode of each media clip. This would allow clips to sync together without having to resort to brute-force audio waveform sync. (I also would like that as well, but its just another way to sync clips).

For cameras that are unable to be synced - (they don't have a Timecode in port) there will be a miss-match between embedded LTC & metadata timecode. So Olive will also need a toggle (probably in clip settings) which timecode to use: Metadata or LTC.

I don't have access to ENG cameras, but I believe that they do embed LTC in either an audio stream- or a burst of timecode in the main audio stream.

For the record I fully understand that Timecode sync is not genlock, and the frames of such multi-camera setups will not be matched. However in reality this is only an issue for Stereo 3D, and to a lesser extent live vision mixing (given the ability for many switchers to compensate for frame timing mismatch).

alcomposer avatar Mar 15 '19 04:03 alcomposer

Timecode is Timecode, and supporting is supporting.

sobotka avatar Mar 15 '19 04:03 sobotka

What I am working on currently is not LTC timecode, but metadata timecode. Hence why I made a different request just for that.

alcomposer avatar Mar 15 '19 04:03 alcomposer

Timecode is timecode. Referencing it as data is part of it. Is it a stamp? What does the stamp represent? Is it an audio stream of synced timecode? What does the timecode represent? It’s all part of that umbrella because ultimately it binds to a frame.

sobotka avatar Mar 15 '19 04:03 sobotka

There are many NLE's that don't support LTC embedded in audio stream, yet support metadata timecode.

Otherwise this software would not exist: https://www.videotoolshed.com/product/ltc-convert-auxtc/

And yes, I think both solutions should be supported by Olive. The user should be able to decide which timecode to use.

I closed #629, lets use this first request for any future updates, including timecode metadata.

Aspects to this FR:

  • Read LTC audio timecode & metadata timecode in imported media
  • Write metadata timecode to exported media (allow user to choose custom timecode start- or use selected region timecode)
  • Display correct timecode in media viewer (currently media viewer shows 0 timecode start)
  • Allow user to select media viewer timecode display (start at 0 or start at media timecode)
  • Allow user to choose between using metadata timecode / LTC embedded audio timecode for clip (useful for clip sync in future)

@sobotka please add any more detail if I have missed something out

alcomposer avatar Mar 15 '19 04:03 alcomposer

@x42 Are you aware of any ENG/Cinema/Consumer cameras that record LTC audio? Either as full audio track or a bust of timecode for the first frame? (I am not sure the latter exists- but I have seen it mentioned)

My limited personal camera research shows that all the below cameras record metadata as timecode tag on various streams (GH5 & XT3 All streams). The Sony A7Riii looks like it has a data stream that not only has a timecode tag, but also has data inside (204 kb/s).

Sony A7Riii

    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc), 1920x1080 [SAR 1:1 DAR 16:9], 15408 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2019-03-03T04:51:19.000000Z
      handler_name    : Video Media Handler
      encoder         : AVC Coding
    Stream #0:1(und): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, 2 channels, s16, 1536 kb/s (default)
    Metadata:
      creation_time   : 2019-03-03T04:51:19.000000Z
      handler_name    : Sound Media Handler
    Stream #0:2(und): Data: none (rtmd / 0x646D7472), 204 kb/s (default)
    Metadata:
      creation_time   : 2019-03-03T04:51:19.000000Z
      handler_name    : Timed Metadata Media Handler
      timecode        : 08:57:23:01

Fuji XT3

    Stream #0:0(eng): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(pc, smpte170m/bt709/smpte170m), 3840x2160, 407605 kb/s, 25 fps, 25 tbr, 25k tbn, 25 tbc (default)
    Metadata:
      creation_time   : 2019-03-04T22:50:04.000000Z
      timecode        : 02:39:13:00
    Stream #0:1(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, 2 channels, s32 (24 bit), 2304 kb/s (default)
    Metadata:
      creation_time   : 2019-03-04T22:50:04.000000Z
      timecode        : 02:39:13:00
    Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    Metadata:
      creation_time   : 2019-03-04T22:50:04.000000Z
      timecode        : 02:39:13:00

Panasonic GH5

    Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661), yuv422p10le(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 100284 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2019-02-23T14:45:49.000000Z
      timecode        : 02:23:23:13
    Stream #0:1(und): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, 2 channels, s16, 1536 kb/s (default)
    Metadata:
      creation_time   : 2019-02-23T14:45:49.000000Z
      timecode        : 02:23:23:13
    Stream #0:2(und): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    Metadata:
      creation_time   : 2019-02-23T14:45:49.000000Z
      timecode        : 02:23:23:13

alcomposer avatar Mar 20 '19 01:03 alcomposer

I'm a git noob... should I start a new feature request or may I clarify/augment this one?

What those manufacturers call timecode isn't timecode (as defined by eg, Wikipedia) and aren't even less SMPTE LTC, as mentioned above by alcomposer. Those are really timestamps , but that doesn't negate their usefulness: what would be great (and I wonder why it's not in every LNE) is this timeline action:

Align Clip Using Metadata Timestamp

This is far simpler to implement than linking to Robin Gareus's libltc excellent library. So, in short: the acronym LTC should be dropped from this Feature Request: they're two different beasts.

Oups... Rereading this thread I realized I want to reopen Set timecode of clip from metadata only #629 Why has it been closed? Haven't FRs less chance to be implemented if we put them in the same bag? As I said, I'm a complete stranger to CVS communities... sorry to add some noise.

lutzray avatar Jun 18 '21 17:06 lutzray

@x42 Are you aware of any ENG/Cinema/Consumer cameras that record LTC audio?

I've worked with footage from various ARRI cameras in the past that provided LTC (as do most RED). One usually syncs the cameras twice a day with a TC source and drift is negligible, but neither are consumer devices.

With some pro-sumer device I've used an audio-cable from a LTC source to the camera. Fine with a stationary camera, but most camera operators would probably be annoyed.

x42 avatar Jun 18 '21 18:06 x42