How do i get ffprobe to parse 'TAG: timecode' into ffmpeg 'drawtext' command? (Bash Terminal)

-1

I have a .mov file that contains original source timecode metadata but i can't figure out a way to get ffmpeg to burn the original timecode into the picture.

If i open the original file in QuickTime Player we can see it displays the true timecode on the far left: Original TC

I can also see that ffprobe is able to see the metadata when i run the following:

Command:

ffprobe -i test.mov -show_streams

Abbreviated Result:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 537199360
    compatible_brands: qt  
    creation_time   : 2018-11-05T14:20:51.000000Z
    timecode        : 09:59:53:00
  Duration: 00:16:37.64, start: 0.000000, bitrate: 1680 kb/s

So i can see that ffprobe is able to determine the start timecode of the file in its metadata results. The question is how to i pass that information into an ffmpeg command so that the timecode seen by ffprobe is what gets used when i convert the file for timecode burn-in?

An example of a standard burnt in timecode command would be this:

ffmpeg -i test.mov -vcodec libx264 -cmp 22 -vf "drawtext=fontfile=DroidSansMono.ttf: timecode='09:59:53:00': r=25: x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000099" -y test_bitc.mov

The only problem there though is that i've had to manually put the timecode in myself. I want the command to use the existing timecode metadata as the timecode input value so the same command can be used on multiple files.

Does anyone know how to do this?

xcode
bash
ffmpeg
terminal
ffprobe
asked on Stack Overflow Nov 6, 2018 by Myles • edited Nov 7, 2018 by Myles

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0