The following code will extract a program with dvb subtitles included

vlc mux1.clip.ts --demux=ts --noaudio --novideo --play-and-exit --intf dummy --sout-all --sout '#duplicate{dst=std{access=file,mux=ts,dst='s.ts'}",select="program=213"'

The following command line actually burns dvb subtitles into the video

vlc mux1.clip.ts --demux=ts --noaudio --novideo --play-and-exit --intf dummy --sout-all --sout '#duplicate{dst="transcode{senc=dvbsub}:transcode{vcodec=mpgv,soverlay}:std{access=file,mux=ps,dst='s.mpg'}",select="program=213"'

So putting it all together

vlc mux1.clip.ts --demux=ts --noaudio --novideo --play-and-exit --intf dummy --sout-all --sout '#duplicate{dst="transcode{senc=dvbsub}:transcode{vcodec=h264,vb=200,venc=x264{preset=superfast},soverlay,acodec=mp3,ab=96,width=466,height=240,samplerate=44100}:std{access=file,mux=ts,dst='-'}",select="program=213"' | ffmpeg -i - -acodec copy -vcodec copy -y s.flv

creates a flash video with subtitles!!!!!!

We can also do the same thing purely in vlc

 vlc ~/ftp/mux1.ts --demux=ts --noaudio --novideo --play-and-exit --intf dummy --sout-all --sout '#duplicate{dst="transcode{senc=dvbsub}:transcode{vcodec=h264,vb=200,venc=x264{profile=baseline,preset=superfast},soverlay,deinterlace,audio-sync,ab=96,width=466,height=240,samplerate=44100}:std{access=file,mux=ffmpeg{mux=flv},dst='s.flv'}",select="program=213"'

The first transcoding doesn't seem to be necessary so we can also

vlc mux1.clip.ts --demux=ts --noaudio --novideo --play-and-exit --intf dummy --sout-all --sout '#duplicate{dst="transcode{vcodec=h264,vb=200,venc=x264{profile=baseline,preset=superfast,tune=zerolatency},soverlay,deinterlace,audio-sync,acodec=aac,ab=96,width=466,height=240,samplerate=44100}:std{access=file,mux=ffmpeg{mux=flv},dst='s.flv'}",select="program=213"' 

Where there is more than one dvbsub track, we need to set the specific track by pid:

cat  /bitarkiv/0244/files/mux1.1258110000-2009-11-13-12.00.00_1258113600-2009-11-13-13.00.00_dvb1-2.ts  /bitarkiv/0244/files/mux1.1258113600-2009-11-13-13.00.00_1258117200-2009-11-13-14.00.00_dvb1-1.ts  | dd bs=1880 skip=3779413 count=2382335 | vlc - --demux=ts --intf dummy --play-and-exit --noaudio --novideo --sout-all --sout '#duplicate{dst="transcode{vcodec=h264,vb=200,venc=x264{profile=baseline,preset=superfast},soverlay,deinterlace,audio-sync,ab=96,width=320,height=240,samplerate=44100,acodec=aac,threads=0}:std{access=file,mux=ffmpeg{mux=flv},dst='/home/larm/streamingContent/cd2a70bb-9469-49d6-8305-727124f19e00.flv'}",select="es=0x83f,es=0x849,es=0x858"'

This may be a good idea anyway as it is probably faster.

SubTitles (last edited 2010-11-24 12:31:53 by csr)