HandBrake
HandBrake copied to clipboard
Subtitles improvments
Description of Change:
- Adds to libhb ability to mux to external subtitle files (currently ass and sup). This is not wired to any frontend yet. UIX design work remains.
- Many ffmpeg patches to improve decoding and encoding of TX3G subs
- Turnes on TX3G subtitle decoding with ffmpeg. We were still using our own decoder due to missing features in ffmpeg's decoder.
- Adds a libav subtitle encoder to the subtitles pipeline. This is currently only used for transcoding text subtitles to TX3G for mp4 container output.
Test on:
- [ ] Windows 10+ (via MinGW)
- [ ] macOS 10.13+
- [x] Ubuntu Linux
Impressive.
Kudos for the upstream fixes, and upstreaming HandBrake functionality to FFmpeg. Should benefit many, even those outside HandBrake's reach.
I haven't submitted patches to ffmpeg yet. I need to run everything through FATE tests and it would be nice to get a bit more than my few test cases thrown at it first.
The patches basically bring ffmpeg up the the level our own decoder/encoder were at, plus one improvement that supports transcoding font tags from ass to tx3g. It's limited to the fonts specified in the ass style header, but it's better than "all fonts are Arial" like we had or "all fonts are Serif" like ffmpeg had.
I haven't submitted patches to ffmpeg yet.
I just assumed you will eventually. 😉
The patches basically bring ffmpeg up the the level our own decoder/encoder were at...
That's what the initial read looked like to me. How long before we stop telling people HandBrake isn't an FFmpeg front end? 😝
This worth re-visting for 1.4?
Holy cow, I forgot I even started this. I'm going to have to take some time to go over all this again.
We should look into the ffmpeg bump before I dig back into this. I may need to adapt patches after the bump.
Rebased on master. Did a couple quick tests of SSA to tx3g and back to SSA encoding. But more testing is needed before calling this good (like some valgrind runs).
Might want to add export to external subtitle file capability to at least the CLI since the capability in in libhb, but that can be a follow-on PR.
If anyone has good samples of tx3g that uses more style or font features, please pass them along and/or do some testing.
Thanks!
Image Subtitles:
- [x] PGS Subtitles MKV
- [x] PGS Subtitles MP4 Burn in
- [x] VobSub Passthru
- [x] VobSub Burnin
Text Subtitles
- [x] MKV, SRT
- [x] MKV, SRT, Burnin
- [x] MP4, SRT
- [ ] MP4, SRT, Burnin (No Output) https://gist.github.com/sr55/3f28e6636ce5c476713bec0befc0add7
Awesome! thanks for the testing. I'll look into that problem with burnin probably thrusday or friday. My day job has me busy this week :wink:
Re-targeting for 1.6.0.
Is there any plan to ship it in the next release ?