Is it possible to hardcode subs with ffmpeg? By hardcode, I mean overlaying the subtitles as pictures on top of the video, and would be unremovable because they would be a part of the video. I tried to convert the subtitle to .ass and then tried to encode it, but ffmpeg does not do anything, and returns the same file. I used VLC to encode them, but it just embeds them in the video file itself and does not include them as pictured direclty overlayed on the video. My end result should be something like this:
Created fonts.conf, then retried:
Z:\New folder>ffmpeg -i input.wmv -vf "subtitle=sub.srt" output.wmv
ffmpeg version N-69247-g85d7e02 Copyright (c) 2000-2015 the FFmpeg developers
built on Jan 25 2015 02:18:48 with gcc 4.9.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
libavutil 54. 17.100 / 54. 17.100
libavcodec 56. 20.100 / 56. 20.100
libavformat 56. 19.100 / 56. 19.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 8.101 / 5. 8.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, asf, from 'input.wmv':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
encoder : Lavf56.15.101
PRIVATE/TotalBitrate: 628000
WM/VideoHeight : 240
WM/VideoWidth : 320
WM/VideoFrameRate: 0
title : input
Duration: 01:47:53.77, start: 0.000000, bitrate: 656 kb/s
Stream #0:0: Video: wmv2 (WMV2 / 0x32564D57), yuv420p, 320x240, SAR 120:67 DAR 160:67, 25 fps, 25 tbr, 1k tbn, 1k tbc
Stream #0:1: Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, 2 channels, fltp, 128 kb/s
[AVFilterGraph @ 0000000002c5b4a0] No such filter: 'subtitle'
Error opening filters!
I replaced "subtitle=sub.srt"
with subtitle="sub.srt"
and subtitle=sub.srt
and got the same result.
I converted the subtitle to .ass: ffmpeg -i sub.srt sub.ass
Then I used -vf ass=sub.ass
and the video encoded, but without subtitles.
I pasted exactly the same code given by in fonts.conf.
Also, how can I choose fonts? Should I use drawtext?
ffmpeg -i subtitle.srt subtitle.ass
ffmpeg -i input.mp4 -vf ass=subtitle.ass output.mp4