Smooth rewind with Gstreamer

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Smooth rewind with Gstreamer

Daniel Laird
All,

I am trying to get trickmodes working on my Gstreamer pipeline.

I can use gst_element_seek and get FF working i.e I can set rate to 1,2,4,8 etc and my MP4 file plays in FF.
However when I put a negative number I do not get smooth RW behaviour from the qtdemux.  
It seems reverse playback is supported by the component.  

Does anyone have this working and if so am I missing any steps out?  ANy help much appreciated.
I can seek to a specific point and can seek to a point relative to my current position but just cant get rewind to work.

Hope you can help

With regards,
Daniel Laird


------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Smooth rewind with Gstreamer

Julien Moutte-2


Hi,

Are you sure your video decoder supports reverse playback scenario ?

It will receive frames in decoding order, it should queue them
internally and push them in reverse order when it receives an incoming
buffer with the DISCONT flag.

Please also make sure you have a big queue behind the video decoder so
that it can take some advance compared to the rendering element.

Julien Moutte,
FLUENDO S.A.

Daniel James Laird wrote:

> All,
>
> I am trying to get trickmodes working on my Gstreamer pipeline.
>
> I can use gst_element_seek and get FF working i.e I can set rate to 1,2,4,8 etc and my MP4 file plays in FF.
> However when I put a negative number I do not get smooth RW behaviour from the qtdemux.  
> It seems reverse playback is supported by the component.  
>
> Does anyone have this working and if so am I missing any steps out?  ANy help much appreciated.
> I can seek to a specific point and can seek to a point relative to my current position but just cant get rewind to work.
>
> Hope you can help
>
> With regards,
> Daniel Laird
>
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Smooth rewind with Gstreamer

Daniel Laird
Thanks for that,
My second question is If I want key frame only rewind using qtdemux has anyone got that working?

I have tried gst_element_seek with a rate of -2.0 with a start point of the current stream location and an end point of 0

But this does not seem to work, any ideas?

Many thanks
Daniel Laird

-----Original Message-----
From: Julien Moutte [mailto:[hidden email]]
Sent: 2009 Apr 21 17:27
To: Discussion of the development of GStreamer
Subject: Re: [gst-devel] Smooth rewind with Gstreamer



Hi,

Are you sure your video decoder supports reverse playback scenario ?

It will receive frames in decoding order, it should queue them
internally and push them in reverse order when it receives an incoming
buffer with the DISCONT flag.

Please also make sure you have a big queue behind the video decoder so
that it can take some advance compared to the rendering element.

Julien Moutte,
FLUENDO S.A.

Daniel James Laird wrote:

> All,
>
> I am trying to get trickmodes working on my Gstreamer pipeline.
>
> I can use gst_element_seek and get FF working i.e I can set rate to 1,2,4,8 etc and my MP4 file plays in FF.
> However when I put a negative number I do not get smooth RW behaviour from the qtdemux.  
> It seems reverse playback is supported by the component.  
>
> Does anyone have this working and if so am I missing any steps out?  ANy help much appreciated.
> I can seek to a specific point and can seek to a point relative to my current position but just cant get rewind to work.
>
> Hope you can help
>
> With regards,
> Daniel Laird
>
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Smooth rewind with Gstreamer

Julien Moutte-2
You could make your decoder output keyframe only when the segment->rate
is lower than -1.0

Julien Moutte,
FLUENDO S.A.

Daniel James Laird wrote:

