GNOME Bugzilla – Bug 541215
[avimux] Dirac muxing is broken and results in A/V sync issues
Last modified: 2011-06-15 22:43:35 UTC
I muxed an AVI file containing dirac video and mp3 audio as follows (via makefile): #multiplex the .drc and audio into an AVI container %.avi: %.drc $(AINPUT) gst-launch avimux name=mux ! filesink location=$@ \ filesrc location=$< ! \ schroparse ! \ queue ! \ mux. \ filesrc location=$(AINPUT) ! \ flacdec ! \ audioconvert ! \ lame ! \ queue ! \ mux. The resulting AVI file plays in totem and maintains A/V sync if the file plays from the start. Seeking through the file results in complete loss of A/V sync, but both tracks continue to play. I'm using recent, but not latest HEAD CVS.
This is likely due avimux not grouping together dirac packets into picture units. That is, it puts sequence headers and other stuff into separate AVI frames, which throws off seek sync.
Created attachment 114695 [details] [review] Reparse Dirac streams into appropriate chunks for AVI.
Looks good but maybe add a comment why this is needed and what parse_code & 0x08 is so people don't need to look into the Dirac spec just for this ;)
+ guint8 *buffer_data = GST_BUFFER_DATA(data); + + parse_code = buffer_data[4]; + This bit looks like an unchecked array access, unless it's checking the buffer size somewhere earlier?
I want to make pre-releases, and ds is still sleeping -> let's put this in the 2nd pre-release tarball in a few days.
I want to withdraw this patch anyway. It's only partially correct, and I'd rather implement the strategy I talked about on the mailing list a few days ago.
OK - that sounds a bit more long term than this release.
David: ping?
Ping²?
Hm. David, is that still an issue? I'd close this bug if there's no activity soonish.
Yes, it's still a bug. But I have very little interest in making anything related to AVI work.
This should be marked as being a gst-plugins-good issue.
> Yes, it's still a bug. But I have very little interest in making anything > related to AVI work. Why did you make avimux support diract then? (commit 1a90a6c4) Maybe we should just revert that if it's broken and/or we're not willing to support it.
Should Dirac in AVI be disabled? It is probably a quite obscure feature anyway and if nobody really wants to work on it we should just remove it.
commit 0a67d131b988e7db5192c6b808020424298dde8b Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Fri May 27 09:17:46 2011 +0200 avimux: Revert 1a90a6c4 and drop Dirac support again It does not work at all (A/V sync issues), is not very useful, other containers work much better with Dirac and Dirac in AVI is not supported by other software. Fixes bug #541215.