I did not find a way to get the subtitle program to automatically add rudimentary subtitles, by analysing the voices in the video.
Therefore, the alternative that I use is
- Upload the video to Youtube (for example, privately) and use the in-build facility to create automatically rudimentary subtitles.
Then,
- Add the video to http://www.universalsubtitles.org/ and create manually the timeframes for each sentence, if the automated way in Youtube did not work, or sentences are mising.
- Use GNOME Subtitles (found in the Software Center) in order to clean up the subtitles and fix any timings.
Short answer
You could use mkvmerge (apt-get install mkvtoolnix
) to create a Matroska container and include the subtitles in the output:
mkvmerge -o output.mkv input.mp4 subtitle0.srt subtitle1.srt
This does not require re-encoding, so it is pretty fast.
Further customization
You may set the language and name of each subtitle track:
mkvmerge -o output.mkv input.mp4 \
--language 0:en --track-name 0:English english_subtitles.srt
--language 0:es --track-name 0:EspaƱol spanish_subtitles.srt
Note that we used for both languages the same track ID (0:
), which corresponds to the input video track.
The --language
needs to be properly encoded. You can list all allowed ISO 639-2 and ISO 639-1 codes with:
mkvmerge --list-languages
Other useful features
You may also set the title of the output video with:
--title "Your title"
We can check how all subtitles were added to the output:
$ mkvmerge -i output.mkv
File 'output.mkv': container: Matroska
Track ID 0: video (MPEG-4p10/AVC/H.264)
Track ID 1: audio (AAC)
Track ID 2: subtitles (SubRip/SRT)
Track ID 3: subtitles (SubRip/SRT)
If you really want to "burn" the subtitles in the video, you may use ffmpeg
instead.
Best Answer
You can use subdownloader or to install in shell
sudo apt-get install subdownloader
which is very good to download subtitles for any type of movie/series.After downloading/installing it the program should be in the Sound & Video section in the applications panel. If you are using Unity by default just press SUPER and type subdownloader and press enter.
When you open the program it will automatically log in to opensubtitles and just search for the movie you want to find the subtitles for or the folder where the video or videos that you want to search the subtitles for. Then select the language for them and download. It will automatically put it in the folder where the video is, renaming it to the video name and enjoy. Open the video with VLC and you should be able to watch the movie with the subtitles.