[FFmpeg-user] Transform dvdsub to png

Oliver Fromme oliver at fromme.com
Mon Jul 22 13:23:38 EEST 2024


I think FFmpeg cannot do this directly.  In theory you can overlay the
subtitles with a video stream, then decimate, remove black frames and
use the image2 muxer with the PNG codec, but that's a very inefficient
approach.  You will also lose the meta data, e.g. the bounding boxes,
unless you perform some further processing.

Personally I use the BDSup2Sub tool for that task.  It reads subtitle
files in PGS format (Blu-ray) and in VOBSUB format (DVD), and writes
each subtitle frame to a PNG file (it can do lots of other conversions
and modifications, too).  I have a processing framework that calls it
like this:

java -jar BDSup2Sub.jar input.idx output.xml /fps:keep

That commands creates a bunch of files: an XML file (output.xml) that
contains some meta data, and a number of PNG files (output_<NNNN>.png),
one per subtitle frame.

The tool is written in Java, so it should be fairly portable.  I'm
using version 4.0.0 on FreeBSD, but it also works on Linux and Windows.
It has a GUI mode as well as a command line mode (I'm only using the
latter).  Meanwhile there's a newer version (5.1.2) that I haven't
tried, and there's even a version written in C++ (no Java required),
but apparently this is for Windows only, so I haven't tried it either.

I don't have a download link right now, but I'm sure you can find it
with the web search engine of your choice.

Best regards
 -- Oliver


More information about the ffmpeg-user mailing list