Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 27
  1. #11
    Computer Technician wainuitech's Avatar
    Join Date
    Aug 2007
    Location
    Wellington
    Posts
    26,775

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

    Been having a bit of a play - Why muck about doing command prompt when theres a free and certainly a lot easier way to ad the subtitles.

    Found some basic instruction from a program that's been around since the day dot and works a treat.

    Handbrake -- https://handbrake.fr/rotation.php?fi...64-Win_GUI.exe

    Some simple instructions: ( copied from another site) and tested

    All you have to do is launch Handbrake, select the video file as the Source, switch to the Subtitles tab, click Add External SRT, and select the subtitle file.

    Using this method, you have two options: “Forced Only” mode will burn the subtitles into the video data itself, whereas if you turn the “Forced Only” option off, the subtitle will be embedded as a separate track that can be toggled and selected in whatever video player is used to watch it. (With the latter option, you can embed multiple subtitle tracks into a single video.)


    Just tried it, original Movie 1hr 53 playing time, 938MB .MP4 Added subs to it, finished size (as it was set to default so compressed) 831 MB .MP4 Took approx 14 Minutes to encode.

    The subs can be turned off or on at will, or you can hard code them ( as advised above).

    May have to write some instructions as I'm bored waiting for computers to do their thing
    Update / Upgrades = Replace old bugs with new ones.

  2. #12
    Senior Member
    Join Date
    Apr 2015
    Posts
    481

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

    Quote Originally Posted by wainuitech View Post
    Been having a bit of a play - Why muck about doing command prompt when theres a free and certainly a lot easier way to ad the subtitles.

    Found some basic instruction from a program that's been around since the day dot and works a treat.

    Handbrake -- https://handbrake.fr/rotation.php?fi...64-Win_GUI.exe

    Some simple instructions: ( copied from another site) and tested





    Just tried it, original Movie 1hr 53 playing time, 938MB .MP4 Added subs to it, finished size (as it was set to default so compressed) 831 MB .MP4 Took approx 14 Minutes to encode.

    The subs can be turned off or on at will, or you can hard code them ( as advised above).

    May have to write some instructions as I'm bored waiting for computers to do their thing
    wainuitech
    Hi and cheers. I not tried Handbrake as I mentioned earlier, but hell yeah I give it a go. I don't have it on computer but can get it in a flash. Used the app a few year back. I was thinking that I just going to have to copy her DVD using ConvertX 2 DVD (CX2DVD7 ...the 7 is just the latest version of the app) Copy the DVD, extract the OCR Sub and make an .srt from it (which is a real pita as have to go through a lengthy process of Typing in a Letter or symbol that the app doesn't recognise and then having to do a mass of spelling corrections...such as the word 'turn' it will have recognised as being 'tum' because the letters r and n 'looks like' an m.) so it is a lengthy process. Entails reading the entire subtitle that is revealed from the OCR and correcting everything. To build a set data base that it uses and when that's done I set it to create a .srt from the OCR. And that can still be wrong!
    So once movie copied to HDD using CX2DVD then reload it into CX2DVD, add the Spanish sub and set it to Create DVD and it will have English AND Spanish subs. Lengthy job.... 1-2 hour copy and same creating new DVD.
    If only she had a BlueRay Vid player...they play h264/h265 no problem at all.

    Cheers I will give handbrake a shot.
    Last edited by kioti; 24-07-2019 at 04:24 PM.

  3. #13
    Computer Technician wainuitech's Avatar
    Join Date
    Aug 2007
    Location
    Wellington
    Posts
    26,775

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

    Told ya I was bored

    To add subtitles is easy:

    Here's how I did it:

    1st went to google, searched for the .srt for the movie. Example a google search for the movie 2012 " 2012 subtitles" gives you this page https://www.yifysubtitles.com/movie/2012-2009 Scroll down to get various languages.

    Note: the one I tried was Edge Of Tomorrow.

    Add Subs to existing Movie:

    Put Original movie ( MP4, or what ever) in a folder along with .srt (sub File) add as many .srt’s as you want for different languages.

    Open Hand Brake

    Select movie From Source or drop the whole folder with movie & .srt into the large window:

    Click image for larger version. 

Name:	Source.png 
Views:	5 
Size:	27.4 KB 
ID:	9838

    Click on Subtitle tab – Import .srt – Select if forced or optional ( picture shows forced - untick for optional) - Name the New File, browse to where you want it saved. ( various stages shown / numbered)

    Click image for larger version. 

