Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

Re: LEAD MPEG-4 codecs and Frame Accurate Seeking
Started by skellscape at 10-21-2008 16:40. Topic has 5 replies.

Print Search « Previous Thread Next Thread »
  10-21-2008, 16:40
skellscape is not online. Last active: 10/21/2008 9:32:22 PM skellscape

Not Ranked
Joined on 10-21-2008
Posts 3
LEAD MPEG-4 codecs and Frame Accurate Seeking
Reply Quote
Hi,
I've tested LEAD's MPEG-4 Part 2 decoders to see if they support Frame Accurate Seeking (eg. if you seek the DirectShow graph to Frame N, the first frame that's played through the graph really is Frame N and not the nearest Key Frame).

My preliminary testing suggests that they do not support Frame Accurate Seeking.

But I now wonder if there maybe a problem with my test setup.

Can anyone else confirm this?

Thanks!
   Report 
  10-23-2008, 6:30
Qasem Lubani is not online. Last active: 12/21/2008 9:12:09 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,187
Re: LEAD MPEG-4 codecs and Frame Accurate Seeking
Reply Quote
We do support Frame accurate seeking in our Demultiplexer. You need to make sure that our Demux is the one being used.

A very useful tool when working with DirectShow in general, including our toolkit, is the Microsoft Graph Edit utility. If you don't have it, you can get it from the following post on our forum:
http://support.leadtools.com/SupportPortal/cs/forums/3889/ShowPost.aspx#3889


Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
  10-24-2008, 15:41
skellscape is not online. Last active: 10/21/2008 9:32:22 PM skellscape

Not Ranked
Joined on 10-21-2008
Posts 3
Re: LEAD MPEG-4 codecs and Frame Accurate Seeking
Reply Quote
Thanks for the reply Qasem!

I did some further digging and saw behaviour that I don't understand.

The demultiplexer that is being used appears to be the LEAD ISO Demultiplexer, whose video output pin is followed by the LEAD MPEG4 Decoder (2.0); the audio output pin is followed by the LEAD AAC Decoder.

So it appears that I'm using LEAD's demultiplexer.

My test program for frame accurate seeking calls IMediaSeeking::TimeFormat(TIME_FORMAT_FRAME), then calls IMediaSeeking::SetPositions(F,AbsolutePositioning,F,AbsolutePositioning) to set the stop and start to frame F. I then run the graph. However no frames are pushed through the graph. Note that this works fine with other video codecs I've tested.

I tried modifying the call to IMediaSeeking::SetPositions(F,AbsolutePositioning,F+1,AbsolutePositioning). This worked for F=0, one frame appeared to flow through the graph. But for other values of F, no frames flowed.

I then tried modifying the call to IMediaSeeking::SetPositions(F,AbsolutePositioning,F+2,AbsolutePositioning). For F=0, two frames are generated (with the discontinuity flag being set on the second frame). For other values of F, one frame is generated.

Does anyone have any ideas?

I find this behavior rather odd and unexpected, but maybe I don't understand DirectShow as well as I think I do. :-)

Thanks!
Scott
   Report 
  10-26-2008, 10:04
Qasem Lubani is not online. Last active: 12/21/2008 9:12:09 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,187
Re: LEAD MPEG-4 codecs and Frame Accurate Seeking
Reply Quote
Scott,

Did you try formats other than ISO, such as OGG or MPEG? We have one splitter for OGG and 2 for MPEG
Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
  10-28-2008, 13:54
skellscape is not online. Last active: 10/21/2008 9:32:22 PM skellscape

Not Ranked
Joined on 10-21-2008
Posts 3
Re: LEAD MPEG-4 codecs and Frame Accurate Seeking
Reply Quote
Hi Qasem,
We're not so much interested in OGG right now, so I didn't test that demultiplexer.

We're very much interested in MPEG-2 transport and program streams, and I found similar "goofy" stuff happening with those LEAD demultiplexers, as given below.

MPEG-2 Program Stream
D = duration of stream in frames

Calling IMediaSeeking::SetPositions(i,AbsolutePositioning,i,AbsolutePositioning) and then running the graph produces multiple frames for all i=0,1,2,3,...D-1.
For i=0, 23 identical frames are produced; the frames appear to be decoded correctly.

Calling IMediaSeeking::SetPositions(i,AbsolutePositioning, i, AbsolutePositioning) and then running the graph produces multiple frames for most i=D-7,D-8,D-9,D-10,,,,0
It does not produce a frame for i= D-1,D-2,D-3,D-4,D-5,D-6, and other indices (like D-51,D-52,D-53,...D-69,D-70). For i=298, 23 different frames are produced

Calling IMediaSeeking::SetPositions(i,AbsolutePositioning,i+1,AbsolutePositioning) and then running the graph produces multiple frames for all i=0,1,2,3,...D-1

Calling IMediaSeeking::SetPositions(i-1,AbsolutePositioning, i, AbsolutePositioning) and then running the graph produces multiple frames for most i=D-7,D-8,D-9,D-10,,,,0
It does produce any frames for i= D-1,D-2,D-3,D-4,D-5,D-6, and other indices (like D-51,D-52,D-53,...D-69)


MPEG-2 Transport Stream

Calling IMediaSeeking::SetPositions(i,AbsolutePositioning,i,AbsolutePositioning) and then running the graph produces a frame for all i=0,6,7,..D-1
It does not produce a frame for i=1,2,3,4,5. The frames that are produced are not decoded correctly.

Calling IMediaSeeking::SetPositions(i,AbsolutePositioning,i,AbsolutePositioning) and then running the graph produces a frame for all i=D-1,D-2,D-3,..0
The frames that are produced are not decoded correctly.

Calling IMediaSeeking::SetPositions(i,AbsolutePositioning,i+1,AbsolutePositioning) and then running the graph produces one frame for all i=0,6,7,8...D-1
It does not produce any frames for i=1,2,3,4,5. The frames that are produced are not decoded correctly.

Calling IMediaSeeking::SetPositions(i-1,AbsolutePositioning, i, AbsolutePositioning) and then running the graph produces two frames for all i=D-1,D-2,D-3,D-4,,,,0
The frames that are produced are not decoded correctly.

Thanks,
Scott


   Report 
  10-29-2008, 10:50
Qasem Lubani is not online. Last active: 12/21/2008 9:12:09 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,187
Re: LEAD MPEG-4 codecs and Frame Accurate Seeking
Reply Quote
Scott,


I would like to test this, but I will be doing it using our own multimedia toolkit (based on DirectShow) because I don't have the MS DirectX SDK installed. Do you have sample media files that show the behavior? If yes, can you send them to me and tell me which values to seek in there? You can either post the files here or send them to me to support@leadtools.com. Please add them to a ZIP or RAR file.

Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
Post
LEAD Support Fo... » Enduser » Multimedia Code... » Re: LEAD MPEG-4 codecs and Frame Accurate Seeking

Powered by Community Server, by Telligent Systems