Re: Using GetNextSample/WriteStreamSample to cut from a wmv file

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



From: "Dazster"

Thanks for that explanation - it would certainly explain
the behaviour I have been seeing. I'm interested to know
more about your suggestion of "re-encoding the video in
between the first 2 keyframes". Can you describe what
this would achieve and do you have some sample code that
I could use for this?

If frame F is a delta frame in between keyframes K1 and K2,
it is not possible to cut more precisely than on K1 or K2
without re-encoding the sequence. If you need frame-precise
cutting, you need to decode the frames from K1 up to K2 - 1
and re-encode the ones from F to K2 - 1, throwing out the
ones from K1 to F - 1. You can do that by re-encoding the
whole clip or by re-encoding only the minimum number of
frames (much faster and with a minimal generational quality
loss).

--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm


.



Relevant Pages

  • Re: Using GetNextSample/WriteStreamSample to cut from a wmv file
    ... "re-encoding the video in between the first 2 keyframes". ... while the audio is cut by the correct amount at the ...
    (microsoft.public.windowsmedia.sdk)
  • Re: Why Re-encode?
    ... Essential video software programs for making digital videos: ... >> gave me a burnable folder. ... >> Are there other authoring programs which allow NOT re-encoding? ... > Since DVD Lab doesn't encode, ...
    (rec.video.desktop)
  • Re: Why Re-encode?
    ... Essential video software programs for making digital videos: ... >> gave me a burnable folder. ... >> Are there other authoring programs which allow NOT re-encoding? ... > Since DVD Lab doesn't encode, ...
    (rec.video.desktop)
  • Re: STOIK wmv to avi Problem
    ... It appears the program is re-encoding the video. ... format might be just as good as anything, ... how Quicktime fits into this. ...
    (rec.video.desktop)
  • Re: Subtitles in AppleTV take 2
    ... re-encoding the video and have them "burnt in")? ... entire video track with the subtitle "rendered" on top of it. ... italian subtitles to some other videos ...
    (comp.sys.mac.advocacy)