fbpx

How To Encode/Add Subtitles In A Video with Android

Watching movies without subtitles for me is just like listening to a baby speak and I know it is the same with so many people out there. In this tutorial, I will be breaking it down for you the process you can smartly use on How To Encode/Add Subtitles In A Video with Android.

so many already know you can use MX Player or VLC to automatically download and use subtitles in a video but some like me actually want to do more by Learning How To Encode Subtitles In A Video with Android.

Also Watch the Video Below to Understand it More:

Requirements

These are things you need to do it like a pro;

  • FFmpeg CLI – DOWNLOAD
  • Android Device
  • Subtitle with SRT Extension – DOWNLOAD
  • Video (Any Video You want to do it)

Steps on How To Encode/Add Subtitles In A Video with Android

First of All, Download FFmpeg CLI For Android in your android device. Then Install the app, Now after Installation.

Open the App as it is in the below screenshot

 

FFMPEG CLI Interface

Now Copy the Code Below or Type it in the box above Run

ffmpeg -i input.mp4 -sub_charenc UTF-8 -i subtitle.srt -map 0:v -map 0:a -c copy -map 1 -c:s:0 mov_text -metadata:s:s:0 language=eng output.mp4

 

How To Encode/Add Subtitles In A Video with Android

Note: There is a Difference between Zero and Alphabet “O.

Now let me explain the codes above for you;

  • input.mp4 – This is the Video file you want to encode the subtitle in.
  • subtitle.srt – It is the subtitle file you want to use in the video.
  • output.mp4 – This is the directory path and filename you want it to carry after the encoding.
  • language=eng – This is where you change the subtitle language (Leave it in English).

Now let us get on how to edit each path you want.

Clear the input.mp4 and then click on the Plus Icon above, Now select File Path (Browse by Yourself), From there go to the directory the video is in and then click select the video. Now You will see something like /storage/emualted……….videofile.mp4.

To put the subtitle file, Clear the subtitle.srt and then click on the Plus Icon above, Now select File Path (Browse by Yourself), From there go to the directory, find and select the subtitle just like you find for the video.

To Select Directory Path and Filename for saving, Select and clear the output.mp4 and then click on the Plus Icon, Now select Directory Path, Select any Directory (I prefer Download Directory).  You will see a request Showing Do you also want to concat a file name? (Select Yes as I always do), Enter the Video Name as you like with .mp4  ending it and press OK. On Your Screen, You will see it as in the below screenshot.

Selecting Directory on FFMPEG CLI

 

Click RUN if you are sure everything is good and wait till you see Finished. Then Check your video and you will see it having permanent subtitle in it which can be played anywhere even on TV.

I Hope everything explained is clear, if not comment below with the problem you are encountering let’s help you solve it.

5 Comments

  1. I use a cloud storage named ‘terabox’.When I download a torrent file,which has subtitles already in it and I upload it on terabox, Terabox plays that subtitles,which is switchable, I want to merge subtitles in that way,not like ffmpegcli

    1. You can only achieve that using Online video editors or offline video editors. Terabox don’t merge subtitles, they serve it differently as it is in your MX Player, VLC otherwise the subtitles is been hardcoded inside the video

  2. I’ve just tried all that you said (everything but the “” with the path) and it worked. Thank you.

    I have a question: is it possible to hardcode another format of subtitles? The default output is a plain white captions, I want to set a black border and a yellow captions. Thanks a lot!

  3. Me again. I’ve checked the result file, and the art has been integrated to the video, so is able to be selected or not. But, how is it possible to HARDCODE the subtitles to the video? I mean, burned to the video, always visible.

    I really appreciate your work and answer. 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to top button