View Full Version : AVC H.264 Decoder with DirectShow
fabje
26th September 2010, 12:18
Hello,
Currently I'm using DGAVCIndex with Staxrip, but when you are searching for the cut points in a recording at a certain point Staxrip crashes. Also when I have found the correct cutpoints and I start to convert it to and xvid or 720p file it goes very slow, about 40fps.
I noticed when I demux the recording with DGAVCIndex. And then use FFDmpeg in Staxrip and then select back the recording Staxrip doesn't crash but this isn't optimal.
So is there an AVC H.264 Decoder that supports Directshow?
Superb
26th September 2010, 12:28
Didn't really understand the crash/issue you have at the beginning of the post, but to answer your last sentence:
ffdshow (http://ffdshow-tryout.sourceforge.net/) (might want to use trunk builds from www.xvidvideo.ru)
CoreAVC (http://corecodec.com/products/coreavc) (costs $$$)
DiAVC (http://www.di-avc.com/) (costs $$$)
Microsoft DTV-DVD Video Decoder (comes w/ Windows 7)
Reimar
26th September 2010, 14:35
Haven't tried it myself (so do not know if it has some limitations), but there should be one from DivX as well:
http://www.divx.com/en/software/divx-plus/codec-pack
RunningSkittle
26th September 2010, 15:02
Hi, use ffmpegsource instead
fabje
26th September 2010, 17:07
Hi, use ffmpegsource instead
ffmpegsource instead of ffmpeg?
And is it possible to demux an avc recording with ffmpegsource?
LoRd_MuldeR
26th September 2010, 17:21
ffmpegsource instead of ffmpeg?
And is it possible to demux an avc recording with ffmpegsource?
Well, to load H.264 files in your Avisynth script, one option is using DirectShowSource(), which will use whatever DirectShow Splitter+Decoder is installed on your system.
But there are various alternatives to DirectShowSource(). One alternative would be using DGSource/DGDecNV, which is payware. Another alternative is FFmpegSource2 (FFMS2), which is free.
http://code.google.com/p/ffmpegsource/
stax76
26th September 2010, 21:29
@fabje
How StaxRip handles AVC by default depends on the container, all popular source filters are included more or less and can be forced if the default handling don't cut it, you just set the wanted source filter using the context menu before you open a source file or if have such sources very often you customize the default template or create a separate template using this source filter.
fabje
26th September 2010, 23:31
@fabje
How StaxRip handles AVC by default depends on the container, all popular source filters are included more or less and can be forced if the default handling don't cut it, you just set the wanted source filter using the context menu before you open a source file or if have such sources very often you customize the default template or create a separate template using this source filter.
If I select AVC before I load an MPEG4 AVC file and i'm searching for the begin etc most of the time Staxrip will crash with this error.
System.AccessViolationException: Attempt to read or write protected memory. This often indicates that other memory is corrupt.
bij StaxRip.AVIFile.AVIStreamGetFrame(IntPtr pGetFrameObj, Int32 lPos)
in StaxRip.AVIFile.Draw(Graphics g)
in StaxRip.AVIFile.Draw()
in StaxRip.CropForm.TrackLength_Scroll()
in StaxRip.CropForm._Lambda$__32(Object a0, EventArgs a1)
in System.Windows.Forms.TrackBar.OnScroll(EventArgs e)
in System.Windows.Forms.TrackBar.WndProc(Message& m)
in System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
in System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
And I tested my memory over and over again and no errors so it seems like a memory leak, in Avisynth when I'm using DGAVCIndex.
When I use FFmpeg I don't get this error. But FFmpeg doesn't demux the video and audio out of the .ts file. And the ones that I found will demux the audio out of the .ts file but will convert the audio into a .wav file and that is something that I don't want I want to keep the original audio tracks.
stax76
26th September 2010, 23:55
AccessViolationException is usually a bug in a AviSynth filter. I've no personal experience with TS/AVC because I have only 3 HD channels and they all don't broadcast anything I would want to capture and convert. DGDecNV would likely work, ffms2 should also work, it would likely have sync issues, tsmuxer might fix that when remuxing TS, maybe also when demuxing but unfortunately ffms2 cannot read raw AVC. Is demuxing audio important? In case of ffms2 StaxRip would use TS as audio source and decode it, it should also be possible to configure StaxRip to demux but that something advanced. Is your source DVB?
fabje
27th September 2010, 00:05
AccessViolationException is usually a bug in a AviSynth filter. I've no personal experience with TS/AVC because I have only 3 HD channels and they all don't broadcast anything I would want to capture and convert. DGDecNV would likely work, ffms2 should also work, it would likely have sync issues, tsmuxer might fix that when remuxing TS, maybe also when demuxing but unfortunately ffms2 cannot read raw AVC. Is demuxing audio important? In case of ffms2 StaxRip would use TS as audio source and decode it, it should also be possible to configure StaxRip to demux but that something advanced. Is your source DVB?
My source can be the following things: IPTV, Sat or Cable
But everything will be saved in a .ts file.
I was experimenting with FFmpeg but always when the rip is done the audio is always not sync.
I actually don't want to convert the audio because the quality will be lower and I want to keep the audio 1:1.
fabje
27th September 2010, 16:14
I'm trying to get DGIndexNV working (I have a license) but I get an error.
------------------------------------------------------------
DGIndexNV
------------------------------------------------------------
"D:\TOOLS\Staxrip\Settings\Applications\DGDecNV\DGIndexNV.exe" -i "D:\test.ts" -o "D:\test.dgi" -a -e
Preparer: DGIndexNV
Start: 17:25:17
End: 17:26:14
Duration: 00:00:56
------------------------------------------------------------
Source script error
------------------------------------------------------------
DirectShowSource: couldn't open file D:\test.dgi:
Can not play file. The format is not supported.
(D:\test_Source.avs, line 1)
Anyone here that know how I can fix this?
kypec
27th September 2010, 20:14
I don't use Staxrip myself but from your error report it seems that even though the index file (test.dgi) has been created properly,
your Avisynth script is not calling proper source filter which must be DGSource("test.dgi") in this case instead of DirectShowSource("test.dgi").
The latter obviously can't understand .dgi file as such.
stax76
27th September 2010, 20:45
The default demuxing options have a name such as:
------------------------------------------------------------
DGIndexNV - Index MKV without demuxing audio
------------------------------------------------------------
Your demuxing options are different:
------------------------------------------------------------
DGIndexNV
------------------------------------------------------------
I'm suspecting you made a configuration mistake or use an very old StaxRip version, in order to restore the default demuxing options you can click the 'Restore' button.
fabje
27th September 2010, 23:10
The default demuxing options have a name such as:
Your demuxing options are different:
I'm suspecting you made a configuration mistake or use an very old StaxRip version, in order to restore the default demuxing options you can click the 'Restore' button.
I'm using an old version :)
But I can't get it to work everytime I get this error:
DirectShowSource: couldn't open file D:\test.dgi:
Can not play file. The format is not supported.
(D:\test_Source.avs, line 1)
I have this in my filter list:
LoadDGDecodeNV = LoadPlugin("D:\TOOLS\Staxrip\Settings\Applications\DGDecNV\DGDecodeNV.dll")
DGSource = DGSource("%source_file%",deinterlace=0,resize_w=0,resize_h=0)
And a deinterlacer and a cropfilter.
So every time it falls back into DirectShowSource but I want that I is going to use DGSource
stax76
27th September 2010, 23:32
I'm not supporting old versions, actually right now I'm trying to take a StaxRip break.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.