Name:	Saving.jpg 
Views:	6 
Size:	57.1 KB 
ID:	9839

    Click Start Encode

    Click image for larger version. 

Name:	Encode.jpg 
Views:	7 
Size:	33.5 KB 
ID:	9840

    Note: to change the output size and Quality top right – Presets, select new options, as well as the Video Tab, Dimension Tab --- adjust sizing to suit.

    The higher the Quality the larger the finished file will be as well as longer to Encode.

    You can also convert to .MKV is so desired


    If you have a DVD and need to extract subs there are various ways BUT unless its a home made movie then somewhere will be the subs.
    Last edited by wainuitech; 24-07-2019 at 04:42 PM.
    Update / Upgrades = Replace old bugs with new ones.

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

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

    Quote Originally Posted by chiefnz View Post
    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.
    chiefnz
    hi and thanks. I didn't do the 'Long method' or going to all "Control Panel----->System----->Advanced System Settings----->Environment Variables" etc.... as was shown to do by the person who did the tutorial about installing ffmpeg…. I used a shorter method shown in another vid on line but I did get into variables and create "New" and typed in the Directory for where I had the ffmeg folder stored (C: Drive...were we get to see all that is there when we click to 'Open' the C: Drive. the ffmpeg is visible in Command prompt and it was usable, but...at the very end it failed to produce any output as it showed for the c:s... all new computer uses for me but I will persevere.... maybe I get it right ...one day .
    wainuitech advised I use Handbrake to do the add sub to mp4. I not used Handbrake for a number of years , but I will give it a spin .
    Thanks a lot for you guide, I will uninstall ffmeg and reninstall it and follow you guidelines in the "Control Panel----->System----->Advanced System Settings----->Environment Variables"
    Cheers

  5. #15
    Senior Member 1101's Avatar
    Join Date
    Jan 2008
    Posts
    6,204

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

    wont the added in subtitles get a bit out of sync after a hour or so ?
    Or is there something that keeps them in sync ?

  6. #16
    Senior Member
    Join Date
    Apr 2015
    Posts
    481

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

    Quote Originally Posted by wainuitech View Post
    Told ya I was bored

    To add subtitles is easy:

    Here's how I did it:

    1st went to google, searched for the .srt for the movie. Example a google search for the movie 2012 " 2012 subtitles" gives you this page https://www.yifysubtitles.com/movie/2012-2009 Scroll down to get various languages.

    Note: the one I tried was Edge Of Tomorrow.

    Add Subs to existing Movie:

    Put Original movie ( MP4, or what ever) in a folder along with .srt (sub File) add as many .srt’s as you want for different languages.

    Open Hand Brake

    Select movie From Source or drop the whole folder with movie & .srt into the large window:

    Click image for larger version. 

Name:	Source.png 
Views:	5 
Size:	27.4 KB 
ID:	9838

    Click on Subtitle tab – Import .srt – Select if forced or optional ( picture shows forced - untick for optional) - Name the New File, browse to where you want it saved. ( various stages shown / numbered)

    Click image for larger version. 

Name:	Saving.jpg 
Views:	6 
Size:	57.1 KB 
ID:	9839

    Click Start Encode

    Click image for larger version. 

