Run the shell command cd ~/Videos so the Linux shell enters the ~/Videos directoryģ.4. ~/Videos/input.avi and ~/Videos/input.ssaģ.3. your Videos folder, in order to end up having e.g. If you however are using Ubuntu version 18.04 or later, then avconv is deprecated and you must instead install ffmpeg with a shell command such as: sudo apt install ffmpeg -yģ.2. If you're using Ubuntu version 17.10 or a previous one, install the avconv packages by running this shell command: sudo apt-get install ffmpeg libav-tools -y The configuration line above will globally preset the subtitles with a 16pt yellow Arial (or an 18pt yellow Times New Roman) font and will add a semi-transparent black background behind the subtitles (to make reading them easier).ģ.1. Use a simple text editor such as Gedit (install it with the shell command sudo apt-get install gedit -y) to open your SSA file and then replace the entire Style line by e.g. input.ssa) and then save the SSA file in ~/Videos (you'll thus have ~/Videos/input.ssa). Use a subtitles editor such as GNOME Subtitles (to install it from the shell, run sudo apt-get install gnome-subtitles -y) to convert your subtitles file (e.g. pixels not only "laid over" the video's pictures/frames but replacing such pixels). In such case, a laborious-yet-rewarding approach consists on (1) converting your subtitles file to the SSA format, (2) editing the SSA's Style line and then (3) using avconv (Ubuntu version 17.10 or previous) or ffmpeg (Ubuntu version 18.04 or later) to merge/hardcode such stylized subtitles into the video track/stream (the subtitles' characters will then be converted to pictograms or graphical symbols, i.e. What if you want subtitles "fused" (hardcoded) in the video, instead of just muxed/multiplexed? PS: if your Android TV doesn't play MKV video files, use MX Player, Kodi Player or VLC Media Player to add MKV playback support. home/your-account/), will be a video file that contains subtitles embedded in it and you will be able to turn the subtitles on and off, while such MKV video is playing. ~/Videos/output.mkv (the ~ character is a shortcut to your home account folder, e.g. This means that the output MKV file, like e.g. MKVToolNix muxes/multiplexes the subtitles track/stream along with the video track/stream. and then run it, right-click the Source files area in order to add your video file and your subtitles file (step 1, at the picture below), specify the location of the destination MKV video file (step 2) and then click on Start multiplexing (step 3). running a terminal/shell command such as: sudo apt-get install mkvtoolnix mkvtoolnix-gui -y I think that MKVToolNix is the simplest and easiest-to-use free tool available for you to merge a video file with a subtitles file. You can even extract them, fix typos, and mux them back in. You can also extract them later and search them if you're trying to remember a line from the movie. If you don't care about file size because you're just streaming it to your TV, transcoding with x264 with -preset veryfast -crf15 can run quickly and lose minimal quality.Īnother advantage to muxing subs is that you can then toggle the subs on/off, or have your player show them in a different position on screen. x264 with -preset slower, or if your player supports it, x265 if you're willing to spend a huge amount of CPU time to make smaller files that still look good). It's impossible to avoid losing quality when transcoding, and it takes a lot of CPU time to even come close to the quality-per-filesize of a well-encoded source. The major advantage to this is that you avoid degrading the quality with another decode/encode cycle of generation loss. It has a lot of options to let you control things like the subtitle offset. There's an mkvtoolnix-gui package, with a gui frontend. It takes about as long as copying the file, since it doesn't have to decode/re-encode the video. That will include all tracks from the mp4 (video, audio, chapters), and subs from the srt as a text subtitle track. mkvmerge -o movie_with_subs.mkv movie.mp4 subs.srt If your TV can play movies that have subtitles muxed into the same file as the video, there are many advantages to adding the subtitles as a subtitle track, instead of burning them into the video.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |