GNOME Bugzilla – Bug 581296
avimux: Support DivX subtitles
Last modified: 2018-11-03 14:39:19 UTC
Seems DivX got a subtitle system for Avi files. Seems to break the AVI specification though so they refer to the new files as divx files. Misc tools generating this format: http://userxp.tripod.com/sub2divx.htm http://projects.gdion.biz/guides/dmfwithxsub.html http://labs.divx.com/DivXMuxGUI There is a SDK with some documentation here: http://download.divx.com/labs/DivXMediaFormat_SDK_r2.rar
http://wiki.multimedia.cx/index.php?title=XSUB
Also note bug #628429 for the decoding part.
Another tool now opensource, Windows only: http://drdivx.svn.sourceforge.net/ Pointing that a xsub track on and avi container is the only way to have non realtime transcoded or hardcoded subtitles in PS3.
Details on the XSUB format here: http://wiki.multimedia.cx/index.php?title=XSUB This format is supported by PS3, so supporting it would improve our ability to generate files for PS3 with subtitles.
I got a WIP patch for avimux that already allows remuxing this file. It plays fine in VLC, but still not on PS3. I can see video and audio on the PS3 and it allows me to select one of the 2 available subtitles, but none show even when selected.
Pushed those 2 patches to properly make avidemux output the subtitles track on the correct pad. commit fd12ff4c29a18de945b97cfc081e5b06df23ebf4 Author: Thiago Santos <ts.santos@sisa.samsung.com> Date: Mon Mar 3 16:39:26 2014 -0300 avidemux: expose xsub as a subtitle instead of as a video It is placed inside a 'vids' struct, so it was being exposed on a pad named video_%d. XSUB are subtitles and this patch adds an special case for it to be exposed in a subpicture_%d pad commit dee861630a64d6c8056b023130298e16e0290f61 Author: Thiago Santos <ts.santos@sisa.samsung.com> Date: Mon Mar 3 16:38:45 2014 -0300 avidemux: do not try to add a tag with tag_name set to NULL This can happen if there are subtitles in the stream, leading to an assertion I also have a patch for muxing xsub into avi that I'll attach here, but there is still one remaining issue. avidemux does a terrible job at timestamping the xsub buffers because this is AVI. I quickly wrote a xsubparse to properly timestamp the buffers because it seemed more useful than inspecing the buffers from xsub inside avidemux to get the correct timestamps. This works, excepts for the patch pushed to fix https://bugzilla.gnome.org/show_bug.cgi?id=707230 that will completely ignore the subclass timestamps in this case and fallback to the original values. This causes the subtitles to be poorly interleaved in the resulting file and the PS3 won't display the subtitles. The lines in question are in baseparse: http://cgit.freedesktop.org/gstreamer/gstreamer/tree/libs/gst/base/gstbaseparse.c#n2084 Not sure what is the correct approach here, do we want to fix this in avidemux or have a parser do it? I think the parser is better because it is modular and can be used separately, but then we need to somehow allow it to timestamp the buffers by modifying baseparse. @christian, We also need to know how do you intend to generate xsub content to mux into avi? Or is this just for remuxing as I don't think we have a xsub encoder atm.
Created attachment 270958 [details] [review] avimux: add support for xsub subtitles
My plan is to support whatever is supported in GStreamer, be that remuxing or re-encoding. I also need subtitle support added to encodebin before I can expose either remuxing or re-encoding of subtitles.
thiagoss, any chance you could refactor this against current master ?
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/13.