GNOME Bugzilla – Bug 570975
Enable DVD Muxer
Last modified: 2009-03-05 07:55:46 UTC
Hello, I working on a DVD authoring tool[1] that uses GStreamer to produce videos from sets of images. To generate DVD-Video compatible MPEG2 streams that can also be used by dvd-author is necessary to use ffmpeg dvd muxer that is not enabled in gst-ffmpeg. Additionally, two default settings (preload & max_delay) are required by default by the DVD muxer to produce DVD compatible MPEG2. Perhaps you want to consider converting these to caps, but I do not have any use case for these values to be different. Attached you have a patch for review that enables the dvd muxer in gst-ffmpeg. I ask you please to review it and commit to trunk. Thanks, Jordi, jordimash@gmail.com [1] http://code.google.com/p/mistelix/
Created attachment 128238 [details] [review] Proposed patch
Those two settings (preload and max_delay) should be exposed as properties... once we figure out what they actually mean and what their unit is.
Thanks for the feedback. I have reworked the patch following your indications. There are two properties (preload and maxdelay) that set the correspondent fields in the underlying AVFormatContext structure[1] used by ffmpeg libraries. These are units of time expressed in AV_TIME_BASE. Both properties are ints (as in the underlying structure) and I used the same description and types that they have in ffmpeg. Attached you have a new version of the patch. Jordi, [1] http://cekirdek.pardus.org.tr/~ismail/ffmpeg-docs/structAVFormatContext.html
Created attachment 128412 [details] [review] Reworked patch
This patch needs some more work: You need to make sure that the context is already initialized otherwise this will crash. Or better store the properties inside the instance struct and set them in the context whenever the context is created.
Created attachment 129287 [details] [review] Reworked patch Reworked patch following Sebastian indications. Thanks for your feedback
Hm, thinking about it the GObject properties should get a better time unit, like milliseconds or GstClockTime (i.e. nanoseconds) instead of AV_TIME_BASE.
AV_TIME_BASE are equivalent microseconds (10 power of 6). People that has been exposed to ffmpeg is familiar with this. We can: a) Document the unit when we setup the property, specifying clearly the unit expected for the property. b) Convert it to milliseconds or nanoseconds or other time unit. I actually prefer to do a). However, if you think that is more consistant with GStreamer to do b) please detail exactly which unit do you think that is better and it will made the appropriated changed to my patch. Thanks Sebastien Jordi,
The patch committed is the same, except that I specified in the property description that the units were microseconds. commit c7458545f301554d14cbdc04b6b1a216b0719a81 Author: Jordi Mas <jordimash@gmail.com> Date: Thu Mar 5 08:52:11 2009 +0100 gstffmpegmux: Expose the 'preload' and 'maxdelay' properties, add dvd mux mapping. Fixes #570975