[FFmpeg-devel] {WIP} {HELP} Dvb Subtitles and Hard Subtitles

JULIAN GARDNER joolzg at btinternet.com
Mon Jun 6 12:15:32 CEST 2011




>________________________________
>From: JULIAN GARDNER <joolzg at btinternet.com>
>To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
>Sent: Sunday, 5 June 2011, 14:58
>Subject: [FFmpeg-devel] {WIP} {HELP} Dvb Subtitles and Hard Subtitles
>
>Ok needing a bit of help here, ive added my current diff in the hope of some help from a more knowledgable ffmpeg developer.
>
>My problem is that i need to get the main output loop to eventually call the do_subtitle_out for every frame of video that is produced.
>
>I have attempted to change the code where the subtitle is decoded, only once in the case of dvbsubs, and to output it multiple times, but the output bit is still only called once.
>
>Can anybody help me in getting the loop to make the multiple calls to output the subtitles, im trying not to have to write this as a filter, but to have the subs placed on the output video plane BEFORE resizing and ENCODING?
>
>If you think im going about it the wrong way then let me know, and if the only way is to produce a filter i will spend my time on that instead.
>
>So just for clarity i need to get the subs to be copied to the video before any resize or encoding is performed, if this works it should be possible to take any subs and have them placed on the video.
>
>also one more problem is that the TS si still has the entry for "dvb subs" in its pmt, this will need removing, as i cant see the point of having hard subs and soft subs whch are the same.
>
>joolz
>
>_______________________________________________
>ffmpeg-devel mailing list
>ffmpeg-devel at ffmpeg.org
>http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>
>

Ok boys i have the "hards subs" kind of working, but i need some help in dumping the subtitles onto the screen in the correct format.

I have modified ffmpeg.c and in the routine "pre_process_video_frame" i aim to do the dump of the subs, im just testing but if i do a memset on the memory pointed at by picture->data[0]+x+y*picture->linesize[0] i get my boxes in the correct place.

What i need to do now is translate the subtitles pixel and clut map into the correct format and add this to the plane, now the good point of this is that scaling the video works after this.

Any help please.

joolz



More information about the ffmpeg-devel mailing list