[FFmpeg-user] Overlay PGS subtitles without re-encoding file or losing picture quality?

Ramon Brea ramon.brea001 at gmail.com
Wed Mar 30 03:15:51 EEST 2022


	I’ve been converting my physical movies to m2ts and using mkvtoolnix to convert them to mkv format with the intent of eventually converting them to mp4 for playback on most devices. Thats why I want the mkv or mp4 file to have burn-in/hardcoded subs. The subtitles are PGS or .sup format, which is a picture based format. I’ve been reading the overlay video filter section of the ffmpeg site. I'm trying to overlay (burn-in/hardcode) the pgs subtitles over the video stream without having to re-encode the video file and lose picture quality. Is this possible? Or do you always have to re-encode the file when you overlay pgs subtitles?

If it is possible, how would I write the command line into ffmpeg? I’ve tried

ffmpeg -i "(file.input.mkv)" -filter_complex “[0:v][0:s]overlay" "(file.output.mkv)"

But this command line makes it encode the file and I can see a loss in video quality. If ffmpeg is unable to do it, is there another program that can?




More information about the ffmpeg-user mailing list