[FFmpeg-user] Transform dvdsub to png

Thomas Ledoux tledouxfr at gmail.com
Mon Jul 22 00:59:39 EEST 2024


Hi Nicolas,

Thanks a lot for the hint, that allows me to make great progress.
Using an overlay I'm indeed able to extract the subtitles
I use :
ffmpeg -f dvdvideo -title 1 -i dvd.iso -copyts -f lavfi -i
color=size=pal:rate=25:color=black at 0.0,format=rgba -filter_complex
"[0:i:0x20][1:v]overlay[v]" -map "[v]" -f image2 -frame_pts true -c:s png
title_01_fre_32_%d.png

I put the subtitle stream first so that the length of the "video" is driven
by it, and I overlay a black transparent video. I end up having thousands
of images (25 per second, of course) but they are all repetitions and only
changing when the subtitle changes. So I wonder now how to only have as
many images as there are different subtitles. Should I try a decimation ?
This seems a lot of processing...

All the best
  Thomas

Le dim. 21 juil. 2024 à 13:57, Nicolas George <george at nsup.org> a écrit :

> Thomas Ledoux (12024-07-21):
> > Indeed, PNG is not supposed to be used for subtitles. But in this case,
> > subtitles are images
> >
> > so they could be transform in PNG. Am I forgetting a filter to make it
> > react as if it was a video ?
>
> You need to overlay the subtitles on a dummy video.
>
> Regards,
>
> --
>   Nicolas George
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-user mailing list