Log in

View Full Version : DGAVCDec 1.0.9


Pages : [1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39

Guest
23rd February 2007, 01:45
I have created an Avisynth source filter for AVC/H.264 streams. I would appreciate feedback and suggestions for the most important features to add. At this point it is fast and reliable but limited in functionality. I need your guidance to prioritize future work. I also ask to be notified about any streams that are problematic with DGAVCDec.

Please read the help file carefully, especially the part about DLL loading.

Thanks to Michael Niedermayer for helping me to understand low-level accessing of libavcodec.

Guest
23rd February 2007, 03:06
I had a bad version up there for a while. If you get a stack overflow, please re-download.

Why do people make streams with 500-frame GOPs? :)

akupenguin
23rd February 2007, 03:47
Because they don't seek very often, so a fraction of a % bitrate is worth adding a few cpu-seconds to the seek cost.
Because movies have some 500-frame scenes, and it looks bad to put an I-frame in the middle of a scene (if the encode isn't already transparent quality).

cacepi
23rd February 2007, 03:57
Please read the help file carefully, especially the part about DLL loading.
Avisynth open failure:
LoadPlugin: Unable to load "C:\Program Files\AviSynth\plugins\DGAVCDecode.dll"

AviSynth script (2.5.7) on Windows XP SP2:

LoadPlugin("C:\Program Files\AviSynth\plugins\DGAVCDecode.dll")

AVCSource("C:\Projects\Test\07OP_track1.dga")

All the dlls are under AviSynth's load path, and commenting out LoadPlugin() gives the same error message. Directly loading all the dlls in the script don't seem to help either. What am I doing wrong?

check
23rd February 2007, 05:15
It seems to break when the path length is >256chars :)

Very nice plugin though, I am looking forward to using it for real encodes :)

Hans Ohlo
23rd February 2007, 13:27
if it is based on libavcodec, paff decoding is not implemented (just mentioning this).

Guest
23rd February 2007, 14:25
Avisynth open failure:
LoadPlugin: Unable to load "C:\Program Files\AviSynth\plugins\DGAVCDecode.dll"

AviSynth script (2.5.7) on Windows XP SP2:

LoadPlugin("C:\Program Files\AviSynth\plugins\DGAVCDecode.dll")

AVCSource("C:\Projects\Test\07OP_track1.dga")

All the dlls are under AviSynth's load path, and commenting out LoadPlugin() gives the same error message. Directly loading all the dlls in the script don't seem to help either. What am I doing wrong? I don't know what you mean by "Avisynth's load path". You have to follow Windows DLL loading rules. Try putting them in the same directory as DGAVCDecode.dll or even Windows/System32.

You can't load these DLLs with LoadPlugin.

Guest
23rd February 2007, 14:27
It seems to break when the path length is >256chars :) Stupid Windows Platform SDK. I'll fix that. Thank you for pointing it out.

holzi
23rd February 2007, 14:37
the plugin loaded once for me then I too get can't load plugin.
And I seem to have decoding problems. I think or I did mess up with mkvextract or I hit a b-frame or something not that good in this stuff :)
Anyway it's a x264 encoding so some features of x264 are not implementet in libavcodec yet or something
http://img242.imageshack.us/img242/8461/avcsoucegs6.th.jpg (http://img242.imageshack.us/my.php?image=avcsoucegs6.jpg)

Edit ok just checked using DirectShowSource and that decodes fine. So I guess it's a decoding problem.
Runtine is wrong too.

http://img242.imageshack.us/img242/9233/directshowfo8.th.jpg (http://img242.imageshack.us/my.php?image=directshowfo8.jpg)

Guest
23rd February 2007, 14:44
the plugin loaded once for me then I too get can't load plugin. Where did you put the DLLs and where did you put the plugin itself?

And I seem to have decoding problems. Please post a link to a fragment of the .264 stream.

holzi
23rd February 2007, 14:54
Where did you put the DLLs and where did you put the plugin itself?

Please post a link to a fragment of the .264 stream.

I put everything in the avisynth plugin directory.

http://archiv.to/?Module=Details&HashID=FILE45DF328C22BB7
I don't know how to split raw x264 files. So I uploaded a mkv. I guess mkvextract just dosn't extract it right or something. But I don't know anything else right now do extract the video stream.

unskinnyboy
23rd February 2007, 14:58
Great stuff, DG! Works fine with the test files supplied. Will test with other stuff later and report bugs, if any. :thanks:

Guest
23rd February 2007, 15:04
I put everything in the avisynth plugin directory. Take them out of there and put them in /Windows/System32. In the next beta, I will improve things in that regard.

I'm uploading a sample right now. Thank you.

