lisamelton / other_video_transcoding

Other tools to transcode videos.
MIT License
549 stars 25 forks source link

convert srt to tx3g for mp4 containers #55

Closed vasuvasu closed 3 years ago

vasuvasu commented 4 years ago

when using video-transcode I'd have an mkv input and mp4 output container and when the mkv input had srt subtitles, it'd convert them to the compatible tx3g/ttxt format for the mp4 container.

I'm pretty sure ffmpeg can do this .. can this feature be added to other-transcode?

lisamelton commented 4 years ago

@vasuvasu Do you mean that adding an embedded test-base subtitle from an input MKV file is not working when the transcoded output format is MP4?

vasuvasu commented 4 years ago

@donmelton correct. The input mkv has an embedded srt track and I'd like that carried over into an output mp4. video-transcode/handbrakecli does by converting srt into tx3g/ttxt.

However, other-transcode says subrip isn't compatible with mp4 and then fails.

lisamelton commented 3 years ago

@vasuvasu Sorry it's taking so long, but I am looking at this now.

lisamelton commented 3 years ago

@vasuvasu OK, it looks like outputting the subtitle in mov_text format will set the codec ID to tx3g and do the translation. Next, I need to find out if this works for SSA/ASS format as well as SRT. Stay tuned because this may take awhile. :)

lisamelton commented 3 years ago

@vasuvasu I have a patch now which converts SRT subtitles to MP4-friendly text format. But I'm going to punt on converting SSA/AAS format for the time being. I just don't have enough samples to make sure it will always be handled correctly.

I need to do some more testing, but I'll probably have this checked in by tomorrow.

lisamelton commented 3 years ago

@vasuvasu OK, the patch is now checked in. While I still won't release this and other changes for a few days, you can download it from GitHub and test this yourself in the meantime. Again, my apologies for taking so long to make this change.

lisamelton commented 3 years ago

@vasuvasu OK, this change has now been released as version 0.3.2. Just gem update to get it. Thanks again for all your help!