How to use FFMpeg -timestamp syntax

后端 未结 1 1068
孤街浪徒
孤街浪徒 2021-01-01 06:21

\"enter

Hi, All!

     ffMpeg -timstamp 

option works

相关标签:
1条回答
  • 2021-01-01 07:11

    There used to be a drawtext filter.

    ffmpeg -i in.mp4 -vf "drawtext=fontfile=/usr/share/fonts/truetype/DroidSans.ttf: timecode='09\:57\:00\:00': r=25: \
    x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000000@1" -an -y out.mp4
    

    See here: http://ffmpeg.org/trac/ffmpeg/wiki/FilteringGuide

    I believe you can replace the exact time code with a sprintf like syntax.

    ffmpeg -f video4linux2 -i /dev/video0 -s 640x480 -r 30 -vf \
    "drawtext=fontfile=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf: \
    text='\%T': fontcolor=white@0.8: x=7: y=460" -vcodec libx264 -vb 2000k \
    -preset ultrafast -f mp4 output.mp4
    

    See here: http://einar.slaskete.net/2011/09/05/adding-time-stamp-overlay-to-video-stream-using-ffmpeg/

    0 讨论(0)
提交回复
热议问题