naiixeel / xavc_rtmd2srt

Extract real time meta-data and GPS tracks from Sony XAVC video

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XAVC S video real-time meta-data parser and GPS data extractor

Extract realtime meta-data (i.e. per-frame) from Sony XAVC video and render to srt subtitle file.

Extract GPS data (if video shot on GPS or Bluetooth-link enabled Sony camera) and extract to GPX file.

New! Extract raw per-frame gyro/accelerometer data from video clips recorded with DSC-RX100M7 and DSC-RX0M2 cameras

alt text

Besides of non-realtime metadata which MediaInfo or Exiftool can see, Sony cameras record many other real-time meta-data for every frame such as it's ISO, F number, shutter speed, AE mode and even focus distance in special Acquisition Meta-data section.

Looks like this feature partially inherited by XAVC S from professional Sony XAVC codec and MXF container.

This tool tries to extract this meta-data from XAVC S (MP4) file and create SRT subtitle file near the video file. When opened in VLC or whatever, it can be viewed and you can see the settings of camera for every frame of video in real time.

alt text

If video file has embedded GPS data (for example, Sony Action Cam record with built-in GPS or ILCE/RX with Bluetooth GPS link option used) you can extract GPS track to GPX. You may use it with GPS visualization apps/services to see your travel or with dashboard-overlay video editors to have nice gauges in your videos.

Meta-data supported:

  • ISO (N/A for most of camcorders and older ILCE/RX cameras)
  • Gain (dB)
  • Aperture value (F-number)
  • Shutter speed
  • Focusing distance: at what distance lens focused (for ILCE models, FDR-AX700; N/A for DSC-RX models)
  • Focusing mode (Manual, Autofocus)
  • Exposure mode (Auto/A/S/M)
  • Capture Gamma / ColorSpace (looks like it is fixed on first frame; meta-data not changed if Picture Profile changed on camera during recording)
  • recording date and time in YYYY/MM/DD HH/MM/SS format as it is set in camera settings (output disabled yet)
  • timecode (N/A for models w/o timecode fieature; output not implemented yet)
  • GPS coords, timestamp, elevation, DOP, GPSFix, [speed, heading] (if available)
  • raw gyro/accelerometer sensors data recorded into videos by new Sony Camera models (DSC-RX100M7 & DSC-RX0M2) to separate tables

Meta-data not supported (as no any existing consumer camera models record it):

  • lens focal length, zoom position
  • detailed autofocus method (spot/zone/multi e.t.c.)
  • white balance value in Kelvin (probably this tag recorded in RAW-cabable video/cinema cameras, e.g. CineAlta)
  • sensor readout mode and parameters (x,y resolution, dynamic range)
  • built-in camera/lens color/ND filters value
  • gamma curve/knee formulas/coefficients (as these are also important for very pro video/cinema cameras)

Windows x64 executable available (see zip file in files list). Usage: as any console app, accepts 1 required argument (full video file path or just file name if in the same folder) Example: rtmd2srt.exe D:\Video\C0035.MP4

Optional arguments:

  • -sidecar - extract embedded XML non-realtime metadata (similar to XML sidecar recorded by camera)
  • -muxmkv - create new MKV file with embedded subtitles stream with meta-data (requires ffmpeg.exe to be in same folder)
  • -gpx - extract per-frame GPS meta-data and export to GPX file (track: latitude, longtitude, timestamp, speed, DOP, gps_fix(2d/3d), course)
  • -check - display basic file check info. Camera model, fps, framecount, if GPS meta-data embedded
  • NEW! -sens - extract raw gyro/accelerometer data from videos recorded with new sony camera models (DSC-RX100M7 & DSC-RX0M2)

Note: Works well with Sony ILCE-9/7RM3/7M3, DSC-RX10M4, FDR-AX700, ILCE-6000, ILCE-5100 videos. GPS export works well with DashWare editor

Written in: Python 3.7 Required modules:

  • gpxpy (please replace the gpxpy file from original gpxpy package with included one)
  • bitstring
  • argparse

Reference: EBU - Tech 3349 EBU Acquisition Technical Metadata Set

Appendix (pg.70) of Sony CineAlta F65 manual

About

Extract real time meta-data and GPS tracks from Sony XAVC video


Languages

Language:Python 100.0%