> Thanks for that,
> My second question is If I want key frame only rewind using qtdemux has anyone got that working?
>
> I have tried gst_element_seek with a rate of -2.0 with a start point of the current stream location and an end point of 0
>
> But this does not seem to work, any ideas?
>
> Many thanks
> Daniel Laird
>
> -----Original Message-----
> From: Julien Moutte [mailto:[hidden email]]
> Sent: 2009 Apr 21 17:27
> To: Discussion of the development of GStreamer
> Subject: Re: [gst-devel] Smooth rewind with Gstreamer
>
>
>
> Hi,
>
> Are you sure your video decoder supports reverse playback scenario ?
>
> It will receive frames in decoding order, it should queue them
> internally and push them in reverse order when it receives an incoming
> buffer with the DISCONT flag.
>
> Please also make sure you have a big queue behind the video decoder so
> that it can take some advance compared to the rendering element.
>
> Julien Moutte,
> FLUENDO S.A.
>
> Daniel James Laird wrote:
>> All,
>>
>> I am trying to get trickmodes working on my Gstreamer pipeline.
>>
>> I can use gst_element_seek and get FF working i.e I can set rate to 1,2,4,8 etc and my MP4 file plays in FF.
>> However when I put a negative number I do not get smooth RW behaviour from the qtdemux.  
>> It seems reverse playback is supported by the component.  
>>
>> Does anyone have this working and if so am I missing any steps out?  ANy help much appreciated.
>> I can seek to a specific point and can seek to a point relative to my current position but just cant get rewind to work.
>>
>> Hope you can help
>>
>> With regards,
>> Daniel Laird
>>
>>
>> ------------------------------------------------------------------------------
>> Stay on top of everything new and different, both inside and
>> around Java (TM) technology - register by April 22, and save
>> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
>> 300 plus technical and hands-on sessions. Register today.
>> Use priority code J9JMT32. http://p.sf.net/sfu/p
>> _______________________________________________
>> gstreamer-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Smooth rewind with Gstreamer

Daniel Laird
But I have already set the demux (qtdemux) into KEYFRAME only so that should only be giving me KEYFRAMES at the right rate (unless I misunderstand)


With regards,
Daniel Laird

-----Original Message-----
From: Julien Moutte [mailto:[hidden email]]
Sent: 2009 Apr 22 12:53
To: Discussion of the development of GStreamer
Subject: Re: [gst-devel] Smooth rewind with Gstreamer

You could make your decoder output keyframe only when the segment->rate
is lower than -1.0

Julien Moutte,
FLUENDO S.A.

Daniel James Laird wrote:

> Thanks for that,
> My second question is If I want key frame only rewind using qtdemux has anyone got that working?
>
> I have tried gst_element_seek with a rate of -2.0 with a start point of the current stream location and an end point of 0
>
> But this does not seem to work, any ideas?
>
> Many thanks
> Daniel Laird
>
> -----Original Message-----
> From: Julien Moutte [mailto:[hidden email]]
> Sent: 2009 Apr 21 17:27
> To: Discussion of the development of GStreamer
> Subject: Re: [gst-devel] Smooth rewind with Gstreamer
>
>
>
> Hi,
>
> Are you sure your video decoder supports reverse playback scenario ?
>
> It will receive frames in decoding order, it should queue them
> internally and push them in reverse order when it receives an incoming
> buffer with the DISCONT flag.
>
> Please also make sure you have a big queue behind the video decoder so
> that it can take some advance compared to the rendering element.
>
> Julien Moutte,
> FLUENDO S.A.
>
> Daniel James Laird wrote:
>> All,
>>
>> I am trying to get trickmodes working on my Gstreamer pipeline.
>>
>> I can use gst_element_seek and get FF working i.e I can set rate to 1,2,4,8 etc and my MP4 file plays in FF.
>> However when I put a negative number I do not get smooth RW behaviour from the qtdemux.  
>> It seems reverse playback is supported by the component.  
>>
>> Does anyone have this working and if so am I missing any steps out?  ANy help much appreciated.
>> I can seek to a specific point and can seek to a point relative to my current position but just cant get rewind to work.
>>
>> Hope you can help
>>
>> With regards,
>> Daniel Laird
>>
>>
>> ------------------------------------------------------------------------------
>> Stay on top of everything new and different, both inside and
>> around Java (TM) technology - register by April 22, and save
>> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
>> 300 plus technical and hands-on sessions. Register today.
>> Use priority code J9JMT32. http://p.sf.net/sfu/p
>> _______________________________________________
>> gstreamer-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Smooth rewind with Gstreamer

