GNOME Bugzilla – Bug 763647
mpegtsmux doesn't keep language code from the incoming audio stream
Last modified: 2016-04-27 02:59:53 UTC
I'm trying to pass audio stream language code from the source mpegts to output mpegts stream. The language code is lost while demuxing-transcoding-muxing process. I traced the problem in the code to the following: in the tsmuxstream.c, line 745 (snip) (which suppose to write descriptor to the pmt table) the language code is simply ignored for audio type ac3 and for other audio types the descriptor not even created. Can anybody look at this problem or what's involved in fixing this part. This is critical for my project to have audio descriptors with the language code. Thanks!
Created attachment 326322 [details] [review] mpegtsmux: write language descriptor when language is available Please check if this fixes your issue. The remaining question I have here is whether the language code should be added only for audio streams or any stream. Also it seems that language assumed to be english when nothing is set from upstream, but this seems like a separate issue. Patch still missing documentation for the new mpegts function, to be added before pushing.
(In reply to Thiago Sousa Santos from comment #1) > Created attachment 326322 [details] [review] [review] > mpegtsmux: write language descriptor when language is available > > Please check if this fixes your issue. > > The remaining question I have here is whether the language code should be > added only for audio streams or any stream. Also it seems that language > assumed to be english when nothing is set from upstream, but this seems like > a separate issue. > > Patch still missing documentation for the new mpegts function, to be added > before pushing. I will check as soon as I get to my setup. Thanks a lot!
(In reply to Thiago Sousa Santos from comment #1) > Created attachment 326322 [details] [review] [review] > mpegtsmux: write language descriptor when language is available > > Please check if this fixes your issue. > > The remaining question I have here is whether the language code should be > added only for audio streams or any stream. Also it seems that language > assumed to be english when nothing is set from upstream, but this seems like > a separate issue. > > Patch still missing documentation for the new mpegts function, to be added > before pushing. I need your help with the verification of the fix. I can't build gstreamer from the source. My project is built on Windows 64 bit platform and I'm using pre-built binaries for Visual Studio solution. I would really appreciate if tyou can send me a patched binaries so I can try them, or instruct me how to obtain them. So far I've examined the changes and I see that this should fix my problem with audio streams. As for the video streams - I don't need them for my project but if it's easy to add support for video streams I don't see why not. If the language is not set currently it shows up as unknown which is perfectly fine. I think in order to handle it better you can let the user to set default language and set the default code when language is not defined for the stream.
Created attachment 326556 [details] [review] mpegtsmux: write language descriptor when language is available New version that only sets the language for audio tracks.
Created attachment 326557 [details] mpegts lib built with the patch
Created attachment 326558 [details] mpegtsmux plugin built with the patch Hopefully those 2 dll can replace your installed versions and it should confirm if the patch fixes the issue.
I've tried 2 dll files from the previous attachment and replace my installed dll's with the patched. gst-inspect-1.0 mpegtsmux was able to show very limited info with the message plugin not loaded. I guess two dll files are not enough. Then I get the whole thing with the cerbero - as a result I was able to build gst-plugins-bad. After that I've tried it with my application and it worked perfect! So please let me know what has to be done to make it to the official source as soon as possible. I need it to be included into windows installer package, no matter if it just experimental or beta. Thanks a lot for your excellent work!
Thanks for confirming, it will be available in the next stable release (1.10) commit 9cc00bf2c9b61236a3d65906ae7dbcb3fb8ef4fe Author: Thiago Santos <thiagoss@osg.samsung.com> Date: Tue Apr 19 10:27:43 2016 -0300 mpegtsmux: write language descriptor when language is available Adds a new function to mpegts lib to create a iso639 language descriptor from a language and use it in mpegtsmux to add a language descriptor to audio streams that have a language set. https://bugzilla.gnome.org/show_bug.cgi?id=763647