Page 1 of 3 123 LastLast
Results 1 to 10 of 27
  1. #1
    Senior Member
    Join Date
    Apr 2015
    Posts
    481

    Default Add .srt subtitles to .mp4 video using FFMPEG

    Hi.
    Ok I have an assortment of converters but none will add a subtitle to a video without the process taking from 20 minutes to 2 hours. That is adding the subtitle to an.mp4 video file. They all make a new .mp4 video with the subtitle added to it.
    I got a new app yesterday and it will do the job in 20 minutes but the subtitle is hard coded! Dammit! There was no mention in the Sales add or tutorials about subs being hard coded. Grrrrrrrrrrrrrrrr… AND the output file is double the size of the input file...…. 1 GB becomes 2GB and 2.4GB becomes 4.8GB...for an .mp4 that's a whopping size.
    The best and fasted app I have is MKVToolNix, it creates a new video and adds the sub in about 15-20 seconds however, the video file is MKV and MKV is not a recognized format of the TV of the person I am doing the work for.
    If I make the MKV with Sub added the Converter apps I have will convert the MKV+sub to .mp4 but do not produce a file with the sub added. There are no options to add the sub before doing the conversion to .mp4.
    There is a way to add the subs using Command Prompt, Command line and I am not to familiar with using CMD. I googled how to do its and am lost. The beauty is that the sub is added in a few seconds. Just what I need.
    Anyone able to give me the Command prompt line I need to enter to do the job?
    Here is a link to a guy showing how its done, a bit hard to understand his Indian-English and for the life of me I do not know what he is entering in the Command window to point to the location of the video and the sub title.
    If I enter G (which is where the video and sub are stored on an external HDD then) I get informed G is not a recognised...… do the files have to be in the C Drive?
    Where it first opens and he types in cd\ I thinking he has the files on a CD, but I learned that cd\ means Change Directory
    And the Sub isn't hard coded as is displayed in the 2nd link, though the second vid is a bit tiki-tour explanation.
    Any help greatly appreciated.

    https://www.youtube.com/watch?v=t8oUOHWufug

    https://www.youtube.com/watch?v=jeShjUzriEk
    Last edited by kioti; 23-07-2019 at 09:34 AM.

  2. #2
    Junior Member ManUFan's Avatar
    Join Date
    Feb 2006
    Location
    Greymouth
    Posts
    220

    Default Re: Add .srt subtitles to .mp4 video using FFMPEG

    When referencing a 'drive' you use the convention DRIVE LETTER + ":" e.g. C: = 'C drive', G: = 'G drive" the backslash "" by itself means the root of that drive
    (so C:\ = root of C: drive).

    CD = Change Directory (as you figured out), so "CD C:\Temp" would change your location to the "Temp" folder on "C:" drive - clear as mud?

    Just to be more confusing - if your folder name has spaces you need to put that name in quotes (e.g. CD C:"My Test Folder")

    So to reference your G drive try using G:

  3. #3
    VoidMaster
    Join Date
    Dec 2004
    Posts
    5,729

    Default Re: Add .srt subtitles to .mp4 video using FFMPEG

    When I am playing a video which is not in English I just download the English sub-titles then using VLC which is playing the video I right-click on the VLC interface choose sub-titles and navigate to the .srt I just downloaded, this then gives you sub-titles in the video playing.
    It's not the least charm of a theory that it is refutable. The hundred-times-refuted theory of "free will" owes its persistence to this charm alone; some one is always appearing who feels himself strong enough to refute it - Friedrich Nietzsche

  4. #4
    Senior Member
    Join Date
    Apr 2015
    Posts
    481

    Default Re: Add .srt subtitles to .mp4 video using FFMPEG

    Quote Originally Posted by zqwerty View Post
    When I am playing a video which is not in English I just download the English sub-titles then using VLC which is playing the video I right-click on the VLC interface choose sub-titles and navigate to the .srt I just downloaded, this then gives you sub-titles in the video playing.
    zqwerty
    hi. Yeah I do the same. Have the video and .srt in the same folder, play the vid in VLC, right click screen, go to Subtitle in the drop down box and Add sub, navigate to it and click it and its visible on screen. But the movies the woman has are DVD's and I have ripped to .mp4. The movies only have English subtitles and they are not included in the ripped file from the DVD. I can extract the 'image' sub from the DVD and convert it to .srt or .ssa etc but is easier to download them She wants Spanish so I got the Spanish subs from Subscene. To add the subs to the ripped movies I used MKVtoolNix and put onto USB Drive for her but her tele no plays MKV format. So I am now doing the long way adding the sub to the .mp4 video file using the new app Wondershare Video Converter Ultimate and it is making hard coded subs. Fine for her but be nice to be able to not have a distracting sub for an English language viewer
    Another app I have DVDFab9 won't add a subtitle to the video. I haven't tried Handbrake. Apart from being able to add the sub as hard coded the only other option I have is to use ConvertX2DVD7 app and remake a proper DVD Video_TS from it with the sub added and burn to DVD5 Media Disc. Very time consuming, about 2 hours to create a 4.5GB DVD Folder containing all Vobs/IFO and BUP files, from a video file.
    That is why I was asking about using the FFMPEG method to add the sub to the .mp4 vids.
    Thanks.
    Last edited by kioti; 23-07-2019 at 03:17 PM.

  5. #5
    Senior Member
    Join Date
    Apr 2015
    Posts
    481

    Default Re: Add .srt subtitles to .mp4 video using FFMPEG

    Quote Originally Posted by ManUFan View Post
    When referencing a 'drive' you use the convention DRIVE LETTER + ":" e.g. C: = 'C drive', G: = 'G drive" the backslash "" by itself means the root of that drive
    (so C:\ = root of C: drive).

    CD = Change Directory (as you figured out), so "CD C:\Temp" would change your location to the "Temp" folder on "C:" drive - clear as mud?

    Just to be more confusing - if your folder name has spaces you need to put that name in quotes (e.g. CD C:"My Test Folder")

    So to reference your G drive try using G:
    ManUFan….. hi. Cheers. I will give it another go. Last time I did it at step 3 in the video I sent link about, where he gets to the 3rd step its brickwall time because when I use "test video" its not recognized as internal or external command and its the same result if I just use test video.
    I have a folder named test video in the G Drive and CMD is refusing to accept any command line to get me to the folder continging the video and subtile files.
    Here's a pic
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	CMD.jpg 
Views:	13 
Size:	44.4 KB 
ID:	9830  

  6. #6
    Computer Technician wainuitech's Avatar
    Join Date
    Aug 2007
    Location
    Wellington
    Posts
    26,773

    Default Re: Add .srt subtitles to .mp4 video using FFMPEG

    Quote Originally Posted by kioti View Post
    I have a folder named test video in the G Drive and CMD is refusing to accept any command line to get me to the folder continging the video and subtile files.
    Here's a pic
    When you change to the G drive, type cd test video

    That will change you to that folder, once in test Video, if you want to see its contents type dir

    Example ( my drive is S)

    Click image for larger version. 