Wim Taymans
Some remarks:

 - Always have a start position smaller than the stop position. For
backwards playback, playback will go from the stop position to start.
>From your description, it does not seem like you do this.

- The KEYUNIT seek flag will make it perform a seek to the nearest
keyframe (earlier) than the requested seek position. It has nothing to
do with further playback.

- If you want keyframe only playback, you could implement the SKIP
seek flag. None of the free demuxers honour this flag yet but it's not
so hard to implement.

Wim

On Wed, Apr 22, 2009 at 2:14 PM, Daniel James Laird
<[hidden email]> wrote:

> But I have already set the demux (qtdemux) into KEYFRAME only so that should only be giving me KEYFRAMES at the right rate (unless I misunderstand)
>
>
> With regards,
> Daniel Laird
>
> -----Original Message-----
> From: Julien Moutte [mailto:[hidden email]]
> Sent: 2009 Apr 22 12:53
> To: Discussion of the development of GStreamer
> Subject: Re: [gst-devel] Smooth rewind with Gstreamer
>
> You could make your decoder output keyframe only when the segment->rate
> is lower than -1.0
>
> Julien Moutte,
> FLUENDO S.A.
>
> Daniel James Laird wrote:
>> Thanks for that,
>> My second question is If I want key frame only rewind using qtdemux has anyone got that working?
>>
>> I have tried gst_element_seek with a rate of -2.0 with a start point of the current stream location and an end point of 0
>>
>> But this does not seem to work, any ideas?
>>
>> Many thanks
>> Daniel Laird
>>
>> -----Original Message-----
>> From: Julien Moutte [mailto:[hidden email]]
>> Sent: 2009 Apr 21 17:27
>> To: Discussion of the development of GStreamer
>> Subject: Re: [gst-devel] Smooth rewind with Gstreamer
>>
>>
>>
>> Hi,
>>
>> Are you sure your video decoder supports reverse playback scenario ?
>>
>> It will receive frames in decoding order, it should queue them
>> internally and push them in reverse order when it receives an incoming
>> buffer with the DISCONT flag.
>>
>> Please also make sure you have a big queue behind the video decoder so
>> that it can take some advance compared to the rendering element.
>>
>> Julien Moutte,
>> FLUENDO S.A.
>>
>> Daniel James Laird wrote:
>>> All,
>>>
>>> I am trying to get trickmodes working on my Gstreamer pipeline.
>>>
>>> I can use gst_element_seek and get FF working i.e I can set rate to 1,2,4,8 etc and my MP4 file plays in FF.
>>> However when I put a negative number I do not get smooth RW behaviour from the qtdemux.
>>> It seems reverse playback is supported by the component.
>>>
>>> Does anyone have this working and if so am I missing any steps out?  ANy help much appreciated.
>>> I can seek to a specific point and can seek to a point relative to my current position but just cant get rewind to work.
>>>
>>> Hope you can help
>>>
>>> With regards,
>>> Daniel Laird
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Stay on top of everything new and different, both inside and
>>> around Java (TM) technology - register by April 22, and save
>>> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
>>> 300 plus technical and hands-on sessions. Register today.
>>> Use priority code J9JMT32. http://p.sf.net/sfu/p
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>
>> ------------------------------------------------------------------------------
>> Stay on top of everything new and different, both inside and
>> around Java (TM) technology - register by April 22, and save
>> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
>> 300 plus technical and hands-on sessions. Register today.
>> Use priority code J9JMT32. http://p.sf.net/sfu/p
>> _______________________________________________
>> gstreamer-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>
>> ------------------------------------------------------------------------------
>> Stay on top of everything new and different, both inside and
>> around Java (TM) technology - register by April 22, and save
>> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
>> 300 plus technical and hands-on sessions. Register today.
>> Use priority code J9JMT32. http://p.sf.net/sfu/p
>> _______________________________________________
>> gstreamer-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel