VideoHelp Forum
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. Hi Everyone

    I am trying this..

    string srt = @"C\:/Users/Toy/AppData/Roaming/TeknikForce/Live Caster Pro/sub.ass";
    Console.Write(startInfo.FileName);
    startInfo.Arguments = @"-re -i file:" + "\"" + vid + "\"" + " -vf ass=" + "\"" + srt + "\"" + " -vcodec libx264 -crf 23 -c:a copy " + "\"" + output + "\"" + "";

    but it did not work???

    Please help me..!
    Quote Quote  
  2. Mod Neophyte Super Moderator redwudz's Avatar
    Join Date
    Sep 2002
    Location
    USA
    Search Comp PM
    shahid109, , please do not double post. I've deleted the other duplicate post. If you want to move a topic to another forum, PM a Mod.

    Moderator redwudz
    Quote Quote  
  3. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    What language is that? It doesn't look like command line. "C"?
    Quote Quote  
  4. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    C#
    Quote Quote  
  5. Please follow sneaker's link. Learn how to do it from a normal ffmpeg command line. Then translate that command into C# or whatever.

    You need to tell people what language you are using if you want help with it. Also, if you want help, an exact error message is needed -- "didn't work" does not work.

    My C# is super rusty, but it looks like you're trying to escape a literal (@"...") string:
    msdn.microsoft.com: String literals (C#)
    Code:
    string e = "Joe said \"Hello\" to me";      // Joe said "Hello" to me
    string f = @"Joe said ""Hello"" to me";     // Joe said "Hello" to me
    string g = "\\\\server\\share\\file.txt";   // \\server\share\file.txt
    string h = @"\\server\share\file.txt";      // \\server\share\file.txt
    Quote Quote  
  6. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    "e" is not a valid argument to the -r parameter. Also, you have to specify an output filename, not a path.
    Quote Quote  
  7. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Just an added 2 cents to the excellent advise above... What you want to end up with is :

    Code:
    ffmpeg -i "C:\Path To Video\Video.mp4" -ss 00:00:00.000 -to 99:00:00.000 -vf "ass='C\:\\Path\\To\\Subtitle\\srt2.ass'",scale=640:360,pad=640:360:0:0 -vcodec libx264 -crf 22 -r 30.000  -acodec aac -ac 2 -ar 44.1k -b:a 128k  "C:\Path\To\Output\New_Video.mp4"
    Take out what you do not need in the ffmpeg script or use as you wish. I put most in to cover all bases.
    Notice the double quotes around "ass=..." and the single quotes around the actual ASS path in case of space as mention above. Also the "\" escape in front of all the subtitle path special characters. Quirk of FFMPEG.

    I too am VERY rusty on C# but it works with this format using Visual Basic. Verification shown below.

    Click image for larger version

Name:	subs.jpg
Views:	320
Size:	151.0 KB
ID:	41894
    Quote Quote  



Similar Threads

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