locked
Reverse Playback using custom media source RRS feed

  • Question

  • hi there,

     

    i successfully implemented a custom media source. no i want to support reverse playback. is this done solely by the presentationclock or do i have to provide reverse samples within my IMFMediaStream?

    thanks for the hint ;)

    regards, joachim

    Monday, July 19, 2010 6:29 AM

Answers

  • I haven't done any development which manipulates the presentation clock but the most brutally simple but undesirable way you could go about it could be:

    -Start at the end of the file, decode the frames in a forward manner(i.e. feed the 2nd last keyframe in first then all the encoded frames through to the last keyframe)

    -buffer the decoded frames then reverse the order they are delivered to the EVR presenter

    -Go to the 3rd last keyframe and decode through to the second last. Repeat the step above.

    -Repeat the backwards seeking until you reach the start of the media.

    You will need to create a custom topology to perform this proceedure where an MFT is used in the pipeline to buffer, reverse frame order and modify the sample timecode.

    Wednesday, July 21, 2010 2:04 AM
  • When running at negative rates, the presentation clock flows backwards.  For the source to support reverse playback, it must supply samples in reverse order (descending timestamps).  Most MF components do not do a good job of handling smooth reverse right now, so media sources typically only support thinned reverse with keyframes only. 
    Wednesday, August 25, 2010 1:29 AM

All replies

  • I haven't done any development which manipulates the presentation clock but the most brutally simple but undesirable way you could go about it could be:

    -Start at the end of the file, decode the frames in a forward manner(i.e. feed the 2nd last keyframe in first then all the encoded frames through to the last keyframe)

    -buffer the decoded frames then reverse the order they are delivered to the EVR presenter

    -Go to the 3rd last keyframe and decode through to the second last. Repeat the step above.

    -Repeat the backwards seeking until you reach the start of the media.

    You will need to create a custom topology to perform this proceedure where an MFT is used in the pipeline to buffer, reverse frame order and modify the sample timecode.

    Wednesday, July 21, 2010 2:04 AM
  • When running at negative rates, the presentation clock flows backwards.  For the source to support reverse playback, it must supply samples in reverse order (descending timestamps).  Most MF components do not do a good job of handling smooth reverse right now, so media sources typically only support thinned reverse with keyframes only. 
    Wednesday, August 25, 2010 1:29 AM