View Full Version : ffdshow tryouts project: Discussion & Development
rickardk
24th October 2007, 12:11
Sorry to be too late, but I guess this change is confusing the user. We are not announcing this very loudly. People who don't read here have no way to know...
'on movie file name match with preset name' is checked by default and unless users uncheck it, the preset doesn't load.
Too late but isn't it better to add an option to select OR/AND and make OR the default?
The dialog would require a radio button
*On all conditions match (AND)
*On one of the conditoins match (OR)
AND, OR would be much useful in ffdshow audio. Especially now when we have 8 channels. When loading preset to handle upmixing on diffrent sources we have to use alot of presets to cover all autoloading conditions. Could be much simpler with AND, OR.
haruhiko_yamagata
24th October 2007, 12:24
hmm...
Each preset will have AND / OR.
For existing preset, OR is applied.
For new preset, the default preset's AND / OR is copied like other settings.
Is this a good idea?
LigH
24th October 2007, 16:24
@ haruhiko_yamagata:
Thanks for investigating in the HuffYUV case. Tell us the build from which a workaround will be implemented, and we will check if Premiere Elements still fails to cooperate.
haruhiko_yamagata
25th October 2007, 00:12
@ haruhiko_yamagata:
Thanks for investigating in the HuffYUV case. Tell us the build from which a workaround will be implemented, and we will check if Premiere Elements still fails to cooperate.The work around has not been committed yet.
They are bugs of applications. HyperCam (http://www.hyperionics.com/hc/) updated their build because I reported to them. Adobe premire seems to have the same bug guessing from someone's report. And it's not all, more applications are likely to have the same bug.
Back to ffdshow's HuffYUV:...
It doesn't matter if the compression is real time or not.
Where should I post this?
Microsoft's documentation about ICM_COMPRESS
http://msdn2.microsoft.com/en-us/library/ms708923.aspx
Quote from Microsoft's document: The driver should also use the biSizeImage member of the BITMAPINFOHEADER structure associated with lpbiOutput of ICCOMPRESS to return the size of the compressed frame.
So ffdshow writes to lpbiOutput->biSizeImage on ICM_COMPRESS before returning to the caller.
Quote from Microsoft's document: The ICM_COMPRESS message notifies a video compression driver to compress a frame of data into an application-defined buffer.
Here, I would like to expect that the calling application to set lpbiOutput->biSizeImage every time before it call the codec. Because some applications do this only for the first time, ffdshow receives what itself has written in lpbiOutput->biSizeImage on the previous call.
Of course this doesn't work, the buffer gets smaller and smaller.
Applications don't use ICM_COMPRESS directly. They use VCM (video compression manager) fuctions's such as ICCompress (http://msdn2.microsoft.com/en-us/library/ms708672.aspx) or ICSeqCompressFrame (http://msdn2.microsoft.com/en-us/library/ms709118.aspx). These functions are wrappers of ICM_COMPRESS. The documentations of these functions don't instruct to update lpbiOutput->biSizeImage every call and even don't refer to the return value in lpbiOutput->biSizeImage. Thus many VFW applications are buggy in my opinion.
PATCH: ffdshow's work around
Index: src/Tffvfw.cpp
===================================================================
--- src/Tffvfw.cpp (revision 1573)
+++ src/Tffvfw.cpp (working copy)
@@ -92,7 +92,9 @@
CUnknown(NAME("Tffvfw"),punk),
convert(NULL),
dec(NULL),
- graph(false)
+ graph(false),
+ previous_out_biSizeImage(0),
+ previouts_lpOutput(NULL)
{
randomize();
}
@@ -237,7 +239,11 @@
STDMETHODIMP_(LRESULT) Tffvfw::coEnd(void)
{
if (initCo())
- return deciE_VFW->end();
+ {
+ previous_out_biSizeImage = 0;
+ previouts_lpOutput = NULL;
+ return deciE_VFW->end();
+ }
else
return VFW_E_RUNTIME_ERROR;
}
@@ -245,8 +251,18 @@
{
if (initCo())
{
+ ICCOMPRESS *icc=(ICCOMPRESS*)icc0;
+ // Work around applications' bugs
+ // Because Microsoft's document is incomplete, many applications are buggy in my opinion.
+ // lpbiOutput->biSizeImage is used to return value, the applications should update lpbiOutput->biSizeImage on every call.
+ // But some applications doesn't do this, thus lpbiOutput->biSizeImage smaller and smaller.
+ // The size of the buffer isn't likely to change during encoding.
+ if (previouts_lpOutput == icc->lpOutput)
+ icc->lpbiOutput->biSizeImage = std::max(icc->lpbiOutput->biSizeImage, previous_out_biSizeImage); // looks like very bad code, but I have no choice. Not one application need this.
+ previous_out_biSizeImage = icc->lpbiOutput->biSizeImage;
+ previouts_lpOutput = icc->lpOutput;
+ // End of work around applications' bugs.
deciE_VFW->setICC(icc0);
- ICCOMPRESS *icc=(ICCOMPRESS*)icc0;
return deciE_VFW->compress(icc->lpbiInput,(const uint8_t*)icc->lpInput,icc->lpbiInput->biSizeImage,0,0);
}
else
Index: src/Tffvfw.h
===================================================================
--- src/Tffvfw.h (revision 1573)
+++ src/Tffvfw.h (working copy)
@@ -19,6 +19,8 @@
public IprocVideoSink
{
private:
+ DWORD previous_out_biSizeImage;
+ LPVOID previouts_lpOutput;
bool graph;
bool initCo(void),initDec(void);
comptr<IffdshowEncVFW> deciE_VFW;comptrQ<IffdshowEnc> deciE;comptrQ<IffdshowBase> deciEB;
squid_80
25th October 2007, 06:46
If you're going to assume the output buffer is a constant size why not use the value of lpbiOutput->biSizeImage from the ICCompressBegin call?
haruhiko_yamagata
25th October 2007, 09:19
If you're going to assume the output buffer is a constant size why not use the value of lpbiOutput->biSizeImage from the ICCompressBegin call?No, I'm assuming the output buffer is a constant size as long as the output buffer's address is not changed.
But thank you for understanding my post. My question is like that you have said.
"Is it correct to assume the output buffer is a constant size and use the value of lpbiOutput->biSizeImage from the ICCompressBegin call?"
Either way, Microsoft's documentation is not clear enough.
Inventive Software
25th October 2007, 15:35
Think there's a bug in libavcodec's MPEG-4 encoder... in the "Motion Estimation" section, under "EPZS diamond size", the adaptive modes and experimental don't work, crashes VirtualDub.
haruhiko_yamagata
26th October 2007, 14:07
Think there's a bug in libavcodec's MPEG-4 encoder... in the "Motion Estimation" section, under "EPZS diamond size", the adaptive modes and experimental don't work, crashes VirtualDub.I can't reproduce for now.
LigH
28th October 2007, 16:19
ffdshow_rev1579_20071026_xxl.exe is able to decode PAFF AVC M2TS generated by a SONY AVCHD camera.
Just ... DGAVCIndex 1.00b6 doesn't care which libavcodec version resides in its directory, and doesn't even try to index it.
haruhiko_yamagata
29th October 2007, 14:20
ffavisynth.dll has been changed to "C Plugin" between 20051115-20051124. ffavisynth.dll in older builds than 20051115 can be loaded automatically. While the dll in newer builds than 20051124 have to be loaded by using "loadCPlugin("full path\ffavisynth.dll")".
Is it good idea to install ffavisynth.avsi in the plugin directory?
loadCPlugin("ffavisynth.dll")
Then we can use ffavisynth without loading explicitly.
Leak
29th October 2007, 14:51
Is it good idea to install ffavisynth.avsi in the plugin directory?
If the user already selected to install ffavisynth.dll then I can't see why not.
BTW - I wanted to test your AviSynth/RGB patch yesterday evening, but my server mysteriously died on me so I didn't have time to actually test the compile I made... :(
leeperry
29th October 2007, 20:55
hey guys, sorry to jump in and ask a lame question...but is there any new version of the dualcore optimized beta fron XXL pls ?
it works really smooth on my e4500@3Ghz
thx!!
haruhiko_yamagata
30th October 2007, 11:20
If the user already selected to install ffavisynth.dll then I can't see why not.
BTW - I wanted to test your AviSynth/RGB patch yesterday evening, but my server mysteriously died on me so I didn't have time to actually test the compile I made... :(OK, I have committed both changes. Please test when you have time.
ACrowley
30th October 2007, 12:14
hey guys, sorry to jump in and ask a lame question...but is there any new version of the dualcore optimized beta fron XXL pls ?
it works really smooth on my e4500@3Ghz
thx!!
So far i know ,no
Only the "one Slice per Thread" Version..no "real" Multithreading
Yeah 1080p H264 is smooth for me too with these Build, but the Audio is async with a +Delay
So im waitnig for a new Multithreading Build too
TheShadowRunner
30th October 2007, 15:30
well in my case 1080p h264 with ffdshow isn't what i call "smooth". frame delay is always around 300ms for some reason although the CPU isn't even near maxed out. (50-60%)
I use a Dual core e2180 at 2ghz, not overclocked.
It runs the same 1080p h264 files perfectly if i use CoreAVC or Cyberlink in soft mode. (no apparent frame skips, cpu also around 50%)
I think it's kinda sad that ffdshow requires a more powerful cpu than other h264 decoders!
Later,
TSR
clsid
30th October 2007, 16:18
It is kinda sad that you don't understand the difference between a free open-source decoder and commercial decoders.
Just use those other decoders and stop complaining here.
TheShadowRunner
30th October 2007, 16:40
I'm not complaining, i love ffdshow and the hard work you put into it, it's just that for h264, it apparently doesn't behave like it should on my system. Shouldn't the CPU be maxed out BEFORE it starts skipping? Well here, with ffdshow, that's not the case.
fastplayer
30th October 2007, 17:00
@TheShadowRunner:
If you think you've found a bug, please report it here:
http://ffmpeg.mplayerhq.hu/bugreports.html
and/or here:
http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
clsid
30th October 2007, 17:35
You say that you have a dual core, yet you mention only 1 CPU usage %, the average. What is important is the usage of the individual cores. One of them is likely around 100%.
ceeeeee
30th October 2007, 20:20
how can i use ffdshow with Hardware Accelerator for mpeg 2 and h264 decoding and encoding ;
i was try to check "Set intelace flag in output media type" and select bob but cant work
i use to graphedit build graph mpeg 2 file when i use nvidia/cyberlink decoder it use DXVA when i use ffdshot it use YUV2 plase help me Thanks
TheShadowRunner
30th October 2007, 20:46
clsid, i'm trying to find a soft that shows cpu util. for both cores independently, but i'm sure you're right.
In which case, "Queue samples" should make a difference when enabled. However I cannot see any.
I'll confirm when I find the soft and test again in real time.
(if you know a small soft that shows each core util., let me know^^)
ceeeeee, it's not possible at the moment, ffdshow only works in software atm.
See you,
TSR
Jeremy Duncan
30th October 2007, 20:52
Codecs tab
Set Mpeg2 to Libmpeg2, and check "DVD decoding".
Set Raw video to All supported
Deinterlacing tab
Kernal Deinterlacer
Threshold: 16
Subtitles tab, Unchecked
Uncheck "Decode closed captions"
"Accept embedded subs"
"Accept SSA, ASS, ASS2 Subtitle (experimental)
Vobsub subpage, uncheck Vobsub Enable.
Resize & aspect:
Specify Horizontal and vertical size 1024, 576 (Match your screen resolution)
Process Pixel aspect ratio internally checked
No aspect ratio correction checked
Lanczos
Taps: 2
Luma Sharpen: 0.20
Accurate rounding checked
Queue & Output tab
Queue output samples checked
Output tab
YV12 checked
http://aycu23.webshots.com/image/29742/2002824361070834483_th.jpg (http://allyoucanupload.webshots.com/v/2002824361070834483)
Using FFDshow Clsid version Generic 1589, and MPC 6.4.9.0 Gabest version this crashes when I open GitS NTSC Widescreen version.
MPC uses default output, Audio switcher boost on full, and the external filters audio and video ffdshow.
Thunderbolt8
30th October 2007, 21:03
So far i know ,no
Only the "one Slice per Thread" Version..no "real" Multithreading
Yeah 1080p H264 is smooth for me too with these Build, but the Audio is async with a +Delay
So im waitnig for a new Multithreading Build too
what does this exaclty mean, when does the audio go out of sync? when applying a delay with "+" or"-", it doesnt apply the displayed value then?
Px
30th October 2007, 21:52
clsid, i'm trying to find a soft that shows cpu util. for both cores independently
RMClock
RivaTuner
haruhiko_yamagata
30th October 2007, 23:21
(if you know a small soft that shows each core util., let me know^^)Windows Xp's built in task manager have performance monitor. Press ctrl+alt+del and click performance tab. Press alt+V+C+P.frame delay is always around 300ms As I wrote here (http://ffdshow-tryout.sourceforge.net/html/en/queue.htm), queue won't be effective in that case.
haruhiko_yamagata
31st October 2007, 10:19
EDIT: That's a problem with regedit, actually - the scripts are written to the file with their linebreaks intact, so regedit's parser will just skip what it thinks are broken lines.
But if you just export the whole ffdshow configuration from regedit, it'll produce the exact same problem... so I'd have to replace the newlines in the AviSynth script with something else when storing it to the registry and undo that when reading from it - that'll need a bit more investigation...
It's a bug of ffdshow. We must use REG_MULTI_SZ (double null terminated strings) for multiple lines text data. It won't be too hard to implement it.
However, ffdshow support *.ffpreset file and stream input (like ffavisynth.dll ffdshow() and ffdshowAudio()). These things are more annoying because they don't support double null terminated strings. The alternative would be to replace \r\n with some delimiter.
Which character(s) can we use as delimiter?
Leak
31st October 2007, 12:09
Which character(s) can we use as delimiter?
I was thinking of using "%n", "%r" and "%%" for escaping, with a single "%" as the very first character stored to signal that escaping was used (so that existing scripts won't be unescaped, which would break them) since the "%" operator in AviSynth can't be used as the very first symbol in a script...
ACrowley
31st October 2007, 15:29
what does this exaclty mean, when does the audio go out of sync? when applying a delay with "+" or"-", it doesnt apply the displayed value then?
That means simply the audio is async with a + Delay (~ 1500ms) on 1080p H(x)264 ...Oh ,no its not my CPU ,its strong enough (A 64 X2 5000)
I know a few guys with the same Problem with the Multithreaded Builds
Jeremy Duncan
31st October 2007, 17:10
I have a feature request.
That in the resize and aspect tab there be a option to eliminate the black bar on the bottom of the screen while keeping the black bar on the top of the screen.
So in 2:35 aspect movies on a 16:10 ratio screen, the movie would be on the bottom of the screen and the only black bar would be on top.
Also, on that bug where it crashed. It's something to do with the deinterlace tab.
Leak
31st October 2007, 18:44
So in 2:35 aspect movies on a 16:10 ratio screen, the movie would be on the bottom of the screen and the only black bar would be on top.
Have you looked at the "Resize & aspect > Borders" page lately? That option is already there...
np: Prefuse 73 - Over Ensembles (Interregnums)
clsid
31st October 2007, 18:48
@Jeremy, that is already possible. Look at the 'borders' subpage of resize settings. There you can define how space for the black bars should be allocated.
Edit: too late :p
Thunderbolt8
31st October 2007, 19:12
That means simply the audio is async with a + Delay (~ 1500ms) on 1080p H(x)264 ...Oh ,no its not my CPU ,its strong enough (A 64 X2 5000)
I know a few guys with the same Problem with the Multithreaded Builds
hm, I dont have this problem. Ive made 2 remuxes with AVC so far (oldboy & casino royale), in both cases the audio (dd+ and LPCM) were in sync after demuxing, so no delay needed. and this was the case then, audio and video were perfectly in sync, there was nothing like a delay or such. got a c2d 6300 running @2,8GHz
Jeremy Duncan
31st October 2007, 21:46
Using the FFDshow "Borders" tab.
First I need to set the "Borders" Horizontal or Vertical.
It's got to change from Default.
Second, I need to set "Dividing Borders", either Horizontal or Vertical.
The result is the movie can be shifted around.
But the top and bottom default border setting are never affected.
I can set the "Dividing Borders" Vertical all the way right or left,
and the original borders are neither set higher or lower than they originally were.
The only borders that can be affected by "Dividing Borders",
are the ones created by changing the default horizontal or vertical "Borders" settings.
So by using the Borders tab in Resize and Aspect,
I can't eliminate the bottom black border and only have a border on top of the movie!
So it's still a feature request, please. :)
This was using Clsid's version put out today.
Inventive Software
1st November 2007, 00:09
Semi-useful suggestion: update the "tool-tip" on the "Decoder options" section/tab of the DirectShow decoder, to include the H.264 decoder as multi-threaded. Currently, it says "mpeg1/2 decoder only".
And Jeremy Duncan: post your ffdshow probs in this thread as opposed to the sub-forum, because that way they're more likely to get answered by the people who know (developers and so-forth). It keeps the forum cleaner, and everything together. Just a minor nitpick / suggestion. ;)
BTW, does anybody know what sort of speed the libavcodec VC-1 decoder has, and whether that's multi-threaded or not?
haruhiko_yamagata
1st November 2007, 13:14
the original borders are neither set higher or lower than they originally were.Do you want to crop the borders that the original videos have? Then 'crop' is the one you are looking for.
clsid
1st November 2007, 15:32
Maybe we can set up a wiki page on the sourceforge webspace? With a FAQ and pages for explaining the various filter pages. Then everyone can contribute their knowledge and tips. Plus we don't have to invest time in creating documentation to include with ffdshow. We can just include a weblink to the wiki.
Naito
1st November 2007, 16:31
Maybe we can set up a wiki page on the sourceforge webspace? With a FAQ and pages for explaining the various filter pages. Then everyone can contribute their knowledge and tips. Plus we don't have to invest time in creating documentation to include with ffdshow. We can just include a weblink to the wiki.
Please!
Jeremy Duncan
1st November 2007, 18:58
Do you want to crop the borders that the original videos have? T
The example on the right is what I want to have, please. :)
http://aycu38.webshots.com/image/32637/2003530404965121417_th.jpg (http://allyoucanupload.webshots.com/v/2003530404965121417)
Anybody confirm at that deinterlace bug?
Leak
1st November 2007, 19:08
The example on the right is what I want to have, please. :)
You've still failed to tell us if (part of) the black bars in your left image are encoded into the movie, because obviously those aren't affected by the sliders on the "Borders" page.
You can, however, use the "Autocrop" settings of the "Crop" filter to get rid of encoded borders before adding new ones via the "Resize" filter. That should do exactly what you want - you obviously need to get rid of any fixed borders contained in the movie itself before you can add new, user defined borders any way you want...
np: Prefuse 73 - Busy Signal (Make You Go Bombing Mix) (Prefuse & Daedelus) (One Word Extinguisher)
Jeremy Duncan
1st November 2007, 19:26
Leak,
It's not for one Specific Movie, but 2:35 1:85 aspect ratio movies in general.
I'm assuming that the borders aren't encoded into the movie.
Also, I was hoping for a one button option instead of cropping then manually setting the resize borders tab, since that's not automatically switched between 2:35 and 1:85 aspect ratios.
Also on 16:10 monitors it would need to be done for 16:9 movies.
I tested the Ghost in the Shell: Solid State Society Movie, NTSC, Widescreen. It was the movie, not a series.
Here's a D2v Sample of the Movie I used.
Link (http://rapidshare.com/files/66777599/d2v.zip.html)
clsid
1st November 2007, 21:46
Like said before:
What you want can be accomplished by simply enabling the resize filter, crop is not needed. Set dividing borders to 100% for top and 0% for bottom.
Of course this has no effect on black borders that are added by the renderer. Those are the ones that you only see in fullscreen.
Fabool
1st November 2007, 23:36
ffdshow crashes when deinterlacing is switched on and deinterlacing method is either Kernel bob or Kernel deinterlacer. This with the newest clsid build 1589 (both generic and icl10), it works fine with the 1578 build. Happens with any video clip, tested with Zoom player and DVBviewer (digital tv broadcasts).
haruhiko_yamagata
2nd November 2007, 10:34
ffdshow crashes when deinterlacing is switched on and deinterlacing method is either Kernel bob or Kernel deinterlacer. This with the newest clsid build 1589 (both generic and icl10), it works fine with the 1578 build. Happens with any video clip, tested with Zoom player and DVBviewer (digital tv broadcasts).Thank you for report. fixed at rev 1590.
cyberscott
3rd November 2007, 18:18
Hi everyone, long time lurker, first time poster.
Thanks for all the hard work on ffdshow!
I have noticed that since the inclusion of 7.1 audio option, AC3 encoding no longer works via spdif using digital connection. It only outputs 2 channel PCM. This is regardless of of the speaker matrix chosen. Going back to builds prior to the 7.1 audio matrix addition, AC3 encoding works fine with digital out. Analog out works fine for the 7.1 matrix.
ACrowley
3rd November 2007, 18:36
Hi everyone, long time lurker, first time poster.
Thanks for all the hard work on ffdshow!
I have noticed that since the inclusion of 7.1 audio option, AC3 encoding no longer works via spdif using digital connection. It only outputs 2 channel PCM. This is regardless of of the speaker matrix chosen. Going back to builds prior to the 7.1 audio matrix addition, AC3 encoding works fine with digital out. Analog out works fine for the 7.1 matrix.
Yeh , i also have the same Problmes...
i
phunqe
3rd November 2007, 22:05
Hi,
I've been trying to find some information on the "closed caption" subtitle feature. Is this supposed to be support for closed captions in DVB MPEG streams? If yes, is there any trick to enable it or is it not finished? Trying to get it to work with streams from a DVB-C card, but without any luck.
Cheers.
Kurtnoise
4th November 2007, 11:10
Question for the ffdshow maintainers: why lavf hasn't been included in ffmpeg package ?
clsid
4th November 2007, 12:05
Because ffdshow is only a decoding filter, not a source filter.
The idea of creating a DirectShow source filter based on libavformat has been brought up a couple times in the past. It would be an excellent NEW project. Its too much work to be part of ffdshow.
Mc Onyx
4th November 2007, 12:29
Could someone compile a "test" version of ffdshow, containing the new Dolby E-AC3 and True-HD patches/decoders, from mplayer, like Kurtnoise13 did with his mplayer and ffmpeg builds? You can find the patches on his site. Thanks.
http://kurtnoise.free.fr/index.php?dir=misc/
haruhiko_yamagata
4th November 2007, 12:57
Hi everyone, long time lurker, first time poster.
Thanks for all the hard work on ffdshow!
I have noticed that since the inclusion of 7.1 audio option, AC3 encoding no longer works via spdif using digital connection. It only outputs 2 channel PCM. This is regardless of of the speaker matrix chosen. Going back to builds prior to the 7.1 audio matrix addition, AC3 encoding works fine with digital out. Analog out works fine for the 7.1 matrix.OK, I bought long optical digital cable to connect to the AV-amp in the next room. I'll test as soon as I finish current stuff (AviSynth multiple line script problems).
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.