Name:	Example_cmd.jpg 
Views:	13 
Size:	20.2 KB 
ID:	9831

    Remember when doing command prompt you have to tell it exactly what you want it to do, its not like click and pray

    By simply typing Test Video The computer is basically saying there is no such command so what do you want me to do about it

    where as cd = Change directory
    Last edited by wainuitech; 23-07-2019 at 04:33 PM.
    Update / Upgrades = Replace old bugs with new ones.

  7. #7
    Senior Member
    Join Date
    Apr 2015
    Posts
    481

    Default Re: Add .srt subtitles to .mp4 video using FFMPEG

    wainuitech
    hi . That helped a lot. But unfortunately at the end I am told 'ffmeg' is not recognized as an internal or external command, operable program or batch file.
    Drat! It was looking good up to the point I hit the Enter key
    Maybe ffmpeg is not installed to my W10 x64 v1903 system(?)
    Here's a pic of the steps in CMD Prompt....
    Close but no cigar
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	close but no cigar.jpg 
Views:	9 
Size:	55.7 KB 
ID:	9832  

  8. #8
    Senior Member
    Join Date
    Apr 2015
    Posts
    481

    Default Re: Add .srt subtitles to .mp4 video using FFMPEG

    Ahhhh dear...… I will try this to instal ffmpeg

    https://www.youtube.com/watch?v=qjtmgCb8NcE

    then I will give the mp4+sub el rapido another shot in CMD

    Above link from this link to many options and warnings about ffmpeg

    https://www.bing.com/search?q=is+ffm...4a18c537f8ef40

  9. #9
    Enterprise IT Consultant chiefnz's Avatar
    Join Date
    Dec 2004
    Location
    Auckland
    Posts
    1,539

    Default Re: Add .srt subtitles to .mp4 video using FFMPEG

    You may need to add the location (path) to ffmpeg to your "Environment Variables" in System.

    Control Panel----->System----->Advanced System Settings----->Environment Variables
    1) Under User variables for %username% click New
    2) Variable name = ffmpeg
    3) Browse Directory----->Browse to the directory where the ffmpeg.exe resides
    4) Click Ok 3 times----1st Ok once you've selected the folder path, 2nd ok in the Environment Variables box, 3rd Ok in System Properties.
    5) Reboot your machine to ensure the variables are loaded correctly
    6) Try to add your SRT to the video.

    Hope that helps.

    Asus PRIME Z370-P
    Intel Core i7-8700K
    Corsair Hydro H60
    32GB DDR4 G-Skill Ripjaws V-Series
    Intel 660P 512GB M.2 PCIe NVMe
    Crucial P1 1TB M.2 PCIe NVMe
    eVGA GeForce GTX 970
    Corsair Crystal 460X & TX650M 550W PSU
    Windows 10 Pro

  10. #10
    Senior Member
    Join Date
    Apr 2015
    Posts
    481

    Default Re: Add .srt subtitles to .mp4 video using FFMPEG

    Well I installed ffmpeg, checked it was seen in CMD, then I directed Command line to go to the test video folder, it was found and details shown, then I entered the command line with the video title and subtitle info and it did it but failed to produce a suitable output format.
    I did the entire check ffmpeg is visible a CMD and when it was I then continued to add the other command lines to find the test video folder and then entered te command s to get to the stage of entering the command line to do the combining vid and sub. Failed. The two pics show the first part of seeing if ffmeg is visible in CMD and the 2nd pic shows the entire process up to the cannot create an output format
    Sighh ......
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	FFMPEG PART 2_ADDED THE MP4 AND SUB TO COMBINE_FAILED TO PRODUCE A SUITABLE OUTPUT  FORMAT.jpg 
Views:	8 
Size:	46.1 KB 
ID:	9836   Click image for larger version. 

Name:	FAILED.jpg 
Views:	10 
Size:	68.5 KB 
ID:	9837   Click image for larger version. 

Name:	FFMPEG INSTALLED AND SHOWS IN CMD.jpg 
Views:	12 
Size:	47.8 KB 
ID:	9835  
    Last edited by kioti; 23-07-2019 at 09:18 PM.

Similar Threads

  1. Subtitles in VLC or Gom
    By micky in forum PressF1
    Replies: 2
    Last Post: 18-09-2011, 11:05 AM
  2. Subtitles Embed
    By oATAo in forum PressF1
    Replies: 2
    Last Post: 09-07-2009, 05:23 PM
  3. DVD Flick subtitles
    By jwil1 in forum PressF1
    Replies: 4
    Last Post: 11-06-2008, 01:00 PM
  4. DVD movie subtitles
    By Greg in forum PC World Chat
    Replies: 2
    Last Post: 03-05-2006, 09:46 AM
  5. Subtitles On Tv
    By nirbhayn in forum PressF1
    Replies: 6
    Last Post: 01-01-2004, 10:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •