Adding SRT subtitles to a Humax video file

andyk

Member
I have a script to convert an iPlayer download to a Humax file set i.e. remux to (M2)TS, generate NTS with sidecar, setup metadata with hmt. I thought I would improve this by muxing in the subtitles (SRT) as DVBsub. However, I've not yet managed to find any way to do this with any combination of the tools I have available viz ffmpeg, vlc, videoredo, subtitleedit, tsmuxer.

The nearest I get is to is to take the tsmuxer output with the subtitles in PGS format and use ffmpeg to remux with the subtitles converted to DVBsub. However ffmpeg reports that both audio and subtitles are “muxed as a private data stream and may not be recognized upon reading.” Ffplay can play all of video, audio and subtitles. VLC renders video and subtitles, but not the audio. The Humax plays the video with no sound, and the subtitles can be switched on, but don’t render.

Both ffprobe and mediainfo report identical attributes for the subtitle stream, apart from start pts.

Ffmpeg while processing the file produced by tsmuxer reports for example ‘cur_dts is invalid st:X’ for both X=1 (audio) and X=2 (subs), but no other obvious errors.

Anyone got any ideas for either persuading ffmpeg to do better e.g. not muxing as private data stream, or some other approach?
 
Thanks for your reply. I'm well aware of the issues discussed in that thread. Unfortunately it sheds no light on the generation of DVB subtitles for inclusion in an (M2)TS file.

Discussion of the HMT, sidecar and migrate utilities is in this forum, which is why I chose to post here. This topic is closely related to Convert mp4 files to m2ts with ffmpeg for example. However it looks as though the expertise in this area is seeping away. There is always plan B - remove the HTML stuff from the BBC srt files and put those in as an extra sidecar file - the Humax will render them via an Opt+ menu option.
 
Thanks for that.

So it looks like massaging SRT files is the only game in town. ☹️

Interesting there is no straightforward way of creating and muxing in a DVBSUB stream to get a self-contained transport stream file the Humax can play.
 
Interesting there is no straightforward way of creating and muxing in a DVBSUB stream to get a self-contained transport stream file the Humax can play.
Perhaps you don't understand the situation (as elucidated in the thread I indicated): the subtitles stream in DVB is a video overlay, not text. That means, to create a DVB-similar .ts containing subtitles, the .srt would have to be rendered into video.
 
Surely DVBSUB is a disaster that only exists because DVD players and DVB decoders couldn't be trusted to render character sets properly?

How much better if someone had invented UTF-8 in 1995. In fact, why didn't I do it?

But I agree that it is disappointing that ffmpeg doesn't succeed in multiplexing the only in-stream subtitle format understood by the Humax player ( ). It doesn't seem unreasonable to be able to turn text into image, given that the necessary libraries are optional components of the ffmpeg build.
 
the subtitles stream in DVB is a video overlay, not text
I understand only too well. The issue is saving the rendered pictures of the subtitles into a transport stream. TsMuxer will do this, but the subtitle images are saved in PGS format (the format you find on BluRay in M2TS files).
DVD players and DVB decoders couldn't be trusted to render character sets properly
There are other plus points for the material producer being responsible for the rendering e.g. positioning of the subtitle data on the screen according to the material, the posibility of animation and the like, less processing power needed and so on. The effort of translation is probably going to go with the effort of producing material for a particular market, so is probably best managed at that country level. Requiring players to have to deal with the complete Unicode character set, rather than carrying the necessary stuff on the media, probably didn't look very attractive too.

The irritating thing is that ffmpeg will transform PGS subtitles (as generated by TsMuxer) and maybe VOBSUB/IDX images too (various subtitle editors can produce these) into DVB subtitles, but won't apparently package them in a way the Humax can understand.

VLC which offers transcoding, and seems to be capable of generating a DVB TS stream with subtitles which can be streamed over the network won't save the subtitle stream when asked to mux to a file. All very unsatisfactory.

I had a hope that someone with a Humax might have cracked the problem, with some combination of tools/parameters, but I guess not
 
Not a solution to OP question as my use case differs.
I don't keep downloaded files for long (eg delete after watching) - so I leave them in mp4 format and download a paired SRT subtitles file. https://wiki.hummy.tv/wiki/Custom_Firmware_Package_Notes#SRT
For BBC iPlayer TTML subtitles, I'll convert them to SRT if needed.
It's not as nice/complete as having Humax video files, but sufficient for basic viewing with subtitles - might suit some.
 
Back
Top