View Full Version : DirectShow Frame Accuracy - Alternative codecs
huvar
29th June 2008, 19:09
Hi,
I am developing an app using Directshow to display mp4/h.264 bit streams but I cannot get frame accuracy.
It seems like not every frame number has a corresponding frame and the ones which have are not right.
I am using the gabest mp4spliter and ffdshow but I would like to try different filters. Any suggestions? Namely alternative h.264 codecs...
Thanks!
ToS_Maverick
29th June 2008, 19:13
neuron2's DGIAVCIndex
http://forum.doom9.org/showthread.php?t=122598
huvar
15th September 2008, 19:56
Does it work in DirectShow?
I have a directshow player implemented and no previous experience in Avisynth...
Zarxrax
15th September 2008, 22:46
I think that directshow by it's very nature is not frame accurate.
martino
15th September 2008, 22:54
Haali's avss.dll implements frame-accurate DirectShow. (All I know though is how to load and use it in AviSynth. - dss2())
huvar
16th September 2008, 18:33
Haali's avss.dll implements frame-accurate DirectShow. (All I know though is how to load and use it in AviSynth. - dss2())
I installed and tried using the haali media spliter but got no frame accuracy maybe the problem is in the decoder (ffdshow)? Or maybe that specific dll is diferent than the installed directhow filter?
I think that directshow by it's very nature is not frame accurate.
I tested it using MPEG-1 videos and the filters provided by Microsoft for that type and the seeking was accurate.
I don't know to implement any other kind of displaying video with similar functionality Directshow to be used with mp4/h.264 files. Does anyone have a suggestion?
Ranguvar
16th September 2008, 21:58
DGAVCIndex/DGAVCDecode.
huvar
16th September 2008, 22:12
DGAVCIndex/DGAVCDecode.
These can be used in directshow?
martino
16th September 2008, 22:17
I installed and tried using the haali media spliter but got no frame accuracy maybe the problem is in the decoder (ffdshow)? Or maybe that specific dll is diferent than the installed directhow filter?
Yes. You probably haven't read my post properly.
Ranguvar
16th September 2008, 23:00
These can be used in directshow?
Well, through AviSynth. Install AviSynth, index the video with DGAVCIndex, make an AviSynth script that uses DGAVCDec to load the DGA (and optionally does processing or adds audio), save, play in a DirectShow player.
It's very simple if you want to learn.
Example:
AVCSource("C:\video.dga")
Zwitterion
16th September 2008, 23:12
Haali's avss.dll implements frame-accurate DirectShow. (All I know though is how to load and use it in AviSynth. - dss2())
Whoa! How did I miss this for so long?
There are some problems with it, however (M2TS files from Blu-ray, using Haali's splitter and ffdshow in the graph):
- artifacts when seeking in AVC video. They disappear after a few frames.
- When seeking in VC-1 video, sometimes it shows two or three duplicate frames before continuing in the stream.
- It can't load graph files (This isn't a bug, but it'd be a nice feature).
So you can't rely on perfect picture quality in the first few frames after seeking. But at least you know that it is the right frame unlike with DSS, where sometimes the whole stream gets shifted by a few frames.
huvar
17th September 2008, 02:31
The purpose of the accurate seek is to create a thumbnail of certain frames in a C# app for MP4/AVC videos. I found out that haali + coreavc in the Directshow actually provides exact frame seeking, at least so it seams in preliminary testings. However now I am having troubles using sample grabber on that graph and I don not have an idea about what is causing it.
Comatose
17th September 2008, 12:48
- artifacts when seeking in AVC video. They disappear after a few frames.
Never had this happen to me. Using ffdshow as a decoder? AFAIK it had (has?) trouble with PAFF or MBAFF video or something. Not sure.
Guest
17th September 2008, 14:33
It just means you have seeked to an open GOP. That's the price you pay for frame accuracy. If you suppress the orphaned frames, then you haven't really seeked to the frame number requested. This is why the DG tools back off by one GOP and decode all the frames necessary to correctly decode the seeked-to frame.
poisondeathray
17th September 2008, 15:03
I don't know if this helps, and I don't understand the "mechanics" behind it, but you can use frame accurate seeking/scrubbing (foward/backwards navigation) and take screens through virtualdub with the directshow input driver (has to be activated in the drop down menu when opening the file) + h264 activated in ffdshow + haali media splitter.
It works on most containers and even .ts . I think it has some difficulty with PAFF/MBAFF streams, and it doesn't respect the aspect ratio flags in the container (your screenshot will be the frame aspect ratio)
CruNcher
17th September 2008, 23:43
I think ffdshow libavcodec doesn't support frame accurate seeking i guess only some commercial decoder do like CoreAVC or Mainconcept ? and it seems to be the case since a long time now
saint-francis
18th September 2008, 02:27
FFMpegSource? It still needs indexing like DGAvcDecode but it will do it on the fly where as with DG tools you need to run DGAVCIndex.
Ranguvar
18th September 2008, 02:32
You don't need to index with FFmpegSource, you can disable it :) There's just benefits to doing it. I believe.
EDIT: Well, more accurately, turning off indexing probably just means it will index and "save the file" to RAM instead of the HDD, which will lose the same amount of time, just can't re-use the index file. Nvm :)
huvar
18th September 2008, 03:18
I think ffdshow libavcodec doesn't support frame accurate seeking i guess only some commercial decoder do like CoreAVC or Mainconcept ? and it seems to be the case since a long time now
Thanks!
I got frame accurate seeking using CoreAVC and tha Haali Media Splitter. I never tried it in the past since I had problems extracting snapshots from the graph but now I was able to fix it.
I does not the libavcodec support frame accurate seeking?
martino
18th September 2008, 06:35
Isn't seeking dependant on the splitter and not decoder?
huvar
23rd September 2008, 22:46
I have no idea. From my experience... no. Trading ffdshow for coreAVC provided frame accurate-seek which I could not have with ffdshow.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.