After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 651805 - [mpegtsmux] Add a property for aligned output
[mpegtsmux] Add a property for aligned output
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal enhancement
: 0.10.24
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 583875
 
 
Reported: 2011-06-03 18:53 UTC by Andreas Frisch
Modified: 2012-06-08 09:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
introduce an aligner plugin which can insert padding at the end of streams if they need to fit certain sector alignment specs. Fixes bug #651805 (17.36 KB, patch)
2011-06-03 18:55 UTC, Andreas Frisch
none Details | Review
[mpegtsmux] introduce an alignment property which specifies the amount of ts or m2ts packets, that buffers must contain before they are pushed. On EOS, dummy packets are generated and used for padding (9.41 KB, patch)
2011-06-06 13:10 UTC, Andreas Frisch
none Details | Review
patch to implement alignment property to mpegtsmux (10.18 KB, patch)
2011-06-09 18:49 UTC, Andreas Frisch
none Details | Review
[mpegtsmux] introduce an alignment property (9.23 KB, patch)
2011-09-17 21:36 UTC, Andreas Frisch
none Details | Review

Description Andreas Frisch 2011-06-03 18:53:15 UTC
use case is bluray authoring where streams have to be aligned to logical units of 6144 bytes each.
standard operation zeropads the last buffer until the desired sector alignment is reached.
m2tsmode will take the very last actual packet's m2ts header and ts contiuity count and generate mpeg compliant dummy packets (with adaptation field) up to the desired sector length.
Comment 1 Andreas Frisch 2011-06-03 18:55:58 UTC
Created attachment 189176 [details] [review]
introduce an aligner plugin which can insert padding at the end of streams if they need to fit certain sector alignment specs. Fixes bug #651805
Comment 2 David Schleef 2011-06-04 01:24:32 UTC
Edward, could you comment on why you didn't want this as part of mpegtsmux?  Seems like a logical extension of m2ts-mode, and would fit right in to what encodebin would want to generate a file for *mumble* device.
Comment 3 Edward Hervey 2011-06-04 09:49:38 UTC
If we can make the difference between avchd and bluray variants in mpegtsmux, then I'd be fine with:
* Adding a property with specifies in chunks of how many mpegts packets we output (ex: 32 packets of {192|188} bytes). It should buffer up and push out buffers containing that many packets.
* Have the default be deactivated (0?) for all variants (like current behaviour), except for the bluray variant where it would default to 32.

On EOS, it should push out everything with 0x1fff pid buffers (i.e. null buffers).

As far as I can tell only bluray (and not AVCHD) requires that.
Comment 4 Andreas Frisch 2011-06-06 13:10:13 UTC
Created attachment 189321 [details] [review]
[mpegtsmux] introduce an alignment property which specifies the amount of ts or m2ts packets, that buffers must contain before they are pushed. On EOS, dummy packets are generated and used for padding
Comment 5 Andreas Frisch 2011-06-06 13:11:46 UTC
...used for padding until the final buffer is also aligned. With a value of 32 given, this allows creating blu-ray compliant streams. Fixes bug #651805


this is a new approach to fixing the issue without a seperate plugin but rather inside mpegtsmux.
Comment 6 Andreas Frisch 2011-06-06 13:22:47 UTC
bilboed, did you want the 32-packet-alignment to automatically be the default if m2ts-mode is TRUE? how would I express that textwise in the property description?
Comment 7 Edward Hervey 2011-06-08 17:22:31 UTC
"Default: unused for non-m2ts streams, else 32"
Comment 8 Andreas Frisch 2011-06-09 18:49:19 UTC
Created attachment 189573 [details] [review]
patch to implement alignment property to mpegtsmux

[mpegtsmux] introduce an alignment property which specifies the amount of packets, that buffers must contain before they are pushed. On EOS, dummy packets are generated and used for padding until the final buffer is also aligned. With a value of 32 given, this allows creating blu-ray compliant streams.
Comment 9 Andreas Frisch 2011-09-17 21:36:45 UTC
Created attachment 196836 [details] [review]
[mpegtsmux] introduce an alignment property

with this new patch, i don't re-overwrite the eventfunc (which is actually needed by collectpads, thanks for that info, david!)
Comment 10 Sebastian Dröge (slomo) 2011-09-19 08:14:00 UTC
Instead of a property I think it would be better to negotiate the alignment (and m2ts mode or other mode) via caps. That's handled in bug #583875 and should be fixed together with this one here IMHO
Comment 11 Mark Nauwelaerts 2012-06-08 09:27:53 UTC
Following commit should arrange for (a.o.) aligned output as described here.

While I agree it could be handled differently than with a property, there still seems to be a lot that is not clear/decided yet in bug #583875 (and missing specs, etc).

So at least this way the functionality is in place already.

commit 83ebf61b7a87ad7150269f2cb48791003b8d7d9e
Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Date:   Thu Jun 7 17:38:51 2012 +0200

    mpegtsmux: allow for aligned output
    
    ... and refactor packet handling some more in the process.
    
    Fixes #651805.