Name:	Encode.jpg 
Views:	7 
Size:	33.5 KB 
ID:	9840

    Note: to change the output size and Quality top right – Presets, select new options, as well as the Video Tab, Dimension Tab --- adjust sizing to suit.

    The higher the Quality the larger the finished file will be as well as longer to Encode.

    You can also convert to .MKV is so desired


    If you have a DVD and need to extract subs there are various ways BUT unless its a home made movie then somewhere will be the subs.
    wainuitech
    Cheers. I going to get Handbrake now and give it a run. Be great of it does the job (it will ) the beauty is that I can load a number of vids and subs for them and then set the app to do all at once. Or sequentially.
    Yeah getting subs from a DVD can be a maddening process as I detailed not long ago in reply to your first suggestion on using Handbrake.
    Cheers. I come report back shortly

  7. #17
    Computer Technician wainuitech's Avatar
    Join Date
    Aug 2007
    Location
    Wellington
    Posts
    26,775

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

    Quote Originally Posted by 1101 View Post
    wont the added in subtitles get a bit out of sync after a hour or so ?
    Or is there something that keeps them in sync ?
    Good reason to get them free from the internet, plenty of places to freely download the correct Subs.

    Maybe if we knew the movie Name it can be sourced
    Update / Upgrades = Replace old bugs with new ones.

  8. #18
    Computer Technician wainuitech's Avatar
    Join Date
    Aug 2007
    Location
    Wellington
    Posts
    26,775

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

    Just one place for Subs https://subscene.com/

    OK two https://www.yifysubtitles.com/
    Update / Upgrades = Replace old bugs with new ones.

  9. #19
    Senior Member
    Join Date
    Apr 2015
    Posts
    481

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

    Quote Originally Posted by 1101 View Post
    wont the added in subtitles get a bit out of sync after a hour or so ?
    Or is there something that keeps them in sync ?
    1101
    Hi. Added in Subtitles are usually ok because they have a Start time and finish time for each spoken line of the movie. There can be 'sync' problems if the video is in PAL or NTFC because of Frame rates.. So downloading a subtitle from one of the many available on the internet is quite easy, but...sometimes I have to dload a few and play the movie in VLC and add the subtitle. Then I can see if it is in sync or not. There is a feature in VLC Player to Hasten or Delay the subtitle so it can be put into sync with the spoken words, once that delay or hasten adjustment time is known then the video can ne created in VLC with the in-sync sub. Or I can use a tool called MKVToolNix in which I can add the Video and subtitle Sources, and then there are options available to alter the subtitle time in milliseconds ...and set default Language for the Sub and Spoken etc and the creat a MKV Video with the sub added. It is a great app but it only creates MKV format files, and in the case at the moment the woman's tele doesn't recognize MKV Video format.
    Usually if I can find a subtitle online that is in sync well that is great...have to try a few on offer but usually get one, and don't have to use the MKVToolNix app.
    And that is what I am trying to do at the moment, create a .mp4 video with Subtitle added to it.
    wainuitech gave a good suggestion and I am about to give it the acid test run.
    Here are a few things about subtitles that can be really maddening!
    1/ The sub can be perfectly in sync with the vid oral, but...hahahha… sometimes, when there is a change of scene.. say from an at home interior family at the table view and then it will show them at an airport, the subtitle will go out of sync because of that change of 'scene'.... now that can happen many times during the length of the movie and believe me, changing/altering times several times during the course of the movie is nigh on impossible....sometimes it will go out of sync a few seconds...or it can be many minutes. Hard to fix that one.
    2/ This one is a killer … Searching for a Subtitle online and people have uploaded them to the Subtitle sites...its a longish movie and there are 2cd files...means there are two subtitles files, cd1 is for the first say hour of the movie and the cd2 file is for the 2nd half of the movie. Well, the .srt files have a start time and a finish time as I said before... and the first file has a start time of 00.00.00,000 (Hours/minutes/seconds and milliseconds respectively for the 00.00.00,000)… the ridiculous thing is that the 2nd file for the 2nd half of the movie has a start time of 00.00.00,000, exactly what the first cd1 file starts at. Now, ya cannae be making one new notepad file by joining the two together because ewhen the movie reaches the end of the text of the cd1 file its 1 hour beyond the start of the 2nd cd2 file
    I'm sure you can see the hilarious absurdity on that
    So, I only dload 1cd subtitles, til I get the perfect one.
    Here is a pic that shows the Start of a subtitle.... it shows when to sub comes onscreen as the person speaks and when their sentence ends... subtitles (.srt) have that method of text creation for the subs.
    also I show 2 pics of a 2cd subtitle showing the start times as both being 00.00.00,000 (They are not at 00.00.00,000......they have a number in where the talking starts in th movie and the duration of that sentence spoken and then it goes to the next line (2) and then to 3 etc etc.
    Ya can't have the 2nd half of the movie's subtitle with a same timeline as the first half of the movie.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Subtitle.PNG 
Views:	4 
Size:	31.0 KB 
ID:	9841   Click image for larger version. 

Name:	bone collector.jpg 
Views:	5 
Size:	44.6 KB 
ID:	9842   Click image for larger version. 

Name:	bone collector 1.jpg 
Views:	4 
Size:	45.4 KB 
ID:	9843  
    Last edited by kioti; 24-07-2019 at 05:42 PM.

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

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

    Quote Originally Posted by wainuitech View Post
    Good reason to get them free from the internet, plenty of places to freely download the correct Subs.

    Maybe if we knew the movie Name it can be sourced
    wainuitech
    precisely

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
  •