VideoHelp Forum
+ Reply to Thread
Results 1 to 9 of 9
Thread
  1. Hi. I know that you can burn subs with the following as part of an avisynth script:
    Code:
    LoadPlugin("D:\MeGUI\tools\lsmash\VSFilter.dll")
    a=LWLibavVideoSource("D:\movie.mkv")
    b=LWLibavaudioSource("D:\movie.mkv")
    audiodub(a,b)
    TextSub("D:\moviesubs.srt")
    but is there a way to do it so that the subs can be demuxed at a later date? I realise I could run the script without the subs and then use mkvtoolnix to make a copy of the output file with subs added but that seems a waste of diskspace. I use MeGUI to run my scripts.
    Many thanks.
    Quote Quote  
  2. Try
    Code:
    LoadPlugin("D:\MeGUI\tools\lsmash\VSFilter.dll")
    a=LWLibavVideoSource("D:\movie.mkv").TextSub("D:\moviesubs.srt")
    b=LWLibavaudioSource("D:\movie.mkv")
    audiodub(a,b)
    Quote Quote  
  3. Thanks, ProWo. Unsuccessful, unfortunately but I'm not overly bothered - I don't mind doing it the long way.
    Quote Quote  
  4. Then try

    Code:
    LoadPlugin("D:\MeGUI\tools\lsmash\VSFilter.dll")
    a=LWLibavVideoSource("D:\movie.mkv")
    a=TextSub("D:\moviesubs.srt")
    b=LWLibavaudioSource("D:\movie.mkv")
    audiodub(a,b)
    Quote Quote  
  5. Member
    Join Date
    Jul 2009
    Location
    United States
    Search Comp PM
    Avisynth is a frame server so what comes out of it is a raw video frame. Depending on what software you are feeding the script into you may be able to mux in the subs at the same time.
    Quote Quote  
  6. zing is correct, AviSynth will always burn the subs into the video stream. If you want soft subs, include them when you mux.
    Quote Quote  
  7. Originally Posted by pooksahib View Post
    I could run the script without the subs and then use mkvtoolnix to make a copy of the output file with subs added but that seems a waste of diskspace. I use MeGUI to run my scripts.
    Many thanks.
    Is that how ffmpeg works? Using little buffer here or there as necesarry, but stitching everything on the go?
    Was always thinking about that as a ffmpeg advantage, but never really investigated how much temporary memory it uses.
    Quote Quote  
  8. ffmpeg can use the AviSynth script as input. So you don't need multiple steps or multiple copies of the video:

    Code:
    ffmpeg -i video.avs -i audio.aac -i subs.srt -c:a copy -c:s copy -c:v libx264 (any x264 args here) output.mkv
    Quote Quote  
  9. Thanks guys, esp jagabo who looks to have come up with the solution. I don't know how use that ffmpeg script yet but it doesn't matter as I've discovered a further problem: despite my careful calculations when using the 'burn' method the subs were still a little out of sync. So it seems best to make an output file first, get the subs properly timed and then mux a final output vid.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!