I am having trouble scaling video from 4k to 1080 while still retaining the video sub titles. These subtitles are PGS based and therefore need to be baked into the output video. In order to scale the video I am using ffmpeg with a filter_complex like so:
'-filter_complex', `[0:v][0:s:randomSubtitleHere]scale=1920:1080[scaled];[scaled][0:s:0]overlay[v]`,
'-map', '[v]', '-map',
`0:a:${movieTitle['audioSelect']}`,
This will give me the video at 1080, but it i still am not seeing the subtitles I have selected.
PGS are image based subtitles.
Use the scale filter:
ffmpeg -i input.mkv -filter_complex "[0:v]scale=1920:1080[vid];[0:s:0]scale=1920:1080[sub];[vid][sub]overlay[v]" -map "[v]" -map 0:a:0 output.mkv
Or add scale2ref filter to automatically scale the subtitles to match the size of the video.
ffmpeg -i input.mkv -filter_complex "[0:v]scale=1920:1080[ref];[0:s:0][ref]scale2ref[sub][vid];[vid][sub]overlay[v]" -map "[v]" -map 0:a:0 output.mkv