[gst-devel] Change Framerate of recorded stream
Wes Miller
wmiller at sdr.com
Wed Aug 25 14:33:51 CEST 2010
Sandeep,
You wrote:
You can use "videorate" plugin to change the framerate. Directly
changing the caps
on the stream will not work.
Wes Miller wrote:
Is it also possible to fix the timestamps so that I can get either
original speed video (at 5 fps)
or fast playback, i.e. after converting to 5 fps, set the timestamps
to play at 25 fps?
Not sure how to achieve this because you (or videorate) would have
discarded the frames already .
I guess we have to change the buffer duration for this.
Would it be correct to create a pipeline program where some pad calls a
have-data callback that:
1) Keeps only every 5th or 7th or whatever frame *returns true) and tosses
the rest (returns false) and
2) Modifies the frame metadata to fix the timestamps to appear "faster" and
modifies the caps to say framerate=5/1 or whatever. I think, in my case,
the jpegs have zero duration, but that might also need to be altered for
non-jpeg frames.
If this would work (I have gotten the keep/discard and timestamp fixes to
work), How would one fix the caps? I know I need them writable and they
fail is_mutabl e assertions if I just try to modify them directly.
The help for modifying caps is a little unclear. Does making a copy of the
caps and derefing the old caps cause the new caps to be added/replaced into
the buffer? Do I need to copy the new caps at the location of the old ones?
Can I just set the old one mutable and "know" that I am modifying the
original caps and not a copy?
Thanks and for your previous help, too, more thanks,,
Wes
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Change-Framerate-of-recorded-stream-tp2336869p2338147.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list