ffmpeg video with watermark and subtitle at same time

1

1

Hi I want to add watermark png image to video with hardcode substitle .srt file at same time what changes i should do the to following line

ffmpeg -i input.mkv -threads 0 -c:v libx264 -crf 28 -preset veryslow -vf "movie=watermark.png [watermark]; [in][watermark] overlay=0:0 [out]" output.mp4

Qatarson

Posted 2013-05-29T13:26:33.487

Reputation: 31

Answers

2

ffmpeg -i input.mkv -i watermark.png -c:v libx264 -crf 28 -preset veryslow -filter_complex overlay;subtitles=subtitle.srt output.mp4
  • Use -filter_complex when your filter involves more than one input. This is called a complex filtergraph as opposed to a simple filtergraph.

  • Use of the movie multimedia source filter is not required.

Also see:
Official FFmpeg documentation for overlay video filter
Official FFmpeg documentation for subtitles video filter
FFmpeg Wiki: How to burn subtitles into the video

llogan

Posted 2013-05-29T13:26:33.487

Reputation: 31 929

I get this error when i do this command [Parsed_subtitles_1 @ 000000000437d020] No usable fontconfig configuration file found, using fallback. – Qatarson – 2013-06-04T03:41:55.887

@Qatarson Please update your question with your ffmpeg command and complete ffmpeg console output. – llogan – 2013-06-04T06:08:30.547

ffmpeg -i input.mp4 -i watermark.png -c:v libx264 -crf 28 -preset veryslow -filter_complex overlay;subtitles=subtitle.srt output.mp4 – Qatarson – 2013-06-04T13:27:02.007

here command output – Qatarson – 2013-06-04T13:29:01.030

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2013-03-26 13:27:16 Duration: 00:01:55.64, start: 0.000000, bitrate: 1825 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x544, 1631 kb/s, 23.98 fps, 23.98 tbr, 48k tbn, 47.95 tbc Metadata: handler_name : VideoHandler Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 19 1 kb/s – Qatarson – 2013-06-04T13:30:23.223

Metadata: creation_time : 2013-03-26 13:27:17 handler_name : IsoMedia File Produced by Google, 5-11-2011 Input #1, image2, from 'watermark.png': Duration: 00:00:00.04, start: 0.000000, bitrate: N/A Stream #1:0: Video: png, rgba, 75x63 [SAR 2835:2835 DAR 25:21], 25 tbr, 25 t bn, 25 tbc Fontconfig error: Cannot load default config file [Parsed_subtitles_1 @ 00000000046cfdc0] No usable fontconfig configuration file found, using fallback. Fontconfig error: Cannot load default config file Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_subtitl es_1 – Qatarson – 2013-06-04T13:31:08.257

@Qatarson That's not really readable. Please include your complete ffmpeg command and the complete ffmpeg console output. You can add it to your question and not to the comments. – llogan – 2013-06-04T16:12:58.860