I am using following command to add watermark on a video file:
ffmpeg -i input.mpg2 -vf "drawtext=text='Hello World':x=(w-text_w)/2:y=(h-text_h)/2:fontsize=24:fontcolor=white" TextOutput.mpg2
Error with mpg2 input file:
Input #0, mpeg, from 'mpg2.mpg2':
Duration: 00:02:27.07, start:0.213367, bitrate: 4419 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, bt470bg/bt470m/bt4 70m, bottom first), 704x480 [SAR 1:1 DAR 22:15],
29.97 fps, 29.97 tbr, 90k tbn,59.94 tbc
Side data:
cpb: bitrate max/min/avg: 6000000/0/0 buffer size: 1835008 vbv_delay: N/A
Stream #0:1[0x1c0]: Audio: mp2, 44100 Hz, stereo, s16p, 224 kb/s [NULL @ 000000bd67d2b3c0] Unable to find a suitable output format for
'Output.mp g2'
Output.mpg2: Invalid argument
Similar error occurs with mss, lxf and 3g2 video files.
How can I add watermark to these video file formats?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…