Guest
23rd February 2007, 15:07
http://archiv.to/?Module=Details&HashID=FILE45DF328C22BB7
I don't know how to split raw x264 files. So I uploaded a mkv. I guess mkvextract just dosn't extract it right or something. But I don't know anything else right now do extract the video stream. I don't have mkvextract. But I don't get it...if you can upload the MKV, why can't you upload the 264 extracted from it?

holzi
23rd February 2007, 15:10
I don't have mkvextract. But I don't get it...if you can upload the MKV, why can't you upload the 264 extracted from it?

The orginal is 50MB that's a little to big.
Give me a hint how to make a segment of the x264.
And I will upload that too

Guest
23rd February 2007, 15:11
Can't you just extract the 264 from the MKV you uploaded?

holzi
23rd February 2007, 15:15
har har of cause I can :) Should get some sleep :)
Just one moment:
Here you go: http://archiv.to/?Module=Details&HashID=FILE45DF3796A66A0

Zarxrax
23rd February 2007, 15:19
neuron2, I love you :D
I'll start testing this a lot this weekend!

Guest
23rd February 2007, 15:29
har har of cause I can Thanks. I have it and have duplicated the issue. Obviously, I haven't done all my homework on H.264. I don't know why the DGA file shows multiple pictures with the same POC. I'll review the H.264 specs and try to figure this out tonight.

EDIT: Had a quick look but have to go to work now. There are SEI NALUs before each picture slice. My implementation doesn't inject the SEIs into the decoder. I assume that is the problem and it can be fixed easily. I'll be curious tonight to see what is in those SEIs.

Kurth
23rd February 2007, 20:00
Well I copied the files:

avcodec-51.dll, avformat-51.dll and avutil-49.dll to C:\windows\system32

DGAVCDecode.dll to C:\Program Files\AviSynth 2.5\plugins

And the plugin load without any problems.

But I got some problems with files that dont have a MOD 16 resolution and files that was encoded with more than 1 slice.

Video with non mod 16 resolution
http://img152.imageshack.us/img152/1587/video01bh7.jpg

Video decoding error with AVCSource on a non mod 16 resolution
http://img152.imageshack.us/img152/2619/error01rw9.jpg

Raw 264 file download of the non mod 16 resolution file
http://www.mytempdir.com/1228817

Video encoded with two slices
http://img152.imageshack.us/img152/104/video02vh7.jpg

Video decoding error with AVCSource on a file encoded with two slices
http://img81.imageshack.us/img81/2011/error02do9.jpg

Raw 264 file download of the file encoded with two slices
http://www.mytempdir.com/1228821

Thank you very much for this AVCSource filter it is really more fast to decode H264 streams than using DirectShowSource. This filter just need some little fixes to work perfectly ^_^

Guest
23rd February 2007, 20:24
@Kurth

Thank you for the problematic streams. That is just what I need to iron out the wrinkles. I have only x264-generated streams to work with until now. They all worked fine. I will fix this for future releases.

guada2
23rd February 2007, 20:45
@neuron2

Great work.
But i don't have real index as your demo with sonic cinevision.


Just that:
DGAVCIndexFile1

C:\Documents and Settings\Administrateur\Mes documents\CineVision Encodes\untitled1.264

SPS 6
FPS 50000 / 2000
PPS 67
SIZ 720 x 576
IDR 117 0
PPS 749843
PPS 1499831 and etc..........

Thanks.

MatMaul
23rd February 2007, 20:52
Seems to do not work with mbaff streams :
http://www.mytempdir.com/1228896
http://www.mytempdir.com/1228934
The playback simply doesn't begin.

I can play this streams with mplayer.

Guest
23rd February 2007, 21:43
But i don't have real index as your demo with sonic cinevision To help you, I need the 264 stream. Thank you.

tomos
23rd February 2007, 21:49
is there a way to check if the video is mbaff or not?

the first i have tried doesnt work for me. (raw 264 demuxed via mplayer from TS)

i tried the test file supplied with dgavc and the raw file. both are accepted and indexed with no probs at all.

i have 2 files, raw.dga and test.dga

with the same avs script:

AVCSource("whatever.dga")

the test works fine in vdub, but the demuxed video gives errors saying it cant load the dll file - DGAVCDecode.dll

then i try again and all of a sudden it loads in vdub. but if i move forward one frame forward then vdub closed itself down instantly. no errors, just gone. same if i drop the avs onto mpc.

i will try other files and test them

Guest
23rd February 2007, 21:55
@tomos

We are in a mode of fixing support for different streams. So you have to give me the streams if you want them to be supported. I can't wave a magic wand; I have to analyze the stream to see what features I am missing.

