Skip to content
This repository was archived by the owner on Nov 26, 2024. It is now read-only.
/ hardsub Public archive

Using ffmpeg to burn subtitles into video files.

License

Notifications You must be signed in to change notification settings

Gertm/hardsub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3b82b70 · Nov 26, 2024

History

99 Commits
Aug 12, 2023
Aug 19, 2023
Nov 2, 2023
Aug 7, 2023
Aug 19, 2023
Nov 26, 2024
Aug 16, 2024
Dec 9, 2023
Dec 9, 2023
Jan 6, 2024
Sep 20, 2023
Aug 16, 2024
Aug 24, 2024
Aug 24, 2024
Jan 6, 2024
Jan 6, 2024
Dec 9, 2023
Feb 29, 2024
Jan 6, 2024
Aug 19, 2023
Aug 16, 2024
Dec 9, 2023
Jan 6, 2024
Aug 8, 2023

Repository files navigation

This project is now obsolete.

I no longer need this since I bought an Apple TV which displays all my content flawlessly.
Leaving the project here for reference. Don't copy/paste too much from here, the code is not great. But it does work!

hardsub

This is an FFmpeg command generator and runner for burning subs into videos.
Specifically made to convert mkv files with subtitles included into mp4 files with the subs burned into them.

The idea is to navigate to the directory where you have stored the mkv files and just simply run this command.
The defaults are set to my own use case. Nearly everything is configurable, so it shouldn't be hard to customize this to your needs.

I use this software several times a week, without problems. It does what it needs to do because I have a very specific use case. So this might not fit your specific problem. You are welcome to make a pull request or even fork the project.

Work in progress

This is very much a hobby project to scratch an itch. Contributions and suggestions are welcome, feel free to open an issue.
I do not pretend this is the best Go code ever written.
The code was written to automate something boring. It could use some cleaning up, which I'm slowly doing.
Some of the code is still very much not cleaned up. (especially main.go) You are welcome to help out.
This project is basically "done" for me. It does the job and I'm happy with it. However, there are still more things to tinker with:

Currently working on or thinking about implementing these things:

  • Adding functionality for this program to wait for files to be written to a directory and convert them when they are fully uploaded.
  • Searching for the intro part of the video and cutting it out of the hardsubbed file. This will require the user to create a couple of screenshots so the tool knows what to look for.
  • Simple notification support, so you can get notified when the video conversion is done.
  • There are no tests. This needs to be fixed, but it's quite hard to do that after the fact. The application isn't written with tests in mind, it's not easy to add them now. Then again, this is the first iteration of this tool. With the next iteration, I need to make sure we're at least thinking about tests.
  • Everything is one package. Not sure if I really need to split up this into multiple packages, but the code now isn't layed out all that well. This could improve. (v2?)

Requirements

You need ffmpeg, ffprobe and mkvtoolnix cli programs installed and on your $PATH.
There are release versions in the releases page.

Or, you can build it yourself. You need Go installed.
Clone the repo and run 'go install', this will install the tool into $HOME/go/bin/ (which should be in your $PATH)

About

Using ffmpeg to burn subtitles into video files.

Topics

Resources

License

Stars

Watchers

Forks

Languages