Thursday, August 27, 2009

vlc subtitles video

So in the last time i was playing a with vlc (working actually) so here i got a few tips and tricks for all:
  • Stream a file over the network in realtime using multicast:
    vlc file.avi :sout-all ":sout=#std{access=udp{ttl=1},mux=ts,dst=226.0.0.10:1234}"
    
    Then you can open it with :
    vlc udp://@226.0.0.10:1234
    
  • Adding .srt subtitles to a video , hardcoding subtitles, burning subtitles :
    Note that burning subtitles require encoding the video, so you may loose quality.
    vlc file.avi :sub-file="subfile.srt" :subsdec-align=0 :freetype-rel-fontsize=16 :sout-all  \
    ":sout=#transcode{vcodec=mp2v,vb=1000,soverlay}:std{access=file,mux=ps,dst=file.ps}"
    
    Note that you specify codec here :
    transcode{vcodec=mp2v,vb=1000,soverlay}
    
This was tested under linux, for windows it should also work.