cdgriffith / FastFlix

FastFlix is a free GUI for HEVC and AV1 encoding, GIF/WebP/AVIF creation, and more!
MIT License
1.1k stars 55 forks source link

Feature request: Subtitle Burn-in #75

Closed Trevbams closed 3 years ago

Trevbams commented 3 years ago

Hi Chris. I'm not sure if I am reading this correctly but it would be great to have the ability to include subtitles as SRT rather than pgs (https://trac.ffmpeg.org/wiki/ExtractSubtitles)

The reason behind this is I use Plex which I understand doesn't take kindly to pgs subtitles and therefore will automatically transcode them, however when a video is in 4k an error message is received that the server isn't powerful enough. Handbrake is able to complete this and I can then play videos with forced subtitles which doesn't work at the moment using fastflix (at least I don't know what command to enter to get the result I want and therefore a choice in the software would be great), however handbrake obviously has limitations around 10bit :)

cdgriffith commented 3 years ago

PGS subtitles are a pain in the butt because they are actually images and not text based like SRT. (So PLEX and other transcoders have to literally re-encode the video with another layer on top.)

Handbrake does the awesome thing of giving you that option to 'burn-in' a single subtitle track, which I think is the real first goal. Because even if you extracted the PSG subtitles, you would need a tool like Subtitle Edit to do OCR on the images to convert them to text.

If you look at the section "picture based subtitles" https://trac.ffmpeg.org/wiki/HowToBurnSubtitlesIntoVideo it gives a quick overview of how to do it. Currently not possible through FastFlix because it sets the map for the video track (and in this case you rename that mapping to "[v]"). So you could export the commands to the file, modify it and try it out if you want, but it is a more advanced and tricky thing to accomplish.

As this is a common feature and really really handy I do want this option as well. I am not sure how Handbrake is able to do the "Foreign language scan" stuff, but I will also look into that.

schlotkins commented 3 years ago

Hi Chris: I was just going to ask about this too. If you encode with HDR and then want subtitles, you lose the HDR flag on EMBY and the picture is all washed out again. Not an issue usually, but makes things tough for Parasite since my Korean isn't that good. :)

The burn-in idea is great. For my movies, minus forced subtitles, I would either always have them on or never. Hopefully it's easy to figure out!

Thanks!

cdgriffith commented 3 years ago

I'm going to treat this as the "burn in" feature ticket, and have added ticket #85 for the ability to also include external subtitle files.

I have a largely untested (tried with a few settings for x265 only) burn in support now. https://ci.appveyor.com/project/cdgriffith/fastflix/build/artifacts (Link to whatever the latest build was, may be broken at any point, so I suggest using the portable for trying it out, not the installer)

cdgriffith commented 3 years ago

Added in 3.2.0