duration and media-duration in GnlObject
vineeth
nvineeth at gmail.com
Mon Aug 8 00:12:40 PDT 2011
Hi,
Thanks for the clarifications.
On Sat, Aug 6, 2011 at 1:48 PM, Edward Hervey <bilboed at gmail.com> wrote:
> Hi,
>
> On Fri, 2011-08-05 at 17:11 +0530, vineeth wrote:
> > Hi,
> > I wanted to know the difference between "duration" and
> > "media-duration" in GnlObject and I couldn't comprehend this clearly
> > from the documentation.
>
> Duration is for how long something will be played from the outside.
> Media-duration is how long you're taking from the contained media.
>
> 99.99% of the time you want media_duration == duration.
>
> If you want a source to play faster/slower (without any extra cost),
> you can modify those values accordingly.
> Ex : I want to playback an intro video two times slower. That video is
> originally 3s:
> media_duration = 3s
> duration = 6s
>
> The rate is computed from the duration/media_duration values
> automatically, it's just provided as a convenience.
>
> > If I want the Gnl pipeline to render at a faster rate, (but without
> > changing the timestamp of sources) which property should I change? I
> > read that rate is a read-only property.
>
> You can either:
> * Seek with a rate of 0.5 if you just want to play it back slower
> * OR you'll have to modify all the source duration/media_duration
> values accordingly.
>
I was trying a mp4 (with h264) trim on 0.10.32
When the duration was made half of media-duration, I was expecting the
pipeline to run faster, however, I didn't see any significant change in save
time (compared to case where duration and media-duration are same).
for ex:
gst-launch gnlcomposition { gnlfilesource name="s1"
location="/mnt/hgfs/ubuntu_shared/h264/4.mp4" start=0 duration=10000000000
media-start=0 media-duration=10000000000 } ! ffmpegcolorspace ! x264enc !
mp4mux ! filesink location="/mnt/hgfs/ubuntu_shared/output-d-10-md-10.mp4"
Time take : ~41 seconds
gst-launch gnlcomposition { gnlfilesource name="s1"
location=/mnt/hgfs/ubuntu_shared/h264/4.mp4 start=0 duration=5000000000
media-start=0 media-duration=10000000000 } ! ffmpegcolorspace ! x264enc !
mp4mux ! filesink location=/mnt/hgfs/ubuntu_shared/output-d-5-md-10.mp4
Time take : ~41 seconds
Our intention is to speed up the gnl pipeline so that the media content is
saved faster. Is there anything missing / incorrect in the above pipeline?
>
> Edward
>
> > Thanks.
> > --vineeth
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110808/d140145d/attachment.html>
More information about the gstreamer-devel
mailing list