Regarding the DLL loading, please take them (but not DGAVCDecode.dll!) out of your Avisynth plugins folder (or whatever) and put them into /Windows/System32 as I said in an earlier post.

MeteorRain
24th February 2007, 15:50
Fantastic works!

Well btw, is it about to support index and read avc-in-mp4?

tomos
24th February 2007, 15:51
sample 1 (this indexes ok but crashes MPC/vdub etc)

http://www.mytempdir.com/1229927

sample 2 (this also indexes fine but shows as 0 frames in vdub - there's over a 1000 in the sample)

http://www.mytempdir.com/1229952

unskinnyboy
24th February 2007, 16:01
I did some poking around. DGAVCDEC was able to index the raw AVC stream of a full length movie encode just fine. I muxed the same stream into different containers and tried those next. The AVI one also got indexed fine, but I faced problems with the MP4 and the MKV one. For MKV, I get an 'undefined level' and the MP4 just crashes DGAVCDEC kicking off the Dr. Watson debugger. Not sure if you wanted a sample?

Looks like the SPS, PPS, IDR values are container dependent because they are different in the dga files of the raw AVC and the AVC in AVI one. But both decoded just fine.

bob0r
24th February 2007, 16:11
http://x264.nl/h.264.samples/

Many different satellite streams, all H.264.
If all those work, we are finally getting somewhere with H.264

Hopefully, unlike mkvtoolnix, 10+GB files are not a problem with this filter.


Time i have not, bandwidth i have..... enjoy testing :p

bond
24th February 2007, 17:13
Fantastic works!

Well btw, is it about to support index and read avc-in-mp4?i dont think its necessary to index mp4, as mp4 has an index

Guest
24th February 2007, 17:15
@MeteorRain

Of course! But you have to walk before you can run.

@bond

The idea is to support the container so that demuxing is not required.

@tomos

Thank you. Your streams are in the hopper for analysis.

@unskinnyoby

As stated in the help file, only ES is currently supported.

@bob0r

Thank you. I will test those streams.

@all

I have enough streams to fix for now. Please defer further reports until the next beta.

leiming2006
25th February 2007, 06:11
This filter didn't work well here.

this is avs script:

fs="F:\11.dga"
loadplugin("d:\avs\DGAVCDecode.dll")
avcsource(fs)

and this is the error:
http://img246.imageshack.us/img246/6516/untitledgt9.jpg (http://imageshack.us)

Guest
25th February 2007, 14:23
It's not finding the DLLs. Please read this thread carefully.

guada2
25th February 2007, 14:51
@neuron2
If that can help you

a new encode, index result:

DGAVCIndexFile1

C:\Documents and Settings\Administrateur\Mes documents\CineVision Encodes\untitled2_HD DVD.264

SPS 6
FPS 50000 / 2000
PPS 67
SIZ 720 x 576
IDR 118 0
IDR 10585 0
IDR 32544 0
IDR 63175 0
PPS 913983 3 3 3
PPS 1505271 1 1 1
PPS 1539872 2 2 2
PPS 1738726 6 6 6
PPS 2152264 4 4 4
PPS 2250865 5 5 5
PPS 2353539 9 9 9
PPS 2776117 7 7 7
PPS 2882828 8 8 8
PPS 30227811 11 11 11
PPS 33899610 10 10 10
SPS 348139
PPS 348200
IDR 348250 0
IDR 359262 0
IDR 384369 0
IDR 418322 0
PPS 4456923 3 3 3
PPS 4883971 1 1 1
PPS 5014982 2 2 2
PPS 5164846 6 6 6
PPS 5604724 4 4 4
PPS 5719815 5 5 5
PPS 5850789 9 9 9
PPS 6320897 7 7 7
PPS 6440878 8 8 8
PPS 65776211 11 11 11
PPS 70308510 10 10 10 etc.....

for more informations:
look at this link: http://profile.imageshack.us/prefs/index.php
(if there is no reaction, use Google).

orbitlee
25th February 2007, 16:19
@neuron2:

Thanks for the effort.
I don't know whether you have already received any samples from BBC HD, but the fact is, there is no IDR frame in BBC HD at all. I'll send sample if you want.

Guest
25th February 2007, 17:55
Thank you. I'll ask for it later. I have my hands full right now fixing issues with libavcodec.

Blue_MiSfit
25th February 2007, 23:45
Thanks neuron2!

Amazing results, I get between 80fps (for complex scenes) and 130fps (for black and credits etc) decoding speed, compared to 60-110fps for directshowsource("F:\Movies\The Departed.mkv", fps=23.976, convertfps=true), which uses haali's splitter, and ffdshow for decoding.

Note that my source was made by x264, it's high profile with CABAC, 704x352, 4 references, default matrix. My most recent backup actually, which I was very VERY happy with the results... I was able to improve image quality over the source with some gentle denoising and sharpening - AND reduce the file size by about 75% (2.2 GB vs ~9GB)

Impressive results! Of course, the added time to demux and index sort of negates any advantage this might present, but I'm always happy to not use DirectShow!

A welcome addition to our swiss army frameserver :D

~MiSfit

Sgt_Strider
25th February 2007, 23:57
Please excuse my stupidity, but what is this filter for?

Guest
26th February 2007, 00:06
Of course, the added time to demux and index sort of negates any advantage this might present, but I'm always happy to not use DirectShow! DGAVCIndex will of course have a preview like DGIndex and it will accept the container formats directly. Right now, I am getting the decoding correct. There are some problems with the interface to libavcodec, but Michael and I are working them out.

Thank you for your test results.

leiming2006
26th February 2007, 07:02
wonderful filter!~
it works quite well this time.
thanks.
not only the .264 file in package, my own .264 file (encoded by x264) is read successfully.

Guest
26th February 2007, 15:11
Please excuse my stupidity, but what is this filter for? It is intended to not only be faster than typical DirectShow filters invokable by DirectShowSource(), but also to implement random access (seeking) in a fully correct way, something that the DirectShow filters tend to be very weak at. Also, when mature, the toolset will offer useful features such as those already available for MPEG1/2 in DGMPGDec.

Ask yourself why most people choose DGDecode for DVD processing rather than DirectShowSource().

guada2
26th February 2007, 22:47
orbitlee,

I don't know whether you have already received any samples from BBC HD, but the fact is, there is no IDR frame in BBC HD at all. I'll send sample if you want.

there is no IDR frame in BBC HD at all.

Interesting to know that, But why and why not (specific to BBC or all Great Channel) ???

Please, Could you precise more?
:thanks:

Blue_MiSfit
27th February 2007, 04:07
DGAVCIndex will of course have a preview like DGIndex and it will accept the container formats directly. Right now, I am getting the decoding correct. There are some problems with the interface to libavcodec, but Michael and I are working them out.

Thank you for your test results.

No problem! I look forward to a full-on DGIndex work-alike :D

~MiSfit

orbitlee
27th February 2007, 04:26
orbitlee,



there is no IDR frame in BBC HD at all.

Interesting to know that, But why and why not (specific to BBC or all Great Channel) ???

Please, Could you precise more?
:thanks:


It's just an observation, I don't know why streams from BBC don't have IDR too. Verified for about 5-6 clips(all I have) from BBC.
No idea how to precise more. Any way, I will upload the sample and post the link at here later.

guada2
27th February 2007, 13:57
OK orbitlee.

Any way, I will upload the sample and post the link at here later.

Thanks.

kraftfahrer
27th February 2007, 20:16
Source ts (Astra 19.2 - Sat.1 HD) : http://ultrashare.de/f/6720/sat1hd20070209blitz4.ts.html
The same, but demuxxed 264 : http://archiv.to/?Module=Details&HashID=FILE45E4CD53EDA2D


Source Stream Info Pictures:
http://img16.imagevenue.com/loc253/th_01017_tsc_01_122_253lo.jpg (http://img16.imagevenue.com/img.php?image=01017_tsc_01_122_253lo.jpg)http://img172.imagevenue.com/loc72/th_01022_tsc_02_122_72lo.jpg (http://img172.imagevenue.com/img.php?image=01022_tsc_02_122_72lo.jpg)http://img168.imagevenue.com/loc129/th_01025_tsc_03_122_129lo.jpg (http://img168.imagevenue.com/img.php?image=01025_tsc_03_122_129lo.jpg)http://img150.imagevenue.com/loc7/th_01027_tsc_04_122_7lo.jpg (http://img150.imagevenue.com/img.php?image=01027_tsc_04_122_7lo.jpg)


after demuxxing error in the lower left.

http://img147.imagevenue.com/loc171/th_05298_gdavc_dem_122_171lo.jpg (http://img147.imagevenue.com/img.php?image=05298_gdavc_dem_122_171lo.jpg)

Inventive Software
27th February 2007, 23:21
Hey Donald, is this planned to be integrated into DGIndex, so's H.264 TS streams are workable in that then?

steve77
28th February 2007, 00:14
I tried loading an *.mp4 file in the DGAVCIndex program and it didn't wanna go. I encoded it originally with meGui.

I get the error: "Undefined Level"

Guest
28th February 2007, 00:17
Hey Donald, is this planned to be integrated into DGIndex, so's H.264 TS streams are workable in that then? No, it will be DGAVCIndex. But that will (it is hoped) support containers including transport at a later time. Right now, I need to get the ES decoding shaken out.