VideoHelp Forum

+ Reply to Thread
Results 1 to 11 of 11
Thread
  1. Hello,
    i have to add 1 srt to multiple video as a hardsub with ffmpeg.
    I have the command to do that only with one, but for many?

    Thanks
    Quote Quote  
  2. What is your question? You know how to do it with one, but not for many?
    If so, post the commands you are using now for one, then people can see how to modify it for many.

    Also, "hardsub" usually refers to burning in the subtitle to the video, so it's always there. This requires re-encoding of the video. Is this what you want?
    Quote Quote  
  3. Here
    ffmpeg -i a.mp4 -vf subtitles=asd.srt out.mp4

    but the problem is another one:
    each file have a different name so i should need something "universal" as a command.
    Quote Quote  
  4. Batch job;

    Code:
    for %%g in (*.mp4,*.mkv,*.avi) do (
    ffmpeg -i %%g -vf subtitles=asd.srt %%~ng_out.%%~xg
    )
    Quote Quote  
  5. Originally Posted by videobruger View Post
    Batch job;

    Code:
    for %%g in (*.mp4,*.mkv,*.avi) do (
    ffmpeg -i %%g -vf subtitles=asd.srt %%~ng_out.%%~xg
    )
    Thanks but i get this error

    Image
    [Attachment 66250 - Click to enlarge]
    Quote Quote  
  6. Sorry. Typo. Tested this

    Code:
    for %%g in (*.mp4,*.mkv,*.avi) do (
    ffmpeg -i %%g -vf subtitles=asd.srt %%~ng_out%%~xg
    )
    Quote Quote  
  7. Member ricardouk's Avatar
    Join Date
    Mar 2005
    Location
    Portugal
    Search Comp PM
    im having a similar problem, i have 5 videos with 5 subtitles and i would to like join them all with hardcoded subs in one file, i tried several programs but it only converts to individual videos, i could join them afterwards without converting them again but i think the bitrate/fps/resolution needs to be the same in all of them, a slight mismatch in bitrate wont let me join them (not sure about it).

    Can anyone help?
    Thanks
    I love it when a plan comes together!
    Quote Quote  
  8. Member
    Join Date
    Apr 2007
    Location
    Australia
    Search Comp PM
    File names with spaces need to be enclosed in double quotes (Windows)
    Code:
    for %%g in (*.mp4,*.mkv,*.avi) do (
     ffmpeg -i "%%g" -vf subtitles=asd.srt "%%~ng_out%%~xg"
     )

    Cheers
    Quote Quote  
  9. Is your subtitle file in the same folder? And named asd.srt?
    Quote Quote  
  10. Originally Posted by pcspeak View Post
    File names with spaces need to be enclosed in double quotes (Windows)
    Code:
    for %%g in (*.mp4,*.mkv,*.avi) do (
     ffmpeg -i "%%g" -vf subtitles=asd.srt "%%~ng_out%%~xg"
     )

    Cheers
    good, works thank you!

    Originally Posted by jagabo View Post
    Is your subtitle file in the same folder? And named asd.srt?
    Yes yes anyway seems works now. Thanks
    Quote Quote  



